* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
    gap: 20px;
}

header h1 {
    font-size: 1.5rem;
    color: #1a73e8;
}

#header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    min-width: 150px;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

#auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-info span {
    font-size: 0.9rem;
    color: #666;
}

#user-info button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

#user-info button:hover {
    background: #f5f5f5;
}

.hidden {
    display: none !important;
}

.env-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.env-btn {
    padding: 10px 28px;
    border-radius: 6px;
    border: 2px solid #ddd;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #f0f0f0;
    color: #aaa;
}

.env-btn-prod.active {
    background: #d93025;
    border-color: #d93025;
    color: white;
}

.env-btn-staging.active {
    background: #f29900;
    border-color: #f29900;
    color: white;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

fieldset legend {
    padding: 0 8px;
    font-weight: 500;
}

.milestone-row {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.milestone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.milestone-header input[type="number"] {
    width: 130px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.milestone-header-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
    white-space: nowrap;
}

.milestone-pts-label {
    font-size: 0.8rem;
    color: #888;
    flex: 1;
}

.btn-remove-milestone {
    padding: 4px 10px;
    background: none;
    color: #cc0000;
    border: 1px solid #cc0000;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-remove-milestone:hover {
    background: #fff0f0;
}

.milestone-rewards-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 6px;
}

.reward-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.reward-row input[type="text"] {
    flex: 2;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.reward-row select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

.reward-row input[type="number"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-remove-reward {
    padding: 4px 8px;
    background: none;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
}

.btn-remove-reward:hover {
    color: #cc0000;
    border-color: #cc0000;
}

.btn-add-reward {
    margin-top: 4px;
    padding: 4px 0;
    background: none;
    border: none;
    color: #1a73e8;
    cursor: pointer;
    font-size: 0.82rem;
}

.btn-add-reward:hover {
    text-decoration: underline;
}

.btn-secondary {
    padding: 8px 16px;
    background: white;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #f0f7ff;
}

.form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.btn-primary {
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#response-output {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

#login-prompt {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.2s;
}

.tab:hover {
    color: #1a73e8;
}

.tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.coming-soon {
    color: #888;
    font-style: italic;
    padding: 40px;
    text-align: center;
}

/* Events list */
.events-placeholder {
    color: #888;
    text-align: center;
    padding: 40px;
}

.events-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.event-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.event-card-theme {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

.event-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-preview {
    background: #cce5ff;
    color: #004085;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #e2e3e5;
    color: #383d41;
}

.event-card-details {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.event-detail-label {
    color: #888;
    display: block;
}

.event-detail-value {
    color: #333;
    font-weight: 500;
}

.event-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.btn-action {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-preview {
    background: #17a2b8;
    color: white;
}

.btn-preview:hover {
    background: #138496;
}

.btn-start {
    background: #28a745;
    color: white;
}

.btn-start:hover {
    background: #218838;
}

.btn-stop {
    background: #dc3545;
    color: white;
}

.btn-stop:hover {
    background: #c82333;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #6c757d;
    color: white;
}

.btn-delete:hover {
    background: #5a6268;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .milestone-row {
        grid-template-columns: 1fr 1fr;
    }

    header {
        flex-direction: column;
        gap: 16px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .event-card-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-card-actions {
        flex-wrap: wrap;
    }
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #666;
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 500;
}

.breadcrumb-item.clickable {
    color: #1a73e8;
    cursor: pointer;
}

.breadcrumb-item.clickable:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 8px;
}

/* Card header with title and dropdown */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    margin: 0;
}

/* Config cards */
.config-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
}

.config-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.config-card-create {
    border-style: dashed;
    border-color: #1a73e8;
    background: #f8fbff;
}

.config-card-create:hover {
    background: #e8f0fe;
}

.config-card-create-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #1a73e8;
    font-weight: 500;
    padding: 8px;
}

.create-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.config-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.config-card-info {
    flex: 1;
}

.config-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.repeat-icon {
    font-size: 1.2rem;
    color: #6f42c1;
    font-weight: bold;
}

.config-card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

.config-card-theme {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

.config-card-info-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 0.8rem;
    color: #666;
    padding: 8px 0;
    margin-bottom: 4px;
}

.config-card-info-details .label {
    color: #888;
    font-weight: 500;
}

.config-card-timing {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: #666;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
}

.config-card-timing .label {
    color: #888;
    font-weight: 500;
}

.config-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.config-card-meta {
    font-size: 0.8rem;
    color: #888;
}

.btn-duplicate {
    background: #6f42c1;
    color: white;
}

.btn-duplicate:hover {
    background: #5a32a3;
}

/* Config detail view */
.config-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.detail-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-status-container .repeat-icon {
    font-size: 1.4rem;
}

.config-detail-info h2 {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
}

.event-description {
    color: #666;
    font-size: 0.9rem;
}

.config-detail-content {
    margin-bottom: 20px;
}

.config-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.config-details-grid .label {
    color: #888;
    font-size: 0.85rem;
}

.config-milestones h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #333;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.milestone-number {
    background: #1a73e8;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.milestone-threshold {
    flex: 1;
    font-weight: 500;
}

.milestone-reward {
    color: #28a745;
    font-weight: 500;
}

.config-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Instance cards */
.instance-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
}

.instance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.instance-date {
    font-size: 0.8rem;
    color: #888;
}

.instance-card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 0.9rem;
}

.instance-card-details-3col {
    grid-template-columns: repeat(3, 1fr);
    font-size: 0.8rem;
}

.instance-card-details-3col .label {
    display: block;
    margin-bottom: 2px;
}

.instance-card-details .label {
    color: #888;
}

.instance-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: white;
}

.countdown-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.countdown-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
}

.instance-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Status variants */
.status-no\ instance {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .config-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .instance-card-details {
        grid-template-columns: 1fr;
    }
}

/* Encrypt Tab */
.encrypt-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.translator-event-selector {
    margin-bottom: 20px;
}

/* Translator Layout */
.translator-container {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.translator-left,
.translator-right {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.translator-middle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 20px 8px;
}

.translator-panel {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.translator-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.translator-panel-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
}

.translator-panel-content {
    padding: 16px;
    flex: 1;
}

.translator-form-row {
    grid-template-columns: 1fr 1fr;
}

.btn-add-milestone {
    margin-top: 8px;
}

/* Translator action buttons */
.btn-translator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-translator .arrow-icon {
    font-size: 1.1rem;
}

.btn-encrypt {
    background: #1a73e8;
    color: white;
}

.btn-encrypt:hover {
    background: #1557b0;
}

.btn-encrypt:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-decrypt {
    background: #6f42c1;
    color: white;
}

.btn-decrypt:hover {
    background: #5a32a3;
}

.btn-decrypt:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Right panel textarea */
.translator-right .translator-panel-content {
    padding: 0;
}

.translator-right textarea {
    width: 100%;
    height: 100%;
    min-height: 200px;
    padding: 12px;
    border: none;
    border-radius: 0 0 8px 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    resize: none;
    background: white;
}

.translator-right textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Remote config key footer inside right panel */
.translator-panel-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

.translator-panel-footer .label {
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
}

.translator-panel-footer .remote-config-key {
    flex: 1;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: #1a73e8;
    background: white;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive translator */
@media (max-width: 768px) {
    .translator-container {
        flex-direction: column;
    }

    .translator-middle {
        flex-direction: row;
        justify-content: center;
        padding: 12px 0;
    }

    .translator-right textarea {
        min-height: 150px;
    }
}

.btn-copy {
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #218838;
}

/* Reschedule */
.btn-reschedule {
    background: #17a2b8;
    color: white;
}

.btn-reschedule:hover {
    background: #138496;
}

.modal-content-small {
    max-width: 450px;
}

.reschedule-warning {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.reschedule-warning.warning-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.reschedule-warning.warning-caution {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.reschedule-warning.warning-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Kebab Menu */
.kebab-menu {
    position: relative;
    display: inline-block;
}

.kebab-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: #666;
    transition: all 0.2s;
}

.kebab-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.kebab-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}

.kebab-menu.open .kebab-dropdown {
    display: block;
}

.kebab-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.15s;
}

.kebab-dropdown-item:hover {
    background: #f5f5f5;
}

.kebab-dropdown-item.text-purple {
    color: #6f42c1;
}

.kebab-dropdown-item.text-danger {
    color: #dc3545;
}

/* Input with unit selector */
.input-with-unit {
    display: flex;
    gap: 8px;
}

.input-with-unit input {
    flex: 1;
    min-width: 0;
}

.input-with-unit select {
    width: 100px;
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* Disabled status */
.status-disabled {
    background: #f5f5f5;
    color: #999;
}

/* Legacy cancelled status (alias) */
.status-cancelled {
    background: #f5f5f5;
    color: #999;
}

/* Cancelled config cards */
.config-card-cancelled {
    opacity: 0.6;
    background: #f0f0f0;
    cursor: default;
}

.config-card-cancelled:hover {
    border-color: #e0e0e0;
    box-shadow: none;
}

.config-card-cancelled .config-card-title,
.config-card-cancelled .config-card-theme,
.config-card-cancelled .config-card-meta {
    color: #999;
}

/* Config list header with create button and toggle */
.config-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.config-list-header .config-card-create {
    margin-bottom: 0;
    flex: 1;
    max-width: 250px;
}

/* Show cancelled toggle */
.show-cancelled-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.show-cancelled-toggle input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.show-cancelled-toggle:hover {
    color: #333;
}

/* Green text for Activate button */
.kebab-dropdown-item.text-green {
    color: #28a745;
}

/* Activate modal */
.activate-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-green {
    background: #28a745;
}

.btn-green:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.badge-prod {
    display: inline-block;
    padding: 2px 7px;
    background: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.badge-testing {
    display: inline-block;
    padding: 2px 7px;
    background: #f59e0b;
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.publish-time-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 0.9rem;
}

.publish-time-row {
    display: flex;
    gap: 8px;
    padding: 3px 0;
}

.publish-time-label {
    color: #666;
    min-width: 50px;
}

.publish-time-value {
    font-weight: 500;
    color: #333;
}

/* Show more button */
.btn-show-more {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-top: 8px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-show-more:hover {
    background: #e9ecef;
    border-color: #999;
    color: #333;
}

/* Remote config key */
.remote-config-key-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.remote-config-key-section .label {
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
}

.remote-config-key {
    flex: 1;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #1a73e8;
    background: white;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.btn-copy-small {
    padding: 6px 12px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-copy-small:hover {
    background: #1557b0;
}

.manage-themes-toggle {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #1a73e8;
    cursor: pointer;
    user-select: none;
}

.manage-themes-toggle:hover {
    text-decoration: underline;
}

.manage-themes-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
}

.themes-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.theme-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
}

.theme-delete-btn {
    background: none;
    border: none;
    color: #d93025;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}

.theme-delete-btn:hover {
    color: #a50e0e;
}

.themes-empty {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.add-theme-row {
    display: flex;
    gap: 6px;
}

.add-theme-row input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.add-theme-row button {
    padding: 6px 12px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.add-theme-row button:hover {
    background: #1557b0;
}

.manage-reward-types-row {
    margin-bottom: 10px;
}

/* ===== CALENDAR ===== */
.calendar-card {
    margin-bottom: 20px;
    padding: 16px 16px 8px;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-month-label {
    font-size: 1.05rem;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
    color: #333;
}

.cal-nav-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.15s;
    padding: 0;
}
.cal-nav-btn:hover { background: #f0f0f0; }

.cal-today-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    transition: background 0.15s;
}
.cal-today-btn:hover { background: #f0f0f0; }

.cal-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2px;
}
.cal-day-headers > div {
    text-align: right;
    padding: 4px 8px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cal-grid { }

.cal-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 0.9rem;
}

.cal-week {
    border-bottom: 1px solid #efefef;
}
.cal-week:last-child { border-bottom: none; }

.cal-day-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-day {
    min-height: 30px;
    padding: 4px 6px 2px;
    border-right: 1px solid #efefef;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}
.cal-day:last-child { border-right: none; }

.cal-day.cal-overlap {
    background-color: rgba(220, 50, 50, 0.06);
}

.cal-day-num {
    font-size: 0.8rem;
    color: #555;
    line-height: 22px;
    min-width: 22px;
    text-align: center;
}
.cal-day.cal-today .cal-day-num {
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    font-weight: 600;
}
.cal-day.cal-other-month .cal-day-num {
    color: #ccc;
}

.cal-events-layer {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 2px 0 4px;
    row-gap: 2px;
}

.cal-event-bar {
    height: 20px;
    border-radius: 4px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.74rem;
    color: white;
    transition: filter 0.15s;
    margin: 0 2px;
    text-decoration: none;
}
.cal-event-bar:hover { filter: brightness(0.9); }

.cal-event-bar.status-completed {
    opacity: 0.6;
    text-decoration: line-through;
}
.cal-event-bar.status-pending {
    opacity: 0.75;
}

.cal-event-bar.continues-before {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
}
.cal-event-bar.continues-after {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 0;
}

.cal-event-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.cal-event-time {
    font-size: 0.68rem;
    opacity: 0.9;
    flex-shrink: 0;
}
