/* ==========================================================================
   Design Tokens - Bank Style Design System
   ========================================================================== */

/* Light Theme (Default) */
:root {
    /* Brand Colors */
    --color-brand-primary: #003A8F;
    --color-brand-primary-dark: #002A6E;
    --color-brand-primary-light: #1A5FD1;
    --color-brand-secondary: #2F80ED;

    /* Background Colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F4F7FB;
    --color-bg-card: #F9FBFF;
    --color-bg-inverse: #0B1F44;

    /* Text Colors */
    --color-text-primary: #0B1F44;
    --color-text-secondary: #5B6B82;
    --color-text-muted: #9AA8BC;
    --color-text-inverse: #FFFFFF;

    /* State Colors */
    --color-success: #1DB954;
    --color-success-soft: #E8F7EF;
    --color-warning: #F2C94C;
    --color-warning-soft: #FFF7E0;
    --color-error: #EB5757;
    --color-error-soft: #FDECEC;

    /* Admin Panel Colors */
    --success-color: #1DB954;
    --success-hover: #17a34a;
    --success-rgb: 29, 185, 84;
    --danger-color: #EB5757;
    --danger-hover: #d64545;
    --danger-rgb: 235, 87, 87;

    /* CTA Colors */
    --color-cta: #005BFF;
    --color-cta-hover: #0047CC;
    --color-cta-disabled: #A8C2F5;

    /* Border & Shadow */
    --color-border: #E1E8F0;
    --shadow-sm: 0 1px 3px rgba(11, 31, 68, 0.06);
    --shadow-md: 0 4px 12px rgba(11, 31, 68, 0.08);
    --shadow-lg: 0 8px 24px rgba(11, 31, 68, 0.12);

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Layout */
    --header-height: 64px;
    --footer-height: 72px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);

    /* Icon filter for dark theme compatibility */
    --icon-filter: none;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-brand-primary: #1A5FD1;
    --color-brand-primary-dark: #0047CC;
    --color-brand-primary-light: #56CCF2;
    --color-brand-secondary: #56CCF2;

    --color-bg-primary: #0B1F44;
    --color-bg-secondary: #08162F;
    --color-bg-card: #102B55;
    --color-bg-inverse: #FFFFFF;

    --color-text-primary: #FFFFFF;
    --color-text-secondary: #C7D3E3;
    --color-text-muted: #8FA3C1;
    --color-text-inverse: #0B1F44;

    --color-success: #27AE60;
    --color-success-soft: #1A3D2B;
    --color-warning: #F2C94C;
    --color-warning-soft: #3D3520;
    --color-error: #EB5757;
    --color-error-soft: #3D1F1F;

    /* Admin Panel Colors (Dark Theme) */
    --success-color: #27AE60;
    --success-hover: #219653;
    --success-rgb: 39, 174, 96;
    --danger-color: #EB5757;
    --danger-hover: #d64545;
    --danger-rgb: 235, 87, 87;

    --color-cta: #2F80ED;
    --color-cta-hover: #1A5FD1;
    --color-cta-disabled: #3D5A80;

    --color-border: #1E3A5F;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    /* Icon filter to invert dark icons to white */
    --icon-filter: invert(1);
}

/* Themed icons - invert in dark mode */
.themed-icon {
    filter: var(--icon-filter);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding-bottom: calc(var(--footer-height) + var(--safe-area-bottom) + 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Header with Logo
   ========================================================================== */

.header {
    background: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.header-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Logo */
.header-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    text-align: right;
    white-space: nowrap;
}

.header-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.header-logout-btn:hover {
    background: var(--color-bg-tertiary);
}

.header-logout-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.header-logout-btn:hover img {
    opacity: 1;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    flex: 1;
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Bottom Navigation (Mobile Style)
   ========================================================================== */

.nav-tabs {
    display: flex !important;
    flex-direction: row !important;
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    padding-bottom: var(--safe-area-bottom);
    box-shadow: 0 -2px 12px rgba(11, 31, 68, 0.08);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    position: relative;
    min-height: 56px;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--color-brand-primary);
    border-radius: 0 0 3px 3px;
    transition: var(--transition-fast);
}

.nav-tab:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
}

.nav-tab:active {
    transform: scale(0.95);
}

.nav-tab.active {
    color: var(--color-brand-primary);
}

.nav-tab.active::before {
    width: 32px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.nav-tab:hover .nav-icon img,
.nav-tab.active .nav-icon img {
    opacity: 1;
}

/* Light theme: show outlined icons, hide filled */
.nav-icon .icon-dark {
    display: none;
}

.nav-icon .icon-light {
    display: block;
}

/* Dark theme: show filled icons (inverted), hide outlined */
[data-theme="dark"] .nav-icon .icon-light {
    display: none;
}

[data-theme="dark"] .nav-icon .icon-dark {
    display: block;
    filter: invert(1);
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    margin-bottom: 16px;
}

.section-header.with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.section-header.with-toggle h2 {
    margin-bottom: 0;
}

.section-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card-list {
    margin-bottom: 28px;
}

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-brand-secondary);
}

/* Today's duty card - highlighted with primary color */
.card.card-today {
    border-left: 4px solid var(--color-brand-primary);
    background: linear-gradient(90deg, rgba(0, 58, 143, 0.05) 0%, var(--color-bg-card) 100%);
}

[data-theme="dark"] .card.card-today {
    background: linear-gradient(90deg, rgba(26, 95, 209, 0.1) 0%, var(--color-bg-card) 100%);
}

/* Tomorrow's duty card - highlighted with secondary color */
.card.card-tomorrow {
    border-left: 4px solid var(--color-brand-secondary);
    background: linear-gradient(90deg, rgba(47, 128, 237, 0.05) 0%, var(--color-bg-card) 100%);
}

[data-theme="dark"] .card.card-tomorrow {
    background: linear-gradient(90deg, rgba(47, 128, 237, 0.08) 0%, var(--color-bg-card) 100%);
}

/* Date badge for today/tomorrow cards */
.card-date-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.card-date-badge.badge-today {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.card-date-badge.badge-tomorrow {
    background: var(--color-brand-secondary);
    color: var(--color-text-inverse);
}

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.card-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-requested {
    background: var(--color-warning-soft);
    color: #B8860B;
}

[data-theme="dark"] .badge-requested {
    color: var(--color-warning);
}

.badge-assigned {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.badge-closed {
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
}

.badge-awaiting_feedback {
    background: rgba(147, 51, 234, 0.15);
    color: #7C3AED;
}

[data-theme="dark"] .badge-awaiting_feedback {
    background: rgba(147, 51, 234, 0.25);
    color: #A78BFA;
}

.badge-feedback_received {
    background: rgba(139, 92, 246, 0.15);
    color: #6D28D9;
}

[data-theme="dark"] .badge-feedback_received {
    background: rgba(139, 92, 246, 0.25);
    color: #C4B5FD;
}

.badge-cancelled {
    background: rgba(127, 29, 29, 0.15);
    color: #7F1D1D;
}

[data-theme="dark"] .badge-cancelled {
    background: rgba(127, 29, 29, 0.35);
    color: #FCA5A5;
}

.card-body {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.card-row {
    display: flex;
    margin-bottom: 6px;
    line-height: 1.4;
    padding: 4px 6px;
    border-radius: 4px;
    margin-left: -6px;
    margin-right: -6px;
}

.card-row.highlight-row {
    background: var(--color-success-soft);
    border: 1px solid var(--color-success);
}

.card-label {
    color: var(--color-text-muted);
    min-width: 90px;
    flex-shrink: 0;
}

.card-value {
    color: var(--color-text-primary);
    word-break: break-word;
}

.card-id {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--color-brand-primary);
    background: var(--color-bg-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.card-id:hover {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-brand-primary);
}

.card-id:active {
    transform: scale(0.95);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 8px;
}

.card-footer .card-id {
    margin-top: 0;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Username links */
.username-link {
    color: var(--color-brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.username-link:hover {
    color: var(--color-cta-hover);
    text-decoration: underline;
}

.username-link:active {
    opacity: 0.7;
}

/* ==========================================================================
   Loading & Empty States
   ========================================================================== */

.loading, .empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Action Grid
   ========================================================================== */

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.action-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.action-card:hover {
    border-color: var(--color-brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-card:active {
    transform: translateY(0) scale(0.98);
}

.action-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon img {
    width: 100%;
    height: 100%;
}

/* Light theme: show outlined icons, hide filled */
.action-icon .icon-dark {
    display: none;
}

.action-icon .icon-light {
    display: block;
}

/* Dark theme: show filled icons (inverted), hide outlined */
[data-theme="dark"] .action-icon .icon-light {
    display: none;
}

[data-theme="dark"] .action-icon .icon-dark {
    display: block;
    filter: invert(1);
}

.action-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.action-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.action-form {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-top: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.action-form.hidden {
    display: none;
}

.action-form h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 58, 143, 0.12);
}

[data-theme="dark"] .input-field:focus {
    box-shadow: 0 0 0 3px rgba(26, 95, 209, 0.2);
}

.input-field::placeholder {
    color: var(--color-text-muted);
}

textarea.input-field {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-brand-primary);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-cta);
    color: var(--color-text-inverse);
}

.btn-primary:hover {
    background: var(--color-cta-hover);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-primary:disabled {
    background: var(--color-cta-disabled);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
    border-color: var(--color-text-muted);
}

.btn-secondary:active {
    transform: scale(0.97);
}

.btn-danger-outline {
    background: transparent;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.btn-danger-outline:hover {
    background: var(--color-error-soft);
    border-color: var(--color-error);
}

.btn-danger-outline:active {
    transform: scale(0.97);
}

.delete-profile-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 0.875rem;
}

/* Stored data tooltip styles */
.stored-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.8125rem;
}

.stored-data-table td {
    padding: 4px 0;
    border-bottom: 1px solid var(--color-border);
}

.stored-data-table td:first-child {
    color: var(--color-text-muted);
    width: 40%;
}

.stored-data-table td:last-child {
    color: var(--color-text-primary);
    word-break: break-all;
}

.stored-data-table code {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.75rem;
    background: var(--color-bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

.stored-data-table em {
    color: var(--color-text-muted);
    font-style: italic;
}

.stored-data-counts {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 8px 0 4px;
}

.stored-data-access {
    font-size: 0.75rem;
    color: var(--color-success);
    margin: 4px 0;
}

.stored-data-note {
    font-size: 0.8125rem;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--color-border);
}

.stored-data-related {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 4px 0 8px 16px;
    padding: 0;
}

.stored-data-related li {
    margin: 2px 0;
}

.stored-data-warning {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 8px;
}

/* Confirmation popup */
.confirm-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.confirm-popup-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.confirm-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-popup-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.confirm-popup-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-popup-actions .btn {
    flex: 1;
    max-width: 120px;
}

.btn-danger {
    background: var(--color-error);
    color: white;
    border: none;
}

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

.btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-tertiary);
}

/* ==========================================================================
   Settings
   ========================================================================== */

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.settings-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 14px;
}

.settings-label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.settings-label-with-action .settings-label {
    margin-bottom: 0;
}

.settings-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.settings-action-btn:hover {
    border-color: var(--color-brand-primary);
    background: var(--color-bg-secondary);
}

.settings-action-btn:active {
    transform: scale(0.95);
}

.settings-action-btn img {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .settings-action-btn img {
    filter: invert(1);
}

.settings-action-btn.loading img {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Feedback form */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    resize: vertical;
    transition: var(--transition-fast);
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--color-brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-brand-primary-rgb), 0.1);
}

.feedback-textarea::placeholder {
    color: var(--color-text-muted);
}

.feedback-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-counter {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.theme-switch {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.theme-btn:hover {
    border-color: var(--color-brand-primary);
    color: var(--color-brand-primary);
}

.theme-btn.active {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.user-info-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--color-border);
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.user-info-row:last-child {
    border-bottom: none;
}

.user-info-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.user-info-value {
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================================================
   Help List
   ========================================================================== */

.help-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-item {
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.help-item summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.help-item summary:hover {
    background: var(--color-bg-secondary);
}

.help-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

.help-item[open] summary::after {
    content: '−';
}

.help-item ul {
    padding: 0 16px 14px;
    list-style: none;
}

.help-item li {
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.help-item li:last-child {
    border-bottom: none;
}

.help-item code {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.8125rem;
    background: var(--color-bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--color-brand-primary);
    border: 1px solid var(--color-border);
}

/* ==========================================================================
   About Block (Collapsible)
   ========================================================================== */

.about-block {
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.about-header {
    padding: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
    list-style: none;
}

.about-header::-webkit-details-marker {
    display: none;
}

.about-header:hover {
    background: var(--color-bg-secondary);
}

.about-toggle::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

.about-block[open] .about-toggle::after {
    content: '−';
}

.about-content {
    padding: 0 16px 16px;
    border-top: 1px solid var(--color-border);
}

.about-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.about-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about-section:first-child {
    padding-top: 16px;
}

.about-description {
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.about-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.about-section p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.about-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-features li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: 6px 0 6px 20px;
    position: relative;
}

.about-features li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--color-brand-primary);
    font-weight: bold;
}

.about-version {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.about-version-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.about-version-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
}

.about-legal p {
    margin-bottom: 8px;
}

.about-legal p:last-child {
    margin-bottom: 0;
}

.about-contact {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--color-border);
}

.about-contact a {
    color: var(--color-brand-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.about-contact a:hover {
    text-decoration: underline;
}

/* Glass theme support for About Block */
[data-style="glass"] .about-block {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border-subtle);
}

[data-style="glass"] .about-header:hover {
    background: var(--glass-bg);
}

[data-style="glass"] .about-header,
[data-style="glass"] .about-description,
[data-style="glass"] .about-version-value {
    color: #ffffff;
}

[data-style="glass"] .about-section-title,
[data-style="glass"] .about-section p,
[data-style="glass"] .about-features li,
[data-style="glass"] .about-version-label {
    color: rgba(255, 255, 255, 0.85);
}

[data-style="glass"] .about-content {
    border-top-color: var(--glass-border-subtle);
}

[data-style="glass"] .about-section {
    border-bottom-color: var(--glass-border-subtle);
}

[data-style="glass"] .about-contact {
    border-top-color: var(--glass-border-subtle);
}

[data-style="glass"] .about-contact a {
    color: var(--color-brand-secondary);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: calc(var(--footer-height) + var(--safe-area-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 32px);
    max-width: 400px;
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease;
    font-weight: 500;
}

.toast.success {
    background: var(--color-success-soft);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.toast.error {
    background: var(--color-error-soft);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.toast.info {
    background: var(--color-bg-card);
    border: 1px solid var(--color-brand-primary);
    color: var(--color-brand-primary);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-16px); }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 400px) {
    .action-grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .header-user {
        display: none;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: 20px;
    }
}

/* ==========================================================================
   Access Denied / Not Registered States
   ========================================================================== */

.access-denied,
.not-registered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 24px;
    text-align: center;
    background: var(--color-bg-secondary);
}

.access-denied h1,
.not-registered h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.access-denied p,
.not-registered p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

/* ==========================================================================
   Statistics Block
   ========================================================================== */

.stats-block {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
}

.stats-header {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    transition: var(--transition-fast);
    user-select: none;
}

.stats-header::-webkit-details-marker {
    display: none;
}

.stats-header:hover {
    background: var(--color-bg-secondary);
}

.stats-icon {
    font-size: 1.125rem;
}

.stats-toggle {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.stats-toggle::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
}

.stats-block[open] .stats-toggle::after {
    content: '−';
}

.stats-content {
    padding: 0 16px 16px;
    animation: fadeIn 0.25s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stats-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.stats-card.stats-total {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-primary-light) 100%);
    border: none;
    color: var(--color-text-inverse);
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stats-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
    opacity: 0.9;
}

.stats-section {
    margin-bottom: 16px;
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    padding-left: 2px;
}

.stats-list {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.stats-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.stats-list-item:last-child {
    border-bottom: none;
}

.stats-list-name {
    color: var(--color-text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.stats-list-name a {
    color: var(--color-brand-primary);
    text-decoration: none;
}

.stats-list-name a:hover {
    text-decoration: underline;
}

.stats-list-value {
    font-weight: 700;
    color: var(--color-brand-primary);
    background: var(--color-bg-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8125rem;
    min-width: 36px;
    text-align: center;
    margin-left: 12px;
    flex-shrink: 0;
}

/* Style button (same as theme-btn) */
.style-btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    color: #5B6B82;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.style-btn:hover {
    border-color: var(--color-brand-primary);
    color: var(--color-brand-primary);
}

.style-btn.active {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
    color: #ffffff;
}

[data-theme="dark"] .style-btn {
    color: #C7D3E3;
}

[data-theme="dark"] .style-btn.active {
    color: #ffffff;
}

/* ==========================================================================
   Glass Theme (Glassmorphism / Liquid Glass)
   ========================================================================== */

/* Glass theme variables - Light */
[data-style="glass"] {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-strong: rgba(255, 255, 255, 0.8);
    --glass-bg-subtle: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-subtle: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --glass-shadow-lg: 0 12px 48px rgba(31, 38, 135, 0.2);
    --glass-blur: 16px;
    --glass-blur-strong: 24px;
    --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
}

/* Glass theme variables - Dark */
[data-theme="dark"][data-style="glass"] {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-bg-strong: rgba(15, 23, 42, 0.85);
    --glass-bg-subtle: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-subtle: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
    --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Glass background gradient */
[data-style="glass"] body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
}

[data-theme="dark"][data-style="glass"] body {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    background-attachment: fixed;
}

/* Glass App Container */
[data-style="glass"] #app {
    background: transparent;
}

/* Glass Text Colors - White text on colorful background */
[data-style="glass"] {
    --color-text-primary: #ffffff;
    --color-text-secondary: #f0f0f0;
    --color-text-muted: #d0d0d0;
}

[data-theme="dark"][data-style="glass"] {
    --color-text-primary: #ffffff;
    --color-text-secondary: #e8e8e8;
    --color-text-muted: #c0c0c0;
}

/* Glass - ensure white text everywhere */
[data-style="glass"] .header-title,
[data-style="glass"] .nav-label,
[data-style="glass"] .card-title,
[data-style="glass"] .card-value,
[data-style="glass"] .action-title,
[data-style="glass"] .settings-label,
[data-style="glass"] .section-header h2,
[data-style="glass"] .stats-section-title,
[data-style="glass"] .stats-list-name,
[data-style="glass"] .user-info-value,
[data-style="glass"] .help-item summary,
[data-style="glass"] .action-form h3 {
    color: #ffffff;
}

[data-style="glass"] .card-label,
[data-style="glass"] .action-desc,
[data-style="glass"] .user-info-label,
[data-style="glass"] .header-user {
    color: rgba(255, 255, 255, 0.8);
}

[data-style="glass"] .card-id {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-style="glass"] .username-link {
    color: #7dd3fc;
    text-decoration: none;
}

[data-style="glass"] .username-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

[data-style="glass"] .btn-primary,
[data-style="glass"] .btn-secondary {
    color: #ffffff;
}

[data-style="glass"] .input-field {
    color: #ffffff;
}

[data-style="glass"] .input-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-style="glass"] .stats-card-value,
[data-style="glass"] .stats-card-label {
    color: #ffffff;
}

[data-style="glass"] .stats-list-value {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
}

[data-style="glass"] .help-item li,
[data-style="glass"] .help-item code {
    color: #ffffff;
}

[data-style="glass"] .help-item code {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-style="glass"] .form-group label {
    color: #ffffff;
}

[data-style="glass"] .checkbox-label {
    color: #ffffff;
}

/* Glass Header */
[data-style="glass"] .header {
    background: rgba(128, 128, 128, 0.35);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"][data-style="glass"] .header {
    background: rgba(60, 60, 60, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-style="glass"] .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
}

/* Glass Navigation - Floating */
[data-style="glass"] .nav-tabs {
    background: rgba(128, 128, 128, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    left: 16px !important;
    right: 16px !important;
    bottom: calc(12px + var(--safe-area-bottom)) !important;
    max-width: 400px;
    margin: 0 auto;
}

[data-theme="dark"][data-style="glass"] .nav-tabs {
    background: rgba(60, 60, 60, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .nav-tab {
    background: transparent;
    border-radius: var(--radius-lg);
    margin: 4px;
}

[data-style="glass"] .nav-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .nav-tab.active {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"][data-style="glass"] .nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"][data-style="glass"] .nav-tab.active {
    background: rgba(255, 255, 255, 0.15);
}

/* Glass Cards */
[data-style="glass"] .card {
    background: rgba(128, 128, 128, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"][data-style="glass"] .card {
    background: rgba(60, 60, 60, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-style="glass"] .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
}

[data-style="glass"] .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Glass Action Cards */
[data-style="glass"] .action-card {
    background: rgba(128, 128, 128, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"][data-style="glass"] .action-card {
    background: rgba(60, 60, 60, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-style="glass"] .action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
}

[data-style="glass"] .action-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

/* Glass Forms */
[data-style="glass"] .action-form {
    background: rgba(128, 128, 128, 0.35);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"][data-style="glass"] .action-form {
    background: rgba(60, 60, 60, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .input-field {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

[data-style="glass"] .input-field option {
    background: #4a4a6a;
    color: #ffffff;
}

[data-theme="dark"][data-style="glass"] .input-field {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

[data-theme="dark"][data-style="glass"] .input-field option {
    background: #2a2a3a;
    color: #ffffff;
}

[data-style="glass"] .input-field:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* Glass Buttons */
[data-style="glass"] .btn-primary {
    background: rgba(128, 128, 128, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: var(--color-text-primary);
}

[data-style="glass"] .btn-primary:hover {
    background: rgba(128, 128, 128, 0.55);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

[data-style="glass"] .btn-secondary {
    background: rgba(128, 128, 128, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[data-style="glass"] .btn-secondary:hover {
    background: rgba(128, 128, 128, 0.45);
}

[data-theme="dark"][data-style="glass"] .btn-primary {
    background: rgba(80, 80, 80, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

[data-theme="dark"][data-style="glass"] .btn-primary:hover {
    background: rgba(80, 80, 80, 0.65);
}

[data-theme="dark"][data-style="glass"] .btn-secondary {
    background: rgba(60, 60, 60, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"][data-style="glass"] .btn-secondary:hover {
    background: rgba(60, 60, 60, 0.55);
}

[data-style="glass"] .btn-danger-outline {
    background: rgba(235, 87, 87, 0.1);
    border-color: rgba(235, 87, 87, 0.6);
    color: #ff6b6b;
}

[data-style="glass"] .btn-danger-outline:hover {
    background: rgba(235, 87, 87, 0.25);
}

/* Glass Settings */
[data-style="glass"] .settings-item {
    background: rgba(128, 128, 128, 0.3);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"][data-style="glass"] .settings-item {
    background: rgba(60, 60, 60, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-style="glass"] .theme-btn,
[data-style="glass"] .style-btn {
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--color-text-primary);
}

[data-style="glass"] .theme-btn:hover,
[data-style="glass"] .style-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text-primary);
}

[data-style="glass"] .theme-btn.active,
[data-style="glass"] .style-btn.active {
    background: var(--color-brand-primary);
    border: 1px solid var(--color-brand-primary);
    color: #ffffff;
}

[data-theme="dark"][data-style="glass"] .theme-btn,
[data-theme="dark"][data-style="glass"] .style-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

[data-theme="dark"][data-style="glass"] .theme-btn:hover,
[data-theme="dark"][data-style="glass"] .style-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

[data-theme="dark"][data-style="glass"] .theme-btn.active,
[data-theme="dark"][data-style="glass"] .style-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

[data-style="glass"] .user-info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

[data-style="glass"] .user-info-row {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .user-info-label {
    color: rgba(255, 255, 255, 0.85);
}

[data-style="glass"] .user-info-value {
    color: #ffffff;
}

/* Glass Help List */
[data-style="glass"] .help-item {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border-subtle);
}

[data-style="glass"] .help-item summary:hover {
    background: var(--glass-bg);
}

/* Glass Statistics */
[data-style="glass"] .stats-block {
    background: rgba(0, 30, 70, 0.45);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"][data-style="glass"] .stats-block {
    background: rgba(50, 50, 50, 0.5);
}

[data-style="glass"] .stats-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .stats-card {
    background: rgba(0, 25, 60, 0.5);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"][data-style="glass"] .stats-card {
    background: rgba(50, 50, 50, 0.55);
}

[data-style="glass"] .stats-card.stats-total {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

[data-style="glass"] .stats-list {
    background: rgba(0, 25, 60, 0.5);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"][data-style="glass"] .stats-list {
    background: rgba(50, 50, 50, 0.55);
}

[data-style="glass"] .stats-list-item {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .stats-list-name {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .stats-section-title {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .stats-list-value {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Glass Toast */
[data-style="glass"] .toast {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

[data-style="glass"] .toast.success {
    background: rgba(29, 185, 84, 0.2);
    border: 1px solid rgba(29, 185, 84, 0.4);
}

[data-style="glass"] .toast.error {
    background: rgba(235, 87, 87, 0.2);
    border: 1px solid rgba(235, 87, 87, 0.4);
}

[data-style="glass"] .toast.info {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

/* Glass Card ID */
[data-style="glass"] .card-id {
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border-subtle);
}

[data-style="glass"] .card-id:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Glass Badges */
[data-style="glass"] .card-badge {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-style="glass"] .badge-requested {
    background: rgba(242, 201, 76, 0.35);
    border: 1px solid rgba(242, 201, 76, 0.6);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .badge-assigned {
    background: rgba(29, 185, 84, 0.2);
    border: 1px solid rgba(29, 185, 84, 0.4);
}

[data-style="glass"] .badge-closed {
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border-subtle);
}

[data-style="glass"] .badge-awaiting_feedback {
    background: rgba(147, 51, 234, 0.3);
    border: 1px solid rgba(147, 51, 234, 0.5);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .badge-feedback_received {
    background: rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .badge-cancelled {
    background: rgba(127, 29, 29, 0.4);
    border: 1px solid rgba(127, 29, 29, 0.6);
    color: #FCA5A5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Glass highlight rows */
[data-style="glass"] .card-row.highlight-row {
    background: rgba(29, 185, 84, 0.15);
    border: 1px solid rgba(29, 185, 84, 0.3);
}

/* Smooth transitions for theme switching */
[data-style="glass"] * {
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   Calendar Styles - Apple-style minimal design
   ========================================================================== */

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.view-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    border-radius: calc(var(--radius-sm) - 2px);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--color-text-primary);
}

.view-btn.active {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Calendar Container - Apple style */
.calendar-container {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--color-border);
}

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

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-brand-primary);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 300;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: var(--color-bg-secondary);
}

.calendar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 140px;
    text-align: center;
}

.calendar-view-toggle {
    display: flex;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.calendar-view-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    border-radius: calc(var(--radius-sm) - 2px);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-view-btn:hover {
    color: var(--color-text-primary);
}

.calendar-view-btn.active {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Calendar Grid - Month View - Apple style compact */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekday {
    text-align: center;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 2px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 1px;
    height: 28px;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day:not(.empty):not(.today):not(.selected):hover .day-number {
    background: var(--color-bg-secondary);
}

.calendar-day.today .day-number {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.calendar-day.selected .day-number {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-day.selected:hover .day-number {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-day.today:hover .day-number {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.day-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-primary);
    border-radius: 50%;
    transition: all var(--transition-fast);
    position: relative;
}

/* Duty indicator - circle AROUND the date */
.calendar-day.has-duty.duty-assigned .day-number {
    box-shadow: inset 0 0 0 2px var(--color-success);
}

.calendar-day.has-duty.duty-owner .day-number {
    box-shadow: inset 0 0 0 2px var(--color-brand-secondary);
}

.calendar-day.has-duty.duty-both .day-number {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success) 50%, var(--color-brand-secondary) 50%, var(--color-brand-secondary) 100%);
    color: white;
}

/* Schedule calendar indicators */
.calendar-day.has-duty.duty-requested .day-number {
    box-shadow: inset 0 0 0 2px var(--color-warning);
}

.calendar-day.has-duty.duty-closed .day-number {
    box-shadow: inset 0 0 0 2px var(--color-text-muted);
}

.calendar-day.has-duty.duty-feedback .day-number {
    box-shadow: inset 0 0 0 2px #7C3AED;
}

.calendar-day.has-duty.duty-cancelled .day-number {
    box-shadow: inset 0 0 0 2px #7F1D1D;
}

/* Proportional border for Dashboard calendar (owner + assigned) */
.calendar-day.has-duty.duty-proportional .day-number {
    position: relative;
}

/* Selected date with proportional border */
.calendar-day.selected.has-duty.duty-proportional .day-number {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-day.selected.has-duty.duty-schedule-proportional .day-number {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-day.has-duty.duty-proportional .day-number::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        var(--color-success) 0% var(--assigned-pct, 50%),
        var(--color-brand-secondary) var(--assigned-pct, 50%) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Proportional border for Schedule calendar (requested + assigned + closed) */
.calendar-day.has-duty.duty-schedule-proportional .day-number {
    position: relative;
    background: transparent;
}

.calendar-day.has-duty.duty-schedule-proportional .day-number::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        var(--color-warning) 0% var(--req-pct, 25%),
        var(--color-success) var(--req-pct, 25%) var(--assign-pct, 50%),
        #7C3AED var(--assign-pct, 50%) var(--feedback-pct, 75%),
        var(--color-text-muted) var(--feedback-pct, 75%) var(--closed-pct, 100%),
        #7F1D1D var(--closed-pct, 100%) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Week view proportional borders */
.calendar-week-day.has-duty.duty-proportional .week-day-date {
    position: relative;
}

/* Selected date with proportional border - week view */
.calendar-week-day.selected.has-duty.duty-proportional .week-day-date {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-week-day.selected.has-duty.duty-schedule-proportional .week-day-date {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-week-day.has-duty.duty-proportional .week-day-date::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        var(--color-success) 0% var(--assigned-pct, 50%),
        var(--color-brand-secondary) var(--assigned-pct, 50%) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.calendar-week-day.has-duty.duty-schedule-proportional .week-day-date {
    position: relative;
    background: transparent;
}

.calendar-week-day.has-duty.duty-schedule-proportional .week-day-date::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        var(--color-warning) 0% var(--req-pct, 25%),
        var(--color-success) var(--req-pct, 25%) var(--assign-pct, 50%),
        #7C3AED var(--assign-pct, 50%) var(--feedback-pct, 75%),
        var(--color-text-muted) var(--feedback-pct, 75%) var(--closed-pct, 100%),
        #7F1D1D var(--closed-pct, 100%) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Override for today with duty */
.calendar-day.today.has-duty .day-number {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.calendar-day.today.has-duty.duty-assigned .day-number {
    box-shadow: 0 0 0 3px var(--color-bg-card), 0 0 0 5px var(--color-success);
}

.calendar-day.today.has-duty.duty-owner .day-number {
    box-shadow: 0 0 0 3px var(--color-bg-card), 0 0 0 5px var(--color-brand-secondary);
}

/* Today with proportional duty border */
.calendar-day.today.has-duty.duty-proportional .day-number {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    isolation: isolate;
}

.calendar-day.today.has-duty.duty-proportional .day-number::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-success) 0% var(--assigned-pct, 50%),
        var(--color-brand-secondary) var(--assigned-pct, 50%) 100%
    );
    z-index: -1;
}

/* Today with schedule proportional border */
.calendar-day.today.has-duty.duty-schedule-proportional .day-number {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    isolation: isolate;
}

.calendar-day.today.has-duty.duty-schedule-proportional .day-number::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-warning) 0% var(--req-pct, 33%),
        var(--color-success) var(--req-pct, 33%) var(--assign-pct, 66%),
        var(--color-text-muted) var(--assign-pct, 66%) 100%
    );
    z-index: -1;
}

/* Avatar on duty days */
.day-avatar {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--color-success);
    color: white;
    border-radius: 50%;
    font-size: 0.45rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-bg-card);
}

/* Hide old indicator divs */
.day-indicator {
    display: none;
}

/* Calendar Grid - Week View - Apple style compact */
.calendar-week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-week-day {
    background: transparent;
    padding: 4px 2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.calendar-week-day:not(.today):not(.selected):hover {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

.calendar-week-day.today .week-day-date {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.calendar-week-day.selected .week-day-date {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-week-day.selected:hover .week-day-date {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.calendar-week-day.today:hover .week-day-date {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

/* Week view duty circles */
.calendar-week-day.has-duty.duty-assigned .week-day-date {
    box-shadow: inset 0 0 0 2px var(--color-success);
}

.calendar-week-day.has-duty.duty-owner .week-day-date {
    box-shadow: inset 0 0 0 2px var(--color-brand-secondary);
}

.calendar-week-day.has-duty.duty-both .week-day-date {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success) 50%, var(--color-brand-secondary) 50%, var(--color-brand-secondary) 100%);
    color: white;
}

/* Schedule calendar week view indicators */
.calendar-week-day.has-duty.duty-requested .week-day-date {
    box-shadow: inset 0 0 0 2px var(--color-warning);
}

.calendar-week-day.has-duty.duty-closed .week-day-date {
    box-shadow: inset 0 0 0 2px var(--color-text-muted);
}

.calendar-week-day.has-duty.duty-feedback .week-day-date {
    box-shadow: inset 0 0 0 2px #7C3AED;
}

.calendar-week-day.has-duty.duty-cancelled .week-day-date {
    box-shadow: inset 0 0 0 2px #7F1D1D;
}

/* Week view today with proportional border */
.calendar-week-day.today.has-duty.duty-proportional .week-day-date {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    isolation: isolate;
}

.calendar-week-day.today.has-duty.duty-proportional .week-day-date::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-success) 0% var(--assigned-pct, 50%),
        var(--color-brand-secondary) var(--assigned-pct, 50%) 100%
    );
    z-index: -1;
}

/* Week view today with schedule proportional border */
.calendar-week-day.today.has-duty.duty-schedule-proportional .week-day-date {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    isolation: isolate;
}

.calendar-week-day.today.has-duty.duty-schedule-proportional .week-day-date::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-warning) 0% var(--req-pct, 33%),
        var(--color-success) var(--req-pct, 33%) var(--assign-pct, 66%),
        var(--color-text-muted) var(--assign-pct, 66%) 100%
    );
    z-index: -1;
}

.week-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.week-day-name {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.week-day-date {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-primary);
    border-radius: 50%;
    transition: all var(--transition-fast);
    position: relative;
}

.week-day-content {
    margin-top: 2px;
}

.duty-count {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Calendar Legend - minimal */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: var(--color-text-primary);
}

.legend-dot.legend-assigned {
    box-shadow: inset 0 0 0 2px var(--color-success);
}

.legend-dot.legend-owner {
    box-shadow: inset 0 0 0 2px var(--color-brand-secondary);
}

.legend-dot.legend-both {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success) 50%, var(--color-brand-secondary) 50%, var(--color-brand-secondary) 100%);
}

.legend-dot.legend-requested {
    box-shadow: inset 0 0 0 2px var(--color-warning);
}

.legend-dot.legend-closed {
    box-shadow: inset 0 0 0 2px var(--color-text-muted);
}

.legend-dot.legend-feedback {
    box-shadow: inset 0 0 0 2px #7C3AED;
}

.legend-dot.legend-cancelled {
    box-shadow: inset 0 0 0 2px #7F1D1D;
}

/* Day Schedule */
.day-schedule {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.day-schedule-header {
    margin-bottom: 16px;
}

.day-schedule-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.day-schedule-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Time Slot */
.time-slot {
    display: flex;
    gap: 12px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--color-border);
    align-items: flex-start;
}

.time-slot.role-assigned {
    border-left: 4px solid var(--color-success);
}

.time-slot.role-owner {
    border-left: 4px solid var(--color-brand-secondary);
}

.time-slot.role-both {
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, var(--color-success) 50%, var(--color-brand-secondary) 50%) 1;
}

.time-slot-time {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    background: var(--color-bg-card);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.time-slot-info {
    flex: 1;
    min-width: 0;
}

.time-slot-system {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.time-slot-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    word-break: break-word;
}

.time-slot-id {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--color-brand-primary);
    background: var(--color-bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.time-slot-id:hover {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.time-slot-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* ==========================================================================
   Glass Theme - Calendar Styles
   ========================================================================== */

[data-style="glass"] .view-toggle {
    background: rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .view-btn {
    color: rgba(255, 255, 255, 0.7);
}

[data-style="glass"] .view-btn:hover {
    color: #ffffff;
}

[data-style="glass"] .view-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

[data-style="glass"] .calendar-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

[data-style="glass"] .calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

[data-style="glass"] .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

[data-style="glass"] .calendar-title {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .calendar-view-toggle {
    background: rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .calendar-view-btn {
    color: rgba(255, 255, 255, 0.7);
}

[data-style="glass"] .calendar-view-btn:hover {
    color: #ffffff;
}

[data-style="glass"] .calendar-view-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

[data-style="glass"] .calendar-weekday {
    color: rgba(255, 255, 255, 0.6);
}

[data-style="glass"] .calendar-day {
    background: rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .calendar-day:not(.empty):hover {
    background: rgba(255, 255, 255, 0.25);
}

[data-style="glass"] .calendar-day.today {
    border-color: rgba(255, 255, 255, 0.6);
}

[data-style="glass"] .calendar-day.selected {
    background: rgba(255, 255, 255, 0.4);
}

[data-style="glass"] .calendar-day.has-duty {
    background: rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .day-number {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .calendar-week-day {
    background: rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .calendar-week-day:hover {
    background: rgba(255, 255, 255, 0.25);
}

[data-style="glass"] .calendar-week-day.selected {
    background: rgba(255, 255, 255, 0.4);
}

[data-style="glass"] .week-day-name {
    color: rgba(255, 255, 255, 0.6);
}

[data-style="glass"] .week-day-date {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .duty-count {
    color: rgba(255, 255, 255, 0.7);
}

[data-style="glass"] .calendar-legend {
    border-top-color: rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .legend-item {
    color: rgba(255, 255, 255, 0.8);
}

[data-style="glass"] .day-schedule {
    border-top-color: rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .day-schedule-header h3 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .time-slot {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .time-slot-time {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

[data-style="glass"] .time-slot-system {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-style="glass"] .time-slot-desc {
    color: rgba(255, 255, 255, 0.8);
}

[data-style="glass"] .time-slot-id {
    background: rgba(255, 255, 255, 0.2);
    color: #7dd3fc;
}

[data-style="glass"] .time-slot-id:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* ==========================================================================
   Drawer Component
   ========================================================================== */

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    right: -100%;
    top: 0;
    bottom: 0;
    width: 90%;
    max-width: 400px;
    background: var(--color-bg-primary);
    z-index: 9999;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.drawer-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
}

.drawer-close:hover {
    background: var(--color-error-soft);
    color: var(--color-error);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* ==========================================================================
   History Timeline
   ========================================================================== */

.history-loading,
.history-empty,
.history-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.history-error {
    color: var(--color-error);
}

.history-timeline {
    position: relative;
}

.history-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 20px;
}

/* Line connecting to next item - only shown if not the last item */
.history-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.history-item:last-child {
    padding-bottom: 0;
}

.history-item-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-brand-primary);
    border: 2px solid var(--color-bg-primary);
    box-shadow: 0 0 0 2px var(--color-brand-primary);
}

.history-item-content {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.history-action {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.history-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.history-author {
    font-size: 0.85rem;
    color: var(--color-brand-primary);
    margin-bottom: 8px;
}

.history-changes {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

.history-change {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.history-change:last-child {
    margin-bottom: 0;
}

.history-field {
    color: var(--color-text-muted);
}

.history-old {
    text-decoration: line-through;
    color: var(--color-error);
}

.history-new {
    color: var(--color-success);
    font-weight: 500;
}

.history-notes {
    margin: 4px 0 0 0;
    padding: 8px;
    background: var(--color-bg-secondary);
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Card Row Muted Style
   ========================================================================== */

.card-row-muted {
    opacity: 0.7;
}

.card-row-muted .card-label,
.card-row-muted .card-value {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Icon Button Style
   ========================================================================== */

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

.btn-icon-primary {
    background: rgba(0, 91, 255, 0.1);
    color: var(--color-cta);
}

.btn-icon-primary:hover {
    background: var(--color-cta);
    color: var(--color-text-inverse);
}

.btn-icon-danger {
    background: var(--color-error-soft);
    color: var(--color-error);
}

.btn-icon-danger:hover {
    background: var(--color-error);
    color: var(--color-text-inverse);
}

.btn-icon-success {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.btn-icon-success:hover {
    background: var(--color-success);
    color: var(--color-text-inverse);
}

/* Form Actions Layout */
.form-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Overlap Warning Checkbox */
.overlap-warning {
    background: var(--color-error-soft);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 16px;
}

.overlap-warning .checkbox-label {
    color: var(--color-error);
    font-weight: 500;
}

.overlap-warning .checkbox-label span {
    color: var(--color-text-primary);
    font-weight: 400;
}

.short-notice-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #F59E0B;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 16px;
}

.short-notice-warning .checkbox-label {
    color: #D97706;
    font-weight: 500;
}

.short-notice-warning .checkbox-label span {
    color: var(--color-text-primary);
    font-weight: 400;
}

/* ==========================================================================
   Card Actions
   ========================================================================== */

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

/* ==========================================================================
   Dark Theme Drawer Styles
   ========================================================================== */

[data-theme="dark"] .drawer {
    background: var(--color-bg-primary);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .drawer-close {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .history-item-content {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .history-item-dot {
    border-color: var(--color-bg-primary);
}

/* ==================== ADMIN STYLES ==================== */

.admin-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.stat-section {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.stat-section-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Bot Info styles */
.bot-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    gap: 12px;
}

.bot-info-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.bot-info-value {
    color: var(--color-text-primary);
    font-size: 0.875rem;
    text-align: right;
    word-break: break-all;
}

.bot-info-url {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Consolas, monospace;
    font-size: 0.75rem;
    background: var(--color-bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
}

.bot-info-error {
    color: var(--color-error);
    font-size: 0.75rem;
}

/* Status badges for bot info */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dev {
    background: var(--color-warning);
    color: #000;
}

.status-prod {
    background: var(--color-success);
    color: #fff;
}

.status-available {
    background: var(--color-success);
    color: #fff;
}

.status-unavailable {
    background: var(--color-error);
    color: #fff;
}

.status-unknown {
    background: var(--color-text-muted);
    color: #fff;
}

.admin-user-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.admin-user-card.banned {
    background: rgba(var(--danger-rgb), 0.1);
    border-color: var(--danger-color);
}

.admin-user-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.admin-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-user-id {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: auto;
}

.admin-user-id.clickable-id {
    cursor: pointer;
    transition: color 0.2s ease;
}

.admin-user-id.clickable-id:hover {
    color: var(--color-primary);
}

.admin-user-id.clickable-id:active {
    opacity: 0.7;
}

.admin-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.admin-user-roles {
    font-size: 12px;
    color: var(--primary-color);
}

.admin-user-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-user-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.admin-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.admin-user-action-inline {
    flex-shrink: 0;
}

/* Collapsible card */
.card-collapsible {
    display: block;
}

.card-collapsible > summary {
    list-style: none;
    list-style-type: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-collapsible > summary::-webkit-details-marker {
    display: none !important;
}

.card-collapsible > summary::marker {
    display: none !important;
    content: none !important;
}

.card-collapsible > summary::before {
    display: none !important;
}

.card-collapsible > summary h3 {
    margin: 0;
    white-space: nowrap;
}

.collapse-icon {
    font-size: 18px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.card-collapsible[open] .collapse-icon {
    transform: rotate(90deg);
}

.card-body-collapsible {
    margin-top: 16px;
}

/* Admin chats list */
.admin-chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.admin-chat-item:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.admin-chat-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-chat-title {
    font-weight: 500;
    color: var(--text-primary);
}

.admin-chat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-chat-members {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-chat-arrow {
    font-size: 18px;
    color: var(--text-muted);
}

/* Chat members in drawer */
.chat-members-header {
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.chat-members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.chat-member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-member-name {
    font-weight: 500;
    color: var(--text-primary);
}

.chat-member-fullname {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-small {
    padding: 2px 6px;
    font-size: 10px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger-color);
}

.badge-muted {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-danger:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Clickable badge */
.badge-clickable {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.badge-clickable:hover {
    opacity: 0.85;
}

.badge-clickable:active {
    transform: scale(0.95);
}

/* User chats popup */
.user-chats-popup {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    max-width: 320px;
    z-index: 1000;
    overflow: hidden;
    animation: popupFadeIn 0.15s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
}

.popup-header::before {
    content: '👤';
    font-size: 14px;
    flex-shrink: 0;
}

.popup-loading,
.popup-empty,
.popup-error {
    padding: 20px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    background-color: var(--color-bg-primary);
}

.popup-loading::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-brand-primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: popupSpin 0.8s linear infinite;
}

@keyframes popupSpin {
    to { transform: rotate(360deg); }
}

.popup-empty::before {
    content: '📭';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.popup-error {
    color: var(--color-error);
}

.popup-error::before {
    content: '⚠️';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.popup-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
    background-color: var(--color-bg-primary);
}

.popup-list-item {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color var(--transition-fast);
}

.popup-list-item::before {
    content: '💬';
    font-size: 14px;
    flex-shrink: 0;
}

.popup-list-item:hover {
    background-color: var(--color-bg-secondary);
}

/* ==========================================================================
   Fullscreen Messages (Banned, Access Denied, etc.)
   ========================================================================== */

.fullscreen-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
    background-color: var(--color-bg-primary);
}

.fullscreen-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.fullscreen-title {
    margin-bottom: 10px;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.fullscreen-text {
    color: var(--color-text-secondary);
    max-width: 300px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.fullscreen-actions {
    margin-bottom: 24px;
}

.fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 44px;
    padding: 0 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.fullscreen-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.fullscreen-btn .btn-icon {
    width: 24px;
    height: 24px;
}

.fullscreen-note {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    max-width: 280px;
    line-height: 1.5;
}

.fullscreen-form {
    width: 100%;
    max-width: 400px;
    text-align: left;
}

.fullscreen-form-title {
    color: var(--color-text-primary);
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.fullscreen-form-subtitle {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.fullscreen-form-status {
    margin-top: 12px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.fullscreen-form-status.error {
    color: var(--color-error);
}

.fullscreen-status {
    margin-top: 20px;
    text-align: center;
}

.fullscreen-status-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.fullscreen-status-text {
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.fullscreen-status-success {
    color: var(--color-success);
}

/* ==========================================================================
   Info Tooltip Component
   ========================================================================== */

.section-title-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    margin-bottom: 12px;
}

.section-title-with-info h2,
.section-title-with-info h3 {
    margin: 0;
}

.info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.info-btn:hover {
    opacity: 1;
}

.info-btn img {
    width: 18px;
    height: 18px;
}

.info-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 8px;
}

.info-tooltip.info-tooltip-top {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 8px;
}

.info-tooltip.hidden {
    display: none;
}

.info-tooltip-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-primary);
}

.info-tooltip-content p {
    margin: 0 0 12px 0;
}

.info-tooltip-content p:last-child {
    margin-bottom: 0;
}

.info-tooltip-content strong {
    color: var(--color-text-primary);
}

.info-tooltip-content ul {
    margin: 8px 0 12px 0;
    padding-left: 20px;
}

.info-tooltip-content li {
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.info-tooltip-content li:last-child {
    margin-bottom: 0;
}

/* Dark theme adjustments */
[data-theme="dark"] .info-tooltip-content {
    background: var(--color-bg-secondary);
    border-color: var(--color-border);
}

/* Settings label with info button */
.settings-label-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.settings-label-with-info .settings-label {
    margin-bottom: 0;
}

.settings-label-with-info .info-tooltip {
    left: 0;
    right: auto;
    width: calc(100vw - 32px);
    max-width: 400px;
}

/* Adjust tooltip for section headers with toggle */
.section-header.with-toggle .section-title-with-info {
    flex: 1;
}

.section-header.with-toggle .info-tooltip {
    width: calc(100vw - 32px);
    max-width: 400px;
}

/* =====================
   Linked Accounts
   ===================== */

.linked-accounts-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--color-border);
}

.linked-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.linked-account-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.linked-account-item:first-child {
    padding-top: 0;
}

.linked-account-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.provider-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.provider-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.linked-account-info {
    flex: 1;
    min-width: 0;
}

.linked-account-login {
    font-size: 0.875rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.linked-account-status {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.linked-account-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    text-align: center;
    padding: 12px;
}

/* Small button variant */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
    min-height: auto;
}

/* Glass style for linked accounts */
[data-style="glass"] .linked-accounts-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

[data-style="glass"] .linked-account-item {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .provider-name,
[data-style="glass"] .linked-account-login {
    color: #ffffff;
}

[data-style="glass"] .linked-account-status {
    color: rgba(255, 255, 255, 0.7);
}

/* Stored data linked accounts list */
.stored-data-accounts {
    margin-top: 8px;
    margin-bottom: 4px;
}

.stored-data-accounts-list {
    margin: 4px 0 0 16px;
    padding: 0;
    font-size: 0.8125rem;
}

.stored-data-accounts-list li {
    margin-bottom: 2px;
}

/* ==========================================================================
   Config Drawer Styles
   ========================================================================== */

/* Header actions group */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Config category */
.config-category {
    margin-bottom: 20px;
}

.config-category:last-child {
    margin-bottom: 0;
}

.config-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

/* Config items list */
.config-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Single config item */
.config-item {
    background: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 10px 12px;
}

.config-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
}

.config-name-with-info {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    flex: 1;
    min-width: 0;
}

.config-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Config info button */
.config-info-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.config-info-btn:hover {
    opacity: 1;
}

.config-info-btn img {
    width: 14px;
    height: 14px;
}

/* Config tooltip */
.config-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    z-index: 1000;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 320px;
}

.config-tooltip-content {
    padding: 12px;
}

.config-tooltip-content p {
    margin: 0 0 8px 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.config-tooltip-content p:last-child {
    margin-bottom: 0;
}

.config-tooltip-content p strong {
    color: var(--color-text-primary);
}

.config-tooltip-content code {
    background: var(--color-bg-tertiary);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.config-tooltip-default {
    color: var(--color-text-muted) !important;
    font-size: 0.75rem !important;
}

.config-tooltip-status {
    font-size: 0.75rem !important;
    font-style: italic;
}

/* Config badges */
.config-badge {
    font-size: 0.6875rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.config-badge-default {
    background: var(--color-bg-tertiary);
    color: var(--color-text-muted);
}

.config-badge-custom {
    background: var(--color-success-soft);
    color: var(--color-success);
}

/* Config value display */
.config-value {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    word-break: break-word;
}

.config-value-secret {
    font-family: monospace;
    letter-spacing: 0.5px;
}

.config-value-null {
    color: var(--color-text-muted);
    font-style: italic;
}

.config-value-empty {
    color: var(--color-text-muted);
    font-style: italic;
}

.config-value-bool-true {
    color: var(--color-success);
    font-weight: 500;
}

.config-value-bool-false {
    color: var(--color-text-muted);
}

.config-value-number {
    color: var(--color-primary);
    font-family: monospace;
}

/* Dark theme adjustments */
[data-theme="dark"] .config-item {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .config-tooltip {
    background: var(--color-bg-secondary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .config-name {
    background: var(--color-bg-tertiary);
}

/* Glass style for config drawer */
[data-style="glass"] .config-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-style="glass"] .config-tooltip {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-style="glass"] .config-name {
    background: rgba(255, 255, 255, 0.1);
}

[data-style="glass"] .config-badge-default {
    background: rgba(255, 255, 255, 0.1);
}
