/* ===================================
   Phase 5: Premium Features Styles - Cyberpunk Fairy
   =================================== */

/* ===============================
   Hero Section - Landing Page - Cyberpunk
   =============================== */
.hero-section {
    background: linear-gradient(135deg, var(--fg) 0%, var(--fg-2) 50%, var(--primary) 100%);
    color: white; /* design-spec: text on dark fg-to-primary hero gradient */
    padding: 80px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 10px 40px var(--primary-glow);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="%2306b6d4" fill-opacity="0.2"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-section .hero-alva {
    position: absolute;
    top: 40px;
    right: 60px;
    opacity: 0.15;
    animation: float 3s ease-in-out infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1; /* local stacking-context */
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-actions .btn {
    margin-right: 15px;
    margin-bottom: 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
}

.hero-image {
    position: relative;
    z-index: 1; /* local stacking-context */
    animation: fadeIn 1s ease-out 0.4s both;
}

.hero-image img {
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-overlay);
}

.hero-icon {
    font-size: 15rem;
    color: rgb(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero-icon {
    color: rgb(255, 255, 255, 0.1);
}

/* ===============================
   Dashboard Widgets
   =============================== */
.stat-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 25px;
    box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05); /* design-spec: premium feature card faint singular shadow */
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.2;
    font-size: 20px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--primary-tint), 0 0 10px var(--primary-glow), 0 0 20px var(--primary-tint);
    border-color: var(--primary);
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.stat-card-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--on-primary);
    box-shadow: 0 0 10px var(--primary-glow), 0 0 20px var(--primary-tint);
}

.stat-card-icon.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-strong) 100%);
    color: var(--on-success);
    box-shadow: 0 0 10px var(--success-glow), 0 0 20px var(--success-glow);
}

.stat-card-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning) 100%);
    color: var(--on-warning);
    box-shadow: 0 0 15px rgb(var(--warning-rgb), 0.4);
}

.stat-card-icon.bg-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger) 100%);
    color: var(--on-danger);
    box-shadow: 0 0 15px rgb(var(--danger-rgb), 0.4);
}

.stat-card-icon.bg-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--on-primary);
    box-shadow: 0 0 10px var(--primary-glow), 0 0 20px var(--primary-tint);
}

.stat-card-title {
    font-size: 0.85rem;
    color: var(--fg-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 5px;
}

.stat-card-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-card-change.positive {
    color: var(--success);
}

.stat-card-change.negative {
    color: var(--danger);
}

/* ===============================
   Widget Cards
   =============================== */
.widget-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 25px;
    box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05); /* design-spec: premium feature card faint singular shadow */
    border: 2px solid var(--border);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.widget-card:hover::before {
    opacity: 1;
}

.widget-card:hover {
    box-shadow: 0 5px 15px var(--primary-tint), 0 0 10px var(--primary-glow), 0 0 20px var(--primary-tint);
    border-color: var(--primary);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fg);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-actions {
    display: flex;
    gap: 10px;
}

.widget-action {
    background: transparent;
    border: none;
    color: var(--fg-2);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    transition: all 0.2s ease;
}

.widget-action:hover {
    background: var(--bg);
    color: var(--fg);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* ===============================
   Activity Feed
   =============================== */
.activity-feed {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

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

.activity-item:hover {
    background: var(--bg);
    margin: 0 -10px;
    padding: 15px 10px;
    border-radius: var(--r-lg);
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-icon.icon-primary {
    background: var(--primary-tint);
    color: var(--primary);
}

.activity-icon.icon-success {
    background: var(--success-glow);
    color: var(--success);
}

.activity-icon.icon-warning {
    background: var(--warning-glow);
    color: var(--warning);
}

.activity-icon.icon-danger {
    background: var(--danger-glow);
    color: var(--danger);
}

.activity-icon.icon-info {
    background: var(--primary-tint);
    color: var(--primary);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.activity-description {
    color: var(--fg-2);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.activity-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--fg-3);
}

.activity-time,
.activity-user {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===============================
   Quick Actions
   =============================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-action-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-tint);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgb(0, 0, 0, 0.1); /* design-spec: premium tier card medium singular shadow */
    text-decoration: none;
    color: var(--primary);
}

.quick-action-icon {
    font-size: 2rem;
}

.quick-action-label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===============================
   Feature Cards (Landing Page)
   =============================== */
.feature-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05); /* design-spec: premium feature card faint singular shadow */
    transition: all 0.3s ease;
    border: 1px solid rgb(0, 0, 0, 0.05); /* design-spec: premium card hairline border tint */
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgb(0, 0, 0, 0.1); /* design-spec: premium pricing card singular hover lift */
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.feature-icon.bg-primary {
    background: var(--brand-gradient);
    color: var(--on-primary);
}

.feature-icon.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-strong) 100%);
    color: var(--on-success);
}

.feature-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-strong) 100%);
    color: var(--on-warning);
}

.feature-icon.bg-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--on-primary);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--fg-2);
    line-height: 1.6;
}

/* ===============================
   Steps Component
   =============================== */
.steps-container {
    position: relative;
}

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.step-item::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: -30px;
    width: 2px;
    background: var(--brand-gradient);
    opacity: 0.3;
}

.step-item:last-child::before {
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 5px 15px var(--primary-glow);
}

.step-content {
    flex: 1;
    padding-top: 8px;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 8px;
}

.step-description {
    color: var(--fg-2);
    line-height: 1.6;
}

/* ===============================
   Testimonials
   =============================== */
.testimonial-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 30px;
    box-shadow: 0 2px 10px rgb(0, 0, 0, 0.05); /* design-spec: premium feature card faint singular shadow */
    border: 1px solid rgb(0, 0, 0, 0.05); /* design-spec: premium card hairline border tint */
    height: 100%;
}

.testimonial-content {
    font-style: italic;
    color: var(--fg-2);
    margin-bottom: 20px;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 3px;
}

.testimonial-position {
    font-size: 0.85rem;
    color: var(--fg-2);
}

/* ===============================
   Animations
   =============================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .chart-container {
        height: 250px;
    }

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

@media (max-width: 575.98px) {
    .hero-section {
        padding: 40px 0;
    }

    .stat-card {
        padding: 15px;
    }

    .widget-card {
        padding: 15px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   Dark Mode Support (for later)
   =============================== */
/* To be implemented in Paket C */

/* ===============================
   Paket B: Quick View & Global Search
   =============================== */

/* ===============================
   Global Search Modal — Aurora-Refactor
   Spec 1-6: Cyber-frame ticks, fa-kbd legend, accent hit-highlight,
   brand-gradient bar, Aurora status-pills, Alva-spark footer.
   =============================== */
.global-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0, 0, 0, 0.5); /* design-spec: premium modal backdrop scrim */
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-start;
    padding-top: 10vh;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.global-search-modal.show {
    animation: fadeIn 0.2s ease-out;
}

.global-search-container {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-overlay);
    max-width: 600px;
    width: 90%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideInDown 0.3s ease-out;
}

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

.global-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 2px solid var(--border);
}

.global-search-header i {
    font-size: 1.2rem;
}

/* ── Spec 1: Cyber-frame wrapper with 4-corner tick-markers ── */
.global-search-input-frame {
    position: relative;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: border-color var(--t-fast, 150ms) ease-out,
                box-shadow var(--t-fast, 150ms) ease-out;
}

.global-search-input-frame:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 4-corner tick elements — mirrors .fa-cyber-input__tick pattern */
.gs-tick {
    position: absolute;
    width: 6px;
    height: 6px;
    pointer-events: none;
    border-color: var(--primary);
    opacity: 0.6;
    transition: opacity var(--t-fast, 150ms) ease-out;
}

.gs-tick--tl { top: -1px; left: -1px;     border-top:    1px solid; border-left:  1px solid; }
.gs-tick--tr { top: -1px; right: -1px;    border-top:    1px solid; border-right: 1px solid; }
.gs-tick--bl { bottom: -1px; left: -1px;  border-bottom: 1px solid; border-left:  1px solid; }
.gs-tick--br { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }

.global-search-input-frame:focus-within .gs-tick { opacity: 1; }

.global-search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 8px 12px;
    color: var(--fg);
    background: transparent;
    border-radius: var(--r-md);
}

.global-search-input::placeholder {
    color: var(--fg-2);
}

/* ── Spec 2: Inline fa-kbd legend — remove legacy kbd override,
   .fa-kbd class from fairy-aurora-components.css handles styling ── */
.global-search-shortcuts {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--fg-2);
    white-space: nowrap;
}

/* Neutralize any residual browser-default kbd inside shortcuts;
   .fa-kbd already provides correct Aurora styling */
.global-search-shortcuts kbd:not(.fa-kbd) {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 2px 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
}

.global-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.search-category {
    margin-bottom: 20px;
}

.search-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fg-2);
    background: var(--bg);
    border-radius: var(--r-sm);
    margin-bottom: 8px;
}

.search-category-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Spec 4: 2-px brand-gradient bar left, primary-glow halo on hover/select ── */
.search-result-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 16px; /* extra-left to clear the ::before bar */
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--fg);
    transition: background var(--t-fast, 150ms) ease-out,
                box-shadow var(--t-fast, 150ms) ease-out,
                color var(--t-fast, 150ms) ease-out,
                transform var(--t-fast, 150ms) ease-out;
    overflow: hidden;
}

/* 2-px gradient bar on left edge */
.search-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--t-fast, 150ms) ease-out;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--primary-tint);
    color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 0 24px color-mix(in oklab, var(--primary) 30%, transparent);
}

.search-result-item:hover::before,
.search-result-item.selected::before {
    opacity: 1;
}

/* ── Spec 4: Icon-tile 48×48 (was 40×40) ── */
.search-result-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-icon);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

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

.search-result-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Spec 3: Aurora accent-tint hit-highlight (replaces Bootstrap warning yellow) ── */
.search-result-title mark {
    background: color-mix(in oklab, var(--accent) 25%, transparent);
    color: inherit;
    padding: 0 2px;
    border-radius: 4px;
}

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

.search-result-description mark {
    background: color-mix(in oklab, var(--accent) 25%, transparent);
    color: inherit;
    padding: 0 2px;
    border-radius: 4px;
}

/* ── Spec 5: Aurora-tokenized status-pills in results (replaces generic Bootstrap) ── */
.search-result-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 100px;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-result-status--warning {
    background: var(--warning-glow);
    color: var(--warning-text);
    border-color: var(--warning);
}

.search-result-status--success {
    background: var(--success-glow);
    color: var(--success);
    border-color: var(--success);
}

.search-result-status--neutral {
    background: var(--surface-2);
    color: var(--fg-2);
    border-color: var(--border);
}

.search-loading,
.search-empty,
.search-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

/* ── Spec 6: Footer — Alva-spark left + mono brand-marker right ── */
.global-search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-bottom-left-radius: var(--r-xl);
    border-bottom-right-radius: var(--r-xl);
}

.gs-footer-alva {
    display: inline-flex;
    align-items: center;
}

.gs-alva-spark {
    display: block;
    opacity: 0.75;
    transition: opacity var(--t-fast, 150ms) ease-out;
}

.global-search-footer:hover .gs-alva-spark {
    opacity: 1;
}

.gs-footer-brand {
    /* inherits .fa-mono-label from fairy-aurora-components.css */
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Trigger button — keep fa-kbd styling; no additional override needed */
.global-search-trigger kbd:not(.fa-kbd) {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--r-sm);
}

/* ===============================
   Quick View Modal
   =============================== */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0, 0, 0, 0.5); /* design-spec: premium modal backdrop scrim */
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.quick-view-modal.show {
    animation: fadeIn 0.2s ease-out;
}

.quick-view-container {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-overlay);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quick-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--border);
}

.quick-view-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fg);
}

.quick-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.quick-view-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.quick-view-footer kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.75rem;
}

/* Preview Content Styles */
.preview-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-section {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.preview-section:last-of-type {
    border-bottom: none;
}

.preview-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cia-badge {
    text-align: center;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--r-lg);
}

.cia-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.cia-label {
    font-size: 0.75rem;
    color: var(--fg-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.stat-mini {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--r-lg);
}

.stat-mini-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
}

.stat-mini-label {
    font-size: 0.75rem;
    color: var(--fg-2);
    margin-top: 4px;
}

.risk-metric {
    text-align: center;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--r-lg);
}

.risk-metric-label {
    font-size: 0.75rem;
    color: var(--fg-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.risk-metric-value {
    font-size: 2rem;
    font-weight: 700;
}

.risk-metric-detail {
    font-size: 0.85rem;
    color: var(--fg-2);
    margin-top: 4px;
}

.preview-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===============================
   Filter Presets
   =============================== */
.filter-presets {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgb(0, 0, 0, 0.05); /* design-spec: premium section card very faint shadow */
    border: 1px solid rgb(0, 0, 0, 0.05); /* design-spec: premium card hairline border tint */
}

.filter-presets-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--fg);
    margin-bottom: 12px;
}

.filter-presets-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-preset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r-lg);
    font-size: 0.85rem;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-preset-btn:hover {
    border-color: var(--primary);
    background: var(--primary-tint);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.filter-preset-btn.active {
    border-color: var(--primary);
    background: var(--brand-gradient);
    color: var(--on-primary);
}

.filter-preset-btn.active i {
    color: var(--on-primary) !important;
}

.filter-preset-clear {
    border-color: var(--danger);
    color: var(--danger);
}

.filter-preset-clear:hover {
    background: var(--danger);
    color: var(--on-danger);
    border-color: var(--danger);
}

.filter-preset-clear:hover i {
    color: var(--on-danger) !important;
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 767.98px) {
    .global-search-container {
        width: 95%;
        max-height: 80vh;
    }

    .global-search-shortcuts {
        display: none;
    }

    .quick-view-container {
        max-width: 100%;
        max-height: 90vh;
    }

    .filter-presets-items {
        gap: 6px;
    }

    .filter-preset-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

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

    .preview-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .global-search-modal {
        padding-top: 5vh;
    }

    .global-search-container {
        border-radius: var(--r-xl) 12px 0 0;
        max-height: 85vh;
    }

    .filter-presets {
        padding: 12px 15px;
    }
}

/* ===============================
   Paket C: Dark Mode & Preferences
   =============================== */

/* ===============================
   Preferences Modal
   =============================== */
.preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(10, 14, 26, 0.5);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.preferences-modal.show {
    animation: fadeIn 0.2s ease-out;
}

.preferences-container {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;
}

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

.preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}

.preferences-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preferences-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.preference-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.preference-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.preference-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preferences-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===============================
   Notification Center
   =============================== */
.notification-center-panel {
    position: relative;
    z-index: var(--z-popover-modal); /* above sibling backdrop */
}

/* Header version of notification bell button */
.notification-bell-btn-header {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(255, 255, 255, 0.1);
    border: 1px solid rgb(255, 255, 255, 0.2);
    color: white; /* design-spec: glass button on dark nav header */
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-bell-btn-header:hover {
    background: rgb(255, 255, 255, 0.2);
    border-color: rgb(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Keep old style for fixed position (if needed elsewhere) */
.notification-bell-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-bell-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    border-color: var(--fg);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--on-danger);
    border-radius: var(--r-xl);
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.notification-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgb(10, 14, 26, 0.5);
    z-index: var(--z-modal-backdrop);
    backdrop-filter: blur(5px);
}

.notification-panel.show .notification-panel-container {
    animation: slideInRight 0.3s ease-out;
}

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

.notification-panel-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}

.notification-panel-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-panel-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-radius: var(--r-lg);
    margin-bottom: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-item.unread {
    background: linear-gradient(135deg, rgb(102, 126, 234, 0.05) 0%, rgb(118, 75, 162, 0.05) 100%);
    border-left: 3px solid var(--fg);
}

.notification-item:hover {
    background: var(--bg);
    transform: translateX(-5px);
    box-shadow: var(--shadow-sm);
}

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

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

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 5px;
}

.notification-title {
    color: var(--fg);
    font-size: 0.9rem;
}

.notification-time {
    color: var(--fg-3);
    font-size: 0.75rem;
    white-space: nowrap;
}

.notification-message {
    color: var(--fg-2);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.notification-link {
    color: var(--fg);
    font-size: 0.85rem;
    text-decoration: none;
}

.notification-link:hover {
    text-decoration: underline;
}

.notification-delete {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--fg-3);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-delete:hover {
    background: var(--bg-danger);
    color: var(--on-danger);
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--fg-3);
}

/* ===============================
   View Density Styles
   =============================== */
[data-density="compact"] {
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
}

[data-density="comfortable"] {
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
}

[data-density="compact"] .stat-card,
[data-density="compact"] .widget-card {
    padding: 15px;
}

[data-density="compact"] .nav a {
    padding: 8px 15px;
}

[data-density="compact"] table td,
[data-density="compact"] table th {
    padding: 8px;
}

/* ===============================
   Animation Preferences
   =============================== */
[data-animations="disabled"] * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 767.98px) {
    .notification-center {
        top: 15px;
        right: 15px;
    }

    .notification-panel-container {
        width: 100vw;
        max-width: 100vw;
    }

    .preferences-container {
        max-width: 100%;
        max-height: 90vh;
    }
}

@media (max-width: 575.98px) {
    .notification-bell-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .theme-toggle {
        bottom: 15px;
        right: 15px;
    }

    .theme-toggle-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
