/* KASAKAI Intranet Styles */
/* Brand colors based on kasakai.eu */

/* Hide ONLY Google One Tap popup (not the button) */
#credential_picker_container,
#credential_picker_iframe,
[id^="credential_picker"] {
    display: none !important;
}

/* Google Sign-In Button Container */
.google-btn-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    min-height: 44px;
}

/* ===== CSS Variables - Light Mode ===== */
:root {
    /* Brand Colors */
    --primary: #073537;
    --primary-light: #0a4a4d;
    --primary-dark: #052526;
    --accent: #af8f61;
    --accent-light: #c4a87a;
    --accent-dark: #8a7250;

    /* Neutral Colors */
    --background: #ffffff;
    --surface: #f9fafb;
    --surface-hover: #f3f4f6;
    --border: #e5e7eb;
    --border-dark: #d1d5db;

    /* Text Colors */
    --text: #3a3a3a;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --text-inverse: #ffffff;

    /* Status Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    /* Spacing */
    --sidebar-width: 220px;
    --sidebar-collapsed: 64px;
    --header-height: 56px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Modal overlay */
    --overlay: rgba(0, 0, 0, 0.5);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --primary: #0d5c5f;
    --primary-light: #0f7a7e;
    --primary-dark: #073537;
    --accent: #c4a87a;
    --accent-light: #d4bc94;
    --accent-dark: #af8f61;

    --background: #111827;
    --surface: #1f2937;
    --surface-hover: #374151;
    --border: #374151;
    --border-dark: #4b5563;

    --text: #f9fafb;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    --text-inverse: #111827;

    --success-bg: #064e3b;
    --warning-bg: #78350f;
    --danger-bg: #7f1d1d;
    --info-bg: #1e3a8a;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);

    --overlay: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .sidebar {
    background: #0d1117;
}

[data-theme="dark"] .login-page {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--surface);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Modern Minimalist */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-logo img {
    height: 28px;
    width: auto;
}

.sidebar-logo span {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition);
    border-left: 2px solid transparent;
    font-size: 0.875rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
    border-left-color: var(--accent);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item span {
    font-size: 0.8125rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 0.875rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .nav-item {
    padding: 0.5rem 0;
    font-size: 0.8125rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header - Modern Minimalist */
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--background);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.header-notifications {
    position: relative;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text-muted);
}

.header-notifications:hover {
    background: var(--surface);
    color: var(--text);
}

.header-notifications svg {
    width: 18px;
    height: 18px;
}

.header-notifications .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.user-menu:hover {
    background: var(--surface);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 500;
    font-size: 0.8125rem;
}

.user-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Content Area */
.content {
    flex: 1;
    padding: 1.5rem;
}

/* ===== Components ===== */

/* Cards - Modern Minimalist */
.card {
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* Quick Links Grid - Modern Minimalist */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--background);
    border-radius: var(--radius);
    box-shadow: none;
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
}

.quick-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
    background: var(--surface);
}

.quick-link-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.quick-link-icon svg {
    width: 18px;
    height: 18px;
}

.quick-link-label {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dashboard-grid .card.full { grid-column: span 12; }
.dashboard-grid .card.half { grid-column: span 6; }
.dashboard-grid .card.third { grid-column: span 4; }
.dashboard-grid .card.two-thirds { grid-column: span 8; }

/* Embed Container - Modern Minimalist */
.embed-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px dashed var(--border);
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem;
}

.embed-placeholder svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.embed-placeholder p {
    font-size: 0.8125rem;
    margin: 0.25rem 0;
}

/* Buttons - Modern Minimalist */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.btn-outline:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline svg {
    width: 14px;
    height: 14px;
}

.btn-google {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: var(--shadow-sm);
}

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

/* Team Cards - Modern Minimalist */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.team-card {
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.team-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.team-card-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.team-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.team-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.team-card-info h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.team-card-info p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.team-card-body {
    padding: 0 1.25rem 1.25rem;
}

.team-card-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.expertise-tag {
    padding: 0.1875rem 0.5rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.team-card-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.team-card-contacts a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.team-card-contacts a:hover {
    color: var(--primary);
}

.team-card-contacts svg {
    width: 14px;
    height: 14px;
}

/* Procedure List */
.procedure-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.procedure-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.procedure-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.procedure-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.procedure-content {
    flex: 1;
}

.procedure-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.procedure-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1rem;
}

.login-card {
    background: var(--background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    margin-bottom: 2rem;
}

.login-logo img {
    height: 48px;
}

.login-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Error message */
.error-message {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== Utilities ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .dashboard-grid .card.half,
    .dashboard-grid .card.third,
    .dashboard-grid .card.two-thirds {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        padding: 0 1rem;
    }

    .content {
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        display: none;
    }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.menu-toggle:hover {
    background: var(--surface);
}

/* Overlay for mobile menu */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.sidebar-overlay.show {
    display: block;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text);
}

/* ===== Search Modal (Ctrl+K) ===== */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.15s ease;
}

.search-modal.show {
    display: flex;
}

.search-container {
    width: 100%;
    max-width: 560px;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.search-header svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-shortcut {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background var(--transition);
}

.search-result:hover,
.search-result.active {
    background: var(--surface);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.search-result-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.search-footer kbd {
    padding: 0.125rem 0.375rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.6875rem;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--surface);
    color: var(--text);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Header Action Buttons */
.search-btn,
.notifications-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
}

.search-btn:hover,
.notifications-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.notifications-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Input Wrapper */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.search-input-wrapper svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Search Result Selected State */
.search-result.selected {
    background: var(--surface);
}

.search-result-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 0.6875rem;
    color: var(--text-light);
    padding: 0.125rem 0.5rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.search-result mark {
    background: var(--accent-light);
    color: var(--text);
    padding: 0 2px;
    border-radius: 2px;
}

/* Notifications Header */
.notifications-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.mark-all-read:hover {
    background: var(--surface);
}

/* Notification Message */
.notification-message {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Toast Hiding State */
.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

/* ===== Tooltips ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 0.375rem 0.625rem;
    background: var(--text);
    color: var(--background);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

[data-tooltip-position="bottom"]::after {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(4px);
}

[data-tooltip-position="bottom"]:hover::after {
    transform: translateX(-50%) translateY(8px);
}

/* ===== Skeleton Loaders ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-title {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
}

.skeleton-embed {
    height: 200px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Notifications / Toast ===== */
.notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 100;
}

.notifications-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
}

.notifications-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--surface);
}

.notification-item.unread {
    background: var(--info-bg);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info { background: var(--info-bg); color: var(--info); }
.notification-icon.success { background: var(--success-bg); color: var(--success); }
.notification-icon.warning { background: var(--warning-bg); color: var(--warning); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

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

.notification-time {
    font-size: 0.6875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.notifications-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notifications-empty svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1100;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s ease;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.8125rem;
    font-weight: 500;
}

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

.toast-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition);
}

.toast-close:hover {
    color: var(--text);
}

/* ===== Micro Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Hover animations */
.animate-hover {
    transition: transform var(--transition), box-shadow var(--transition);
}

.animate-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--accent);
    color: var(--text-inverse);
}

/* ===== Keyboard Shortcuts Hint ===== */
.shortcuts-hint {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--text);
    color: var(--background);
    font-size: 0.75rem;
    border-radius: var(--radius);
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.shortcuts-hint kbd {
    padding: 0.125rem 0.375rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    margin: 0 0.125rem;
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 300px;
}
