/* ============================================
   SolarMind AI - Unified Theme System
   ============================================ */

/* ============================================
   1. THEME TOKENS (Single Source of Truth)
   ============================================ */
:root {
    /* SolarMind Brand Colors - Purple/Indigo Palette */
    --sm-primary: #5010e0;           /* Primary deep purple */
    --sm-primary-2: #9040d0;          /* Lighter purple */
    --sm-primary-light: #b070e0;      /* Even lighter purple */
    --sm-accent: #b070e0;             /* Purple accent */
    --sm-accent-light: #d1a3f0;       /* Lighter accent */
    --sm-accent-orange: #8020c0;      /* Deep purple variant */

    /* Semantic Colors */
    --sm-success: #198754;
    --sm-danger: #dc3545;
    --sm-warning: #ffc107;
    --sm-info: #0dcaf0;

    /* Backgrounds */
    --sm-bg: #f0f4f8;                 /* Light background */
    --sm-surface: #ffffff;            /* White surface */
    --sm-surface-alt: #f8f9fa;        /* Alternative surface */

    /* Text Colors */
    --sm-text: #1a2a3a;               /* Primary text */
    --sm-text-muted: #5a6a7a;         /* Secondary text */
    --sm-text-light: #8a9aaa;         /* Lighter text */

    /* Borders & Dividers */
    --sm-border: #d0d0e0;
    --sm-border-light: #e8e8f0;

    /* Shadows */
    --sm-shadow-sm: 0 2px 4px rgba(80, 16, 224, 0.08);
    --sm-shadow-md: 0 4px 12px rgba(80, 16, 224, 0.12);
    --sm-shadow-lg: 0 12px 24px rgba(80, 16, 224, 0.15);
    --sm-shadow-glow: 0 4px 20px rgba(176, 112, 224, 0.3);

    /* Gradients */
    --sm-gradient: linear-gradient(135deg, #5010e0 0%, #9040d0 55%, #b070e0 100%);
    --sm-gradient-accent: linear-gradient(135deg, #9040d0 0%, #b070e0 100%);
    --sm-gradient-solar: linear-gradient(135deg, #5010e0 0%, #9040d0 50%, #b070e0 100%);

    /* Border Radius */
    --sm-radius-sm: 8px;
    --sm-radius-md: 12px;
    --sm-radius-lg: 16px;
    --sm-radius-xl: 20px;
    --sm-radius-full: 50%;

    /* Spacing */
    --sm-spacing-xs: 0.5rem;
    --sm-spacing-sm: 0.75rem;
    --sm-spacing-md: 1rem;
    --sm-spacing-lg: 1.5rem;
    --sm-spacing-xl: 2rem;
    --sm-spacing-2xl: 3rem;

    /* Transitions */
    --sm-transition-fast: 0.15s ease;
    --sm-transition-base: 0.25s ease;
    --sm-transition-slow: 0.4s ease;

    /* Font Sizes */
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;

    /* Legacy aliases for compatibility */
    --primary-color: var(--sm-primary);
    --secondary-color: #6c757d;
    --success-color: var(--sm-success);
    --danger-color: var(--sm-danger);
    --warning-color: var(--sm-warning);
    --info-color: var(--sm-info);
    --light-bg: var(--sm-surface-alt);
    --dark-text: var(--sm-text);
    --muted-text: var(--sm-text-muted);
    --accent-color: var(--sm-accent);
    --accent-orange: var(--sm-accent-orange);
    --primary-light: var(--sm-primary-light);
    --bg-light: var(--sm-bg);
    --text-dark: var(--sm-text);
    --border-color: var(--sm-border);
}

/* ============================================
   2. BASE STYLES & TYPOGRAPHY
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--sm-text);
    background-color: var(--sm-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
    padding: var(--sm-spacing-lg);
    animation: fadeIn 0.4s ease;
}

/* Responsive Headings with clamp() */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--sm-text);
    margin-bottom: 0.75rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h5 { font-size: clamp(1rem, 1.8vw, 1.25rem); }
h6 { font-size: clamp(0.9rem, 1.5vw, 1rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--sm-primary);
    text-decoration: none;
    transition: color var(--sm-transition-fast);
}

a:hover {
    color: var(--sm-primary-2);
}

/* ============================================
   3. LAYOUT
   ============================================ */
.container,
.container-fluid {
    max-width: 1400px;
}

section {
    padding: var(--sm-spacing-2xl) 0;
    position: relative;
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* Cards */
.card {
    border: 1px solid var(--sm-border);
    box-shadow: var(--sm-shadow-sm);
    border-radius: var(--sm-radius-lg);
    transition: all var(--sm-transition-base);
    background: var(--sm-surface);
    overflow: hidden;
    max-width: 100%;
}

.card:hover {
    box-shadow: var(--sm-shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: var(--sm-surface-alt);
    border-bottom: 1px solid var(--sm-border);
    padding: var(--sm-spacing-md) var(--sm-spacing-lg);
    font-weight: 600;
}

.card-body {
    padding: var(--sm-spacing-lg);
    font-size: var(--font-size-base);
}

.card-title {
    font-weight: 600;
    color: var(--sm-primary);
    margin-bottom: var(--sm-spacing-sm);
}

/* KPI Cards with background colors */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning,
.card.bg-danger,
.card.bg-secondary {
    border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-info .card-body,
.card.bg-danger .card-body {
    color: white;
}

/* Hover shadow effect */
.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: var(--sm-shadow-md) !important;
}

/* Buttons */
.btn {
    border-radius: var(--sm-radius-sm);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: var(--font-size-base);
    transition: all var(--sm-transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--sm-gradient);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--sm-shadow-md);
    color: white;
}

.btn-outline-primary {
    border-color: var(--sm-primary);
    color: var(--sm-primary);
}

.btn-outline-primary:hover {
    background: var(--sm-primary);
    border-color: var(--sm-primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-lg);
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--sm-text);
    font-size: var(--font-size-base);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    border-radius: var(--sm-radius-sm);
    border: 1px solid var(--sm-border);
    padding: 0.6rem 0.75rem;
    font-size: var(--font-size-base);
    transition: all var(--sm-transition-base);
    background: var(--sm-surface);
    color: var(--sm-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sm-primary-2);
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--sm-text-light);
}

/* Tables */
.table {
    font-size: var(--font-size-sm);
    width: 100%;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--sm-text-muted);
    background: var(--sm-surface-alt);
    border-bottom: 2px solid var(--sm-border);
    white-space: nowrap;
}

.table td {
    font-size: var(--font-size-sm);
    vertical-align: middle;
}

.table-responsive {
    border-radius: var(--sm-radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    border-radius: 6px;
    font-size: 0.75em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--sm-radius-md);
    padding: var(--sm-spacing-md);
    font-size: var(--font-size-base);
    margin-bottom: 1rem;
}

.alert-info { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.alert-success { background: rgba(25, 135, 84, 0.1); color: var(--sm-success); }
.alert-warning { background: rgba(255, 193, 7, 0.1); color: var(--sm-warning); }
.alert-danger { background: rgba(220, 53, 69, 0.1); color: var(--sm-danger); }

/* Modals */
.modal-content {
    border: none;
    box-shadow: var(--sm-shadow-lg);
    border-radius: var(--sm-radius-xl);
    max-width: 100%;
}

.modal-header {
    background: var(--sm-surface-alt);
    border-bottom: 1px solid var(--sm-border);
    border-radius: var(--sm-radius-xl) var(--sm-radius-xl) 0 0;
    padding: var(--sm-spacing-lg);
}

.modal-body {
    padding: var(--sm-spacing-lg);
    font-size: var(--font-size-base);
}

.modal-footer {
    border-top: 1px solid var(--sm-border);
    border-radius: 0 0 var(--sm-radius-xl) var(--sm-radius-xl);
    padding: var(--sm-spacing-md) var(--sm-spacing-lg);
}

/* Navbar Brand & Logo */
.navbar-brand {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    transition: transform var(--sm-transition-base);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--sm-radius-full);
    margin-right: 4px;
}

.status-dot.online { background-color: var(--sm-success); }
.status-dot.offline { background-color: var(--sm-danger); }
.status-dot.warning { background-color: var(--sm-warning); }

/* Code Blocks */
code {
    background-color: var(--sm-surface-alt);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--sm-primary-2);
}

pre {
    background-color: var(--sm-surface-alt);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius-sm);
    padding: var(--sm-spacing-md);
    overflow-x: auto;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--sm-accent);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: var(--sm-spacing-md);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Utility Classes */
.text-primary { color: var(--sm-primary) !important; }
.text-success { color: var(--sm-success) !important; }
.text-danger { color: var(--sm-danger) !important; }
.text-warning { color: var(--sm-warning) !important; }
.text-info { color: var(--sm-info) !important; }
.text-muted { color: var(--sm-text-muted) !important; }

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Reveal class for scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   5. RTL SUPPORT
   ============================================ */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3 {
    margin-left: var(--sm-spacing-sm) !important;
    margin-right: 0 !important;
}

[dir="rtl"] .status-dot {
    margin-right: 0;
    margin-left: 4px;
}

/* Arabic Font */
[lang="ar"] body {
    font-family: 'Segoe UI', Tahoma, 'Cairo', 'Tajawal', sans-serif;
}

[dir="rtl"] .card {
    text-align: right;
}

/* ============================================
   6. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   7. SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sm-surface-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--sm-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sm-text-muted);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--sm-border) var(--sm-surface-alt);
}

/* ============================================
   8. RESPONSIVE DESIGN
   ============================================ */

/* Small Devices (≥ 576px) */
@media (min-width: 576px) {
    main {
        padding: var(--sm-spacing-xl);
    }

    .card-body {
        padding: 1.25rem;
    }
}

/* Medium Devices (≥ 768px) */
@media (min-width: 768px) {
    main {
        padding: var(--sm-spacing-xl);
    }

    .card-body {
        padding: var(--sm-spacing-xl);
    }

    canvas {
        max-height: 280px;
    }
}

/* Large Devices (≥ 992px) */
@media (min-width: 992px) {
    main {
        padding: var(--sm-spacing-2xl) var(--sm-spacing-xl);
    }

    canvas {
        max-height: 320px;
    }
}

/* Extra Large Devices (≥ 1200px) */
@media (min-width: 1200px) {
    main {
        max-width: 1400px;
        margin: 0 auto;
        padding: var(--sm-spacing-2xl);
    }

    canvas {
        max-height: 360px;
    }
}

/* Mobile Specific Adjustments (< 576px) */
@media (max-width: 575.98px) {
    html {
        font-size: 16px; /* Keep 16px base for readability */
    }

    body {
        font-size: 1rem;
    }

    main {
        padding: var(--sm-spacing-sm);
    }

    .container-fluid {
        padding-left: var(--sm-spacing-sm);
        padding-right: var(--sm-spacing-sm);
    }

    .navbar {
        padding: 0.5rem 0 !important;
    }

    .navbar-brand img {
        height: 32px;
    }

    .navbar-brand span {
        display: none;
    }

    .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.85rem;
    }

    .card {
        margin-bottom: var(--sm-spacing-md);
        border-radius: var(--sm-radius-md);
    }

    .card-body {
        padding: var(--sm-spacing-md);
    }

    .card-header {
        padding: var(--sm-spacing-sm) var(--sm-spacing-md);
    }

    .card-title {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9375rem; /* Keep readable on mobile */
        min-height: 44px; /* Touch target size */
    }

    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
        min-height: 40px;
    }

    .table {
        font-size: 0.875rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 0.4rem;
    }

    .form-label {
        font-size: 0.9375rem;
    }

    .form-control,
    .form-select {
        font-size: 1rem; /* Prevent iOS zoom */
        padding: 0.6rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    canvas {
        max-height: 200px;
    }

    .modal-dialog {
        margin: var(--sm-spacing-sm);
        max-height: 90vh;
    }

    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }

    .modal-content {
        border-radius: var(--sm-radius-md);
    }

    .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    [class*="col-"] {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.875rem;
    }

    .list-group-item {
        padding: 0.5rem 0.75rem;
    }

    .nav-pills .nav-link {
        padding: 0.35rem 0.75rem;
        font-size: 0.875rem;
    }

    .breadcrumb-item {
        font-size: 0.875rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        content: "/";
        padding: 0 0.25rem;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    a[href] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    main {
        padding-top: var(--sm-spacing-md);
        padding-bottom: var(--sm-spacing-md);
    }

    .navbar {
        padding: 0.25rem 0 !important;
    }

    .card-body {
        padding: var(--sm-spacing-sm);
    }
}

/* ============================================
   9. PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    footer,
    .btn,
    .form-check-input {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--sm-border);
    }

    body {
        background-color: white;
    }

    main {
        padding: 0;
    }
}

/* ============================================
   10. GRID & SPACING
   ============================================ */
.row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.g-0 {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* ============================================
   11. IMAGES & MEDIA
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ============================================
   12. DROPDOWN MENUS
   ============================================ */
.dropdown-menu {
    max-width: 100vw;
    border: none;
    box-shadow: var(--sm-shadow-lg);
    border-radius: var(--sm-radius-md);
    padding: var(--sm-spacing-sm);
    margin-top: var(--sm-spacing-sm);
}

.dropdown-item {
    border-radius: var(--sm-radius-sm);
    padding: var(--sm-spacing-sm) var(--sm-spacing-md);
    transition: all var(--sm-transition-fast);
    font-size: 0.9375rem;
}

.dropdown-item:hover {
    background: var(--sm-surface-alt);
}

@media (max-width: 576px) {
    .dropdown-menu {
        position: static !important;
        float: none;
    }
}

/* ============================================
   13. NAVIGATION & PAGINATION
   ============================================ */
.nav-pills {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-pills .nav-link {
    border-radius: var(--sm-radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
}

.breadcrumb {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb-item {
    font-size: 0.9375rem;
}

.pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}

.page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border-radius: var(--sm-radius-sm);
    color: var(--sm-primary);
}

.page-link:hover {
    background: var(--sm-surface-alt);
    color: var(--sm-primary-2);
}

/* ============================================
   14. USER AVATAR
   ============================================ */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--sm-radius-full);
    background: var(--sm-gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
   15. HIDE/SHOW UTILITY CLASSES
   ============================================ */
.hide-mobile {
    display: none;
}

@media (min-width: 576px) {
    .hide-mobile {
        display: block;
    }
}

.hide-tablet {
    display: block;
}

@media (min-width: 992px) {
    .hide-tablet {
        display: none;
    }
}

/* ============================================
   16. STICKY ELEMENTS
   ============================================ */
.sticky-top {
    z-index: 1000;
}

/* ============================================
   17. PROFILE PAGE STYLES
   ============================================ */
.profile-hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.profile-stats-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.profile-tabs .nav-link {
    color: var(--sm-text);
    font-weight: 500;
    padding: 1rem 2rem;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.profile-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--sm-accent);
    transition: width 0.3s ease, left 0.3s ease;
}

.profile-tabs .nav-link.active::after,
.profile-tabs .nav-link:hover::after {
    width: 100%;
    left: 0;
}

.profile-info-card {
    border-left: 4px solid var(--sm-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(15, 76, 117, 0.15);
}

.achievements-grid {
    display: grid;
    gap: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--sm-bg);
    transition: all 0.3s ease;
}

.achievement-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--sm-border);
}

.activity-item {
    position: relative;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.75rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--sm-primary);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--sm-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 76, 117, 0.3);
}

.admin-stats-card {
    border: none;
    transition: all 0.3s ease;
}

.admin-stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.admin-stats-card .card-body {
    position: relative;
    overflow: hidden;
}

.admin-stats-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sm-gradient-accent);
}

.profile-info-card,
.achievements-card,
.skills-card {
    animation: slideIn 0.6s ease forwards;
}

.achievements-card {
    animation-delay: 0.1s;
}

.skills-card {
    animation-delay: 0.2s;
}

.profile-actions .btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-avatar-upload {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--sm-accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-avatar-upload:hover {
    background: var(--sm-accent-orange);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.admin-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--sm-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .profile-header {
        padding: 1rem 0;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-details h1 {
        font-size: 2rem;
    }

    .profile-stats-card {
        margin-top: 1rem;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .profile-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .activity-timeline {
        padding-left: 1rem;
    }

    .activity-timeline::before {
        left: 0.5rem;
    }

    .activity-item::before {
        left: -1.5rem;
    }

    .profile-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (prefers-color-scheme: dark) {
    .profile-stats-card {
        background: #2d3748;
        color: white;
    }

    .profile-info-card {
        background: #2d3748;
        color: white;
    }

    .achievement-item {
        background: #374151;
    }

    .skill-tag {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* ============================================
   18. FORM GROUPS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .form-group {
        margin-bottom: 0.75rem;
    }

    .input-group {
        flex-wrap: wrap;
    }
}

/* List Groups */
.list-group-item {
    font-size: var(--font-size-base);
    padding: 0.75rem 1rem;
    word-break: break-word;
}

/* Modal Responsive */
.modal-dialog {
    margin: auto;
}

@media (max-width: 576px) {
    .modal-content {
        margin: 0.5rem;
    }
}

/* Mobile Navbar Dropdown Fixes
   Fix profile/logout dropdown accessibility on smaller screens
   =========================================================== */
@media (max-width: 992px) {
    /* Make dropdown accessible in collapsed navbar */
    .navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        display: none;
        width: 100%;
        max-width: none;
        background: var(--primary-color);
        border: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0.5rem 0;
        box-shadow: none;
    }

    .navbar .dropdown-menu.show {
        display: block;
    }

    /* Style dropdown items for mobile */
    .navbar .dropdown-item {
        color: white !important;
        padding: 0.75rem 1rem;
        clear: both;
        width: 100%;
        text-align: inherit;
        background: transparent !important;
        border: none;
    }

    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus {
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
    }

    /* Ensure dropdown toggle is visible on mobile */
    .navbar .dropdown-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Fix dropdown toggle icon rotation on mobile */
    .navbar .dropdown-toggle::after {
        transition: transform 0.2s;
    }

    .navbar .dropdown-toggle.show::after {
        transform: rotate(180deg);
    }
}

/* ============================================
   END OF STYLES
   ============================================ */

/* ============================================
   SolarMind Landing Page Redesign
   ============================================ */
.home-page {
    color: #12263a;
    background:
        linear-gradient(180deg, #f7fbff 0%, #ffffff 34%, #f6f8ff 100%);
    overflow: hidden;
}

/* Cohesive landing-page pass: keeps the full page close to the planned concept. */
body.landing-body .home-page {
    background:
        radial-gradient(circle at 5% 4%, rgba(247, 183, 51, 0.22), transparent 18%),
        radial-gradient(circle at 86% 10%, rgba(98, 77, 255, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 34%, #f8fbff 100%);
}

body.landing-body .home-section,
body.landing-body .home-section--muted,
body.landing-body .home-pricing {
    background: transparent;
}

body.landing-body .home-section {
    padding: clamp(3.7rem, 6vw, 5.8rem) 0 !important;
}

body.landing-body .home-hero {
    border-bottom: 1px solid rgba(49, 88, 212, 0.08);
}

.home-page section {
    padding: 0;
}

body.landing-body .home-page section {
    padding: 0;
}

.home-hero {
    min-height: auto;
    padding: 3.8rem 0 4.4rem !important;
    position: relative;
    display: block;
    background:
        radial-gradient(circle at 8% 8%, rgba(247, 183, 51, 0.35), transparent 21%),
        radial-gradient(circle at 84% 34%, rgba(124, 77, 255, 0.13), transparent 34%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.94) 0%, rgba(242, 247, 255, 0.96) 48%, rgba(255, 248, 231, 0.9) 100%),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230f4c75' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 60h120M60 0v120M0 0l120 120M120 0 0 120'/%3E%3C/g%3E%3C/svg%3E");
}

body.landing-body .home-hero {
    background:
        radial-gradient(circle at 8% 8%, rgba(247, 183, 51, 0.35), transparent 21%),
        radial-gradient(circle at 84% 34%, rgba(124, 77, 255, 0.13), transparent 34%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.94) 0%, rgba(242, 247, 255, 0.96) 48%, rgba(255, 248, 231, 0.9) 100%),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230f4c75' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 60h120M60 0v120M0 0l120 120M120 0 0 120'/%3E%3C/g%3E%3C/svg%3E");
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -32% auto;
    width: 52vw;
    height: 52vw;
    max-width: 680px;
    max-height: 680px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 183, 51, 0.22), rgba(247, 183, 51, 0) 68%);
    pointer-events: none;
}

.home-hero__grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.86fr) minmax(560px, 1.14fr);
    gap: clamp(2.5rem, 5vw, 5.5rem);
    align-items: center;
    position: relative;
    z-index: 1;
    min-height: clamp(640px, calc(100vh - 170px), 760px);
}

.home-hero__content h1 {
    max-width: 12ch;
    font-size: clamp(3.4rem, 5.7vw, 6rem);
    line-height: 1.02;
    font-weight: 850;
    color: #08243a;
    margin-bottom: 1.35rem;
}

[dir="rtl"] .home-hero__content h1 {
    max-width: 12ch;
}

.home-hero__lead {
    max-width: 620px;
    color: #516a7f;
    font-size: clamp(1.06rem, 1.35vw, 1.24rem);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.home-hero__actions,
.home-cta__inner {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.home-btn {
    min-height: 46px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.2rem;
    border: 1px solid transparent;
    font-weight: 800;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
}

.home-btn--primary {
    color: white;
    background: linear-gradient(135deg, #0f4c75 0%, #1f6f9f 100%);
    box-shadow: 0 16px 34px rgba(15, 76, 117, 0.24);
}

.home-btn--primary:hover {
    color: white;
    box-shadow: 0 18px 40px rgba(15, 76, 117, 0.3);
}

.home-btn--secondary {
    background: white;
    color: #0f4c75;
    border-color: rgba(15, 76, 117, 0.14);
    box-shadow: 0 10px 24px rgba(15, 76, 117, 0.09);
}

.home-btn--ghost {
    background: rgba(247, 183, 51, 0.15);
    color: #7a5500;
    border-color: rgba(247, 183, 51, 0.32);
}

.home-btn--light {
    background: white;
    color: #0f4c75;
    box-shadow: 0 14px 34px rgba(3, 19, 31, 0.18);
}

.home-hero__visual {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forecast-panel {
    width: min(100%, 760px);
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 34px 80px rgba(15, 76, 117, 0.22);
    padding: 0;
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    overflow: hidden;
}

.forecast-panel::before {
    display: none;
}

.forecast-panel__sidebar {
    background: linear-gradient(180deg, #05182a 0%, #08243a 100%);
    color: rgba(255, 255, 255, 0.78);
    padding: 1.1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.forecast-panel__sidebar img {
    width: 104px;
    height: auto;
    margin: 0 auto 0.85rem;
    object-fit: contain;
}

.forecast-panel__sidebar span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 10px;
    padding: 0.58rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.forecast-panel__sidebar span.active {
    color: white;
    background: linear-gradient(135deg, #3158d4, #8a4fe8);
}

.forecast-panel__main {
    padding: 1.25rem;
}

.forecast-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.05rem;
    position: relative;
}

.forecast-panel__header span,
.forecast-panel__metric span,
.pricing-card__features span {
    display: block;
    color: #6f8190;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.forecast-panel__header strong {
    display: block;
    color: #08243a;
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

.forecast-panel__header i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(247, 183, 51, 0.18);
    color: #c78200;
    font-size: 1.55rem;
}

.forecast-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.forecast-kpis div {
    border: 1px solid rgba(15, 76, 117, 0.09);
    border-radius: 15px;
    background: #fbfdff;
    padding: 0.75rem;
}

.forecast-kpis span,
.forecast-kpis small {
    display: block;
    color: #718292;
    font-size: 0.72rem;
    font-weight: 800;
}

.forecast-kpis strong {
    color: #08243a;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1;
}

.forecast-chart {
    height: 210px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.7rem;
    align-items: end;
    padding: 1.1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #f5f9fc, #eef5f9);
    margin-bottom: 0;
    border: 1px solid rgba(15, 76, 117, 0.08);
}

.forecast-chart span {
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #f7b733, #0f4c75);
    min-height: 32px;
    box-shadow: 0 10px 18px rgba(15, 76, 117, 0.14);
}

.forecast-panel__insight {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border-radius: 20px;
    background: rgba(15, 76, 117, 0.07);
    padding: 0.9rem;
    color: #35556e;
    position: relative;
}

.forecast-panel__dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.weather-card {
    border: 1px solid rgba(15, 76, 117, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, #fffaf0, #ffffff);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.weather-card i {
    color: #f7b733;
    font-size: 2.3rem;
}

.weather-card strong {
    color: #08243a;
    font-size: 1.8rem;
    line-height: 1.1;
    margin-top: 0.4rem;
}

.weather-card span {
    color: #607488;
    font-weight: 800;
    font-size: 0.82rem;
}

.forecast-panel__insight i {
    color: #f0a500;
    font-size: 1.2rem;
}

.forecast-panel__insight p {
    margin: 0;
    line-height: 1.65;
    font-size: 0.94rem;
}

.signal-card {
    position: absolute;
    border-radius: 18px;
    background: white;
    border: 1px solid rgba(15, 76, 117, 0.1);
    box-shadow: 0 18px 42px rgba(15, 76, 117, 0.16);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #12334b;
    font-weight: 800;
}

.signal-card i {
    color: #f0a500;
}

.signal-card--weather {
    left: 0;
    top: 18%;
}

.signal-card--alerts {
    right: 0;
    bottom: 18%;
}

.product-showcase {
    position: relative;
    width: min(100%, 780px);
}

.product-showcase::before {
    content: "";
    position: absolute;
    inset: -46px -38px;
    border-radius: 36px;
    background:
        radial-gradient(circle at 18% 12%, rgba(247, 183, 51, 0.3), transparent 28%),
        linear-gradient(135deg, rgba(49, 88, 212, 0.12), rgba(15, 76, 117, 0.08));
    filter: blur(2px);
    z-index: -1;
}

.product-showcase__shell {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 76, 117, 0.12);
    box-shadow: 0 36px 90px rgba(15, 76, 117, 0.2);
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.product-showcase__rail {
    background: linear-gradient(180deg, #061827 0%, #0a2a43 100%);
    padding: 1.2rem 0.72rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.72rem;
}

.product-showcase__rail img {
    width: 62px;
    height: auto;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.product-showcase__rail span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.74);
}

.product-showcase__rail span.active {
    background: linear-gradient(135deg, #3158d4, #8a4fe8);
    color: white;
}

.product-showcase__main {
    padding: 1.2rem;
}

.product-showcase__header,
.product-showcase__metrics,
.product-showcase__body,
.product-showcase__alerts {
    position: relative;
    z-index: 1;
}

.product-showcase__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-showcase__header span,
.product-showcase__metrics span {
    color: #718292;
    display: block;
    font-size: 0.78rem;
    font-weight: 850;
}

.product-showcase__header strong {
    color: #08243a;
    display: block;
    font-size: 1.42rem;
    line-height: 1.2;
}

.sun-status {
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 18px;
    background: #fffaf0;
    color: #08243a;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.68rem 0.85rem;
    font-weight: 900;
}

.sun-status i {
    color: #f0a500;
    font-size: 1.35rem;
}

.product-showcase__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.76rem;
    margin-bottom: 0.9rem;
}

.product-showcase__metrics div {
    border: 1px solid rgba(15, 76, 117, 0.09);
    border-radius: 18px;
    background: #fbfdff;
    padding: 0.82rem;
}

.product-showcase__metrics strong {
    color: #08243a;
    display: block;
    font-size: 1.7rem;
    line-height: 1;
    margin: 0.38rem 0 0.28rem;
}

.product-showcase__metrics small {
    color: #718292;
    font-size: 0.75rem;
}

.product-showcase__metrics em {
    color: #0f8b63;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 850;
}

.product-showcase__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.solar-curve {
    min-height: 245px;
    border: 1px solid rgba(15, 76, 117, 0.09);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f4f8fb);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.solar-curve__grid {
    position: absolute;
    inset: 1rem;
    background-image:
        linear-gradient(rgba(15, 76, 117, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 76, 117, 0.08) 1px, transparent 1px);
    background-size: 100% 25%, 20% 100%;
}

.solar-curve svg {
    position: relative;
    width: 100%;
    height: 190px;
    display: block;
}

.solar-curve__legend {
    display: flex;
    gap: 1rem;
    color: #607488;
    font-size: 0.78rem;
    font-weight: 850;
}

.solar-curve__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.solar-curve__legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3158d4;
}

.solar-curve__legend span:last-child i {
    background: #f7b733;
}

.ai-card {
    border: 1px solid rgba(247, 183, 51, 0.32);
    border-radius: 22px;
    background: linear-gradient(180deg, #fffaf0, #ffffff);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ai-card i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(247, 183, 51, 0.18);
    color: #d88e00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.9rem;
}

.ai-card strong {
    color: #08243a;
    font-size: 1rem;
}

.ai-card p {
    color: #607488;
    font-size: 0.84rem;
    line-height: 1.65;
    margin: 0.45rem 0 0;
}

.product-showcase__alerts {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.product-showcase__alerts span {
    border-radius: 999px;
    background: rgba(15, 76, 117, 0.07);
    color: #244963;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 850;
}

.product-showcase__alerts i {
    color: #0f8b63;
}

.home-section {
    padding: clamp(4rem, 8vw, 7rem) 0 !important;
    background: #ffffff;
}

body.landing-body .home-section {
    background: #ffffff;
}

.home-section--muted,
.home-pricing {
    background: #f4f8fb;
}

body.landing-body .home-section--muted,
body.landing-body .home-pricing {
    background: #f4f8fb;
}

.home-section__grid--about {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.home-section__heading h2,
.home-section__intro h2,
.home-cta h2 {
    color: #08243a;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 850;
    line-height: 1.08;
    margin: 0;
}

.home-section__intro {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
}

.home-section__intro p {
    color: #607488;
    font-size: 1.06rem;
    margin: 0.9rem 0 0;
}

.about-copy {
    border-left: 4px solid #f7b733;
    padding-left: clamp(1.25rem, 3vw, 2rem);
}

[dir="rtl"] .about-copy {
    border-left: 0;
    border-right: 4px solid #f7b733;
    padding-left: 0;
    padding-right: clamp(1.25rem, 3vw, 2rem);
}

.about-copy .lead {
    color: #0f4c75;
    font-weight: 800;
    font-size: 1.2rem;
}

.about-copy p {
    color: #3d566b;
    font-size: 1.02rem;
    line-height: 1.95;
}

.about-visual {
    position: relative;
    min-height: 410px;
}

.solar-field-card {
    position: absolute;
    inset: 0 auto auto 0;
    width: min(86%, 430px);
    min-height: 320px;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #153d75 0%, #0f4c75 48%, #061827 100%);
    box-shadow: 0 26px 68px rgba(15, 76, 117, 0.18);
}

[dir="rtl"] .solar-field-card {
    left: auto;
    right: 0;
}

.solar-field-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(247, 183, 51, 0.55), transparent 18%),
        linear-gradient(155deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.14) 36%, rgba(255, 255, 255, 0) 37%);
}

.solar-field-card__sun {
    position: absolute;
    top: 2rem;
    inset-inline-start: 2rem;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #f7b733;
    box-shadow: 0 0 0 18px rgba(247, 183, 51, 0.16), 0 0 70px rgba(247, 183, 51, 0.5);
}

.solar-panels {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 10%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    transform: perspective(620px) rotateX(58deg) rotateZ(-7deg);
    transform-origin: bottom;
}

.solar-panels span {
    aspect-ratio: 1.25;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
        linear-gradient(135deg, #2449c7, #0a2a43);
    background-size: 22px 100%, 100% 18px, auto;
    border-radius: 6px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.about-floating-card {
    position: absolute;
    border: 1px solid rgba(49, 88, 212, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 76, 117, 0.14);
    padding: 1rem;
    min-width: 150px;
}

.about-floating-card span {
    display: block;
    color: #607488;
    font-size: 0.8rem;
    font-weight: 800;
}

.about-floating-card strong {
    color: #08243a;
    display: block;
    font-size: 1.55rem;
    line-height: 1;
    margin: 0.4rem 0;
}

.about-floating-card i {
    color: #3158d4;
}

.about-floating-card--accuracy {
    top: 4.2rem;
    inset-inline-end: 0;
}

.about-floating-card--impact {
    bottom: 2.2rem;
    inset-inline-end: 3.2rem;
}

.about-floating-card--impact i {
    color: #16a36a;
}

.home-university {
    padding: 1.8rem 0 !important;
    background: #ffffff;
}

body.landing-body .home-university {
    background: #ffffff;
}

.home-university__inner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.8rem;
    border: 1px solid rgba(49, 88, 212, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 96% 10%, rgba(255, 255, 255, 0.22), transparent 20%),
        linear-gradient(135deg, #2449c7 0%, #3158d4 48%, #6948dd 100%);
    color: white;
    padding: 1.55rem 1.7rem;
    box-shadow: 0 24px 58px rgba(49, 88, 212, 0.22);
}

.home-university__inner::before {
    content: "";
    position: absolute;
    inset: auto -6% -58% auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(247, 183, 51, 0.18);
}

.home-university__identity {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.home-university__mark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    flex: 0 0 auto;
}

.home-university__mark img {
    width: 58px;
    height: auto;
    filter: none;
}

.home-university__inner span,
.home-university__inner small {
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

.home-university__inner strong {
    display: block;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.1;
}

.home-university__proof {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    flex: 1;
}

.home-university__proof div {
    min-height: 74px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
    padding-inline-start: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.home-university__proof i {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.26);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffd36c;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.home-university__proof span {
    color: white;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.35;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.home-feature {
    min-height: 255px;
    border: 1px solid rgba(49, 88, 212, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    padding: 1.2rem 1rem;
    box-shadow: 0 16px 38px rgba(49, 88, 212, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 58px rgba(15, 76, 117, 0.13);
}

.home-feature i {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(49, 88, 212, 0.1), rgba(247, 183, 51, 0.14));
    color: #3158d4;
    font-size: 1.55rem;
    margin-bottom: 1.2rem;
}

.home-feature h3,
.process-grid h3,
.pricing-card h3 {
    color: #08243a;
    font-weight: 850;
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
}

.home-feature p,
.process-grid p,
.pricing-card p {
    color: #617588;
    line-height: 1.75;
    margin: 0;
}

.home-feature p {
    font-size: 0.86rem;
}

.process-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.process-grid::before {
    content: "";
    position: absolute;
    top: 24px;
    inset-inline: 9%;
    border-top: 2px dashed rgba(49, 88, 212, 0.24);
}

.process-grid article {
    position: relative;
    border-top: 0;
    padding-top: 0;
    text-align: center;
}

.process-grid span {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3158d4, #6948dd);
    color: white;
    font-weight: 850;
    margin-bottom: 1rem;
    box-shadow: 0 12px 28px rgba(15, 76, 117, 0.18);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
}

.home-pricing .container {
    border: 1px solid rgba(49, 88, 212, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 68px rgba(49, 88, 212, 0.09);
    padding-top: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.pricing-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(49, 88, 212, 0.13);
    background: white;
    box-shadow: 0 20px 50px rgba(15, 76, 117, 0.08);
    display: flex;
    flex-direction: column;
}

.pricing-card--featured {
    border-color: rgba(49, 88, 212, 0.75);
    box-shadow: 0 28px 70px rgba(49, 88, 212, 0.16);
    transform: translateY(-10px);
}

.pricing-card__flag {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    background: rgba(247, 183, 51, 0.18);
    color: #7a5500;
    border: 1px solid rgba(247, 183, 51, 0.45);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 850;
}

.pricing-card__top {
    padding: 1.5rem;
}

.pricing-card__top p {
    min-height: 76px;
    padding-inline-end: 1rem;
}

.pricing-card__price {
    margin: 1.3rem 0;
}

.pricing-card__price strong {
    display: block;
    color: #08243a;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1;
}

.pricing-card__price span {
    color: #758696;
    font-size: 0.9rem;
    font-weight: 700;
}

.pricing-card__features {
    border-top: 1px solid rgba(15, 76, 117, 0.1);
    padding: 1.35rem 1.5rem 1.5rem;
    flex: 1;
}

.pricing-card__features ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.82rem;
}

.pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: #425b70;
    font-weight: 650;
    font-size: 0.93rem;
    line-height: 1.55;
}

.pricing-card__features i {
    color: #0f8b63;
    font-size: 1.05rem;
    margin-top: 0.1rem;
}

.home-stats {
    padding: 2rem 0 !important;
    background: transparent;
    color: white;
}

body.landing-body .home-stats {
    background: transparent;
}

.home-stats .container {
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 20%, rgba(247, 183, 51, 0.23), transparent 24%),
        linear-gradient(135deg, #061827 0%, #0f4c75 54%, #3158d4 100%);
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: 0 28px 70px rgba(15, 76, 117, 0.2);
}

.home-stats__intro {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

.home-stats__intro h2 {
    color: white;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 850;
    margin-bottom: 0.75rem;
}

.home-stats__intro p {
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    font-size: 1.02rem;
}

.home-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-stat-card {
    min-height: 210px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.15);
    padding: 1.6rem;
    text-align: start;
    backdrop-filter: blur(12px);
}

.home-stat-card i {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.45rem;
    margin-bottom: 1.2rem;
}

.home-stat-card strong {
    display: block;
    color: white;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.home-stat-card span {
    color: #f7b733;
    display: block;
    font-weight: 850;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.home-stat-card p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    margin: 0;
}

.home-cta {
    padding: 1.2rem 0 0 !important;
    background: transparent;
}

body.landing-body .home-cta {
    background: transparent;
}

.home-cta__inner {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(circle at 94% 10%, rgba(255, 255, 255, 0.24), transparent 26%),
        linear-gradient(135deg, #2449c7, #6948dd);
    padding: 2rem;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    color: white;
}

.home-cta__inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.35;
    pointer-events: none;
}

.home-cta__inner > * {
    position: relative;
    z-index: 1;
}

.home-cta__inner h2,
.home-cta__inner p {
    color: white;
}

.home-cta__inner p {
    margin: 0.8rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    max-width: 620px;
}

@media (max-width: 1180px) {
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-card--featured {
        transform: none;
    }
}

@media (max-width: 992px) {
    .home-hero {
        padding-top: 4.5rem !important;
    }

    .home-hero__grid,
    .home-section__grid--about {
        grid-template-columns: 1fr;
    }

    .home-hero__content h1 {
        max-width: 14ch;
    }

    .home-hero__visual {
        min-height: 460px;
    }

    .forecast-panel {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .product-showcase__body {
        grid-template-columns: 1fr;
    }

    .home-university__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-university__proof {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-panel__dashboard {
        grid-template-columns: 1fr;
    }

    .weather-card {
        min-height: 130px;
    }

    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-hero {
        min-height: auto;
        padding: 3.5rem 0 3rem !important;
    }

    .home-hero__content h1 {
        font-size: clamp(2rem, 9.5vw, 2.75rem);
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .home-hero__lead {
        font-size: 0.98rem;
    }

    .home-hero__actions .home-btn,
    .home-cta__inner .home-btn {
        width: 100%;
    }

    .home-hero__visual {
        min-height: 390px;
    }

    .forecast-panel {
        border-radius: 24px;
        width: calc(100vw - 2rem);
        max-width: 100%;
        display: block;
    }

    .forecast-panel__sidebar {
        display: none;
    }

    .forecast-kpis {
        grid-template-columns: 1fr;
    }

    .product-showcase {
        width: 100%;
    }

    .product-showcase__shell {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .product-showcase__rail {
        display: none;
    }

    .product-showcase__metrics,
    .product-showcase__body,
    .home-university__proof {
        grid-template-columns: 1fr;
    }

    .product-showcase__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-university__identity {
        min-width: 0;
    }

    .home-university__proof div {
        border-inline-start: 0;
        padding-inline-start: 0;
    }

    .signal-card {
        position: static;
        margin-top: 0.75rem;
        width: 100%;
    }

    .feature-grid,
    .process-grid,
    .pricing-grid,
    .home-stats__grid {
        grid-template-columns: 1fr;
    }

    .home-stats__grid div {
        border-inline-end: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        padding-bottom: 1.3rem;
    }

    .home-stats__grid div:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .home-university__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Authenticated Workspace Home */
body.dashboard-body {
    background:
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 34%, #ffffff 100%);
}

.workspace-home {
    min-height: calc(100vh - 78px);
    padding: 2rem 0 3.5rem;
    overflow-x: hidden;
}

.workspace-home section {
    background: transparent;
    padding: 0;
}

.workspace-home *,
.workspace-home *::before,
.workspace-home *::after {
    min-width: 0;
}

.workspace-home__container {
    width: calc(100% - 2rem);
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 0;
}

.workspace-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
    align-items: stretch;
    border: 1px solid rgba(15, 76, 117, 0.12);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.94)),
        linear-gradient(135deg, rgba(15, 76, 117, 0.1), rgba(247, 183, 51, 0.08));
    box-shadow: 0 30px 80px rgba(15, 76, 117, 0.14);
    padding: 2.25rem;
}

.workspace-hero::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0;
    width: 44%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(247, 183, 51, 0.16), transparent 62%),
        repeating-linear-gradient(135deg, rgba(15, 76, 117, 0.08) 0 1px, transparent 1px 28px);
    pointer-events: none;
}

.workspace-hero__content,
.workspace-hero__panel {
    position: relative;
    z-index: 1;
}

.workspace-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 360px;
}

.workspace-hero__status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f4c75;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0.48rem 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 76, 117, 0.08);
}

.workspace-hero__status i {
    color: #f7b733;
}

.workspace-hero h1 {
    max-width: 720px;
    margin: 1.15rem 0 1rem;
    color: #081f38;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.workspace-hero p {
    max-width: 620px;
    color: #52657a;
    font-size: 1.04rem;
    line-height: 1.85;
    margin: 0;
}

.workspace-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.55rem;
}

.workspace-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 76, 117, 0.16);
    background: white;
    color: #0f4c75;
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.2;
    padding: 0.75rem 1.05rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workspace-btn:hover {
    color: #0f4c75;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 76, 117, 0.12);
}

.workspace-btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: white;
    box-shadow: 0 18px 34px rgba(29, 78, 216, 0.24);
}

.workspace-btn--primary:hover {
    color: white;
}

.workspace-btn--light {
    background: rgba(255, 255, 255, 0.82);
}

.workspace-btn--small {
    min-height: 38px;
    border-radius: 10px;
    padding: 0.58rem 0.86rem;
    font-size: 0.84rem;
}

.workspace-hero__panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 360px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.96));
    border: 1px solid rgba(15, 76, 117, 0.13);
    box-shadow: 0 24px 70px rgba(15, 76, 117, 0.16);
    padding: 1.3rem;
}

.workspace-panel__top,
.workspace-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.workspace-panel__top span,
.workspace-section-head p,
.workspace-stat-card small,
.workspace-panel__meter small,
.workspace-readiness__ring span {
    color: #64748b;
}

.workspace-panel__top strong {
    display: block;
    color: #081f38;
    font-size: 1rem;
    font-weight: 900;
}

.workspace-panel__top i {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.35rem;
}

.workspace-panel__meter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.1rem 0;
}

.workspace-panel__meter div {
    min-height: 84px;
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 16px;
    background: #ffffff;
    padding: 0.85rem;
}

.workspace-panel__meter strong {
    display: block;
    margin-top: 0.35rem;
    color: #081f38;
    font-size: 1.55rem;
    font-weight: 900;
}

.workspace-mini-chart {
    height: 120px;
    display: flex;
    align-items: end;
    gap: 0.6rem;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(247, 183, 51, 0.08), rgba(15, 76, 117, 0.06)),
        repeating-linear-gradient(0deg, rgba(15, 76, 117, 0.08) 0 1px, transparent 1px 34px);
    padding: 1rem;
}

.workspace-mini-chart span {
    flex: 1;
    min-width: 20px;
    height: var(--h);
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #f7b733, #0f4c75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.workspace-analysis-preview {
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
    padding: 1rem;
}

.workspace-analysis-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.workspace-analysis-preview__head span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.workspace-analysis-preview__head strong {
    display: block;
    color: #081f38;
    font-size: 0.98rem;
    font-weight: 900;
}

.workspace-analysis-preview__head i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 14px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 1.2rem;
}

.workspace-analysis-preview__chart {
    display: block;
    width: 100%;
    height: 138px;
    color: #1d4ed8;
}

.workspace-analysis-preview__grid {
    fill: none;
    stroke: rgba(15, 76, 117, 0.09);
    stroke-width: 1;
}

.workspace-analysis-preview__fill {
    fill: url(#workspaceChartFill);
}

.workspace-analysis-preview__line {
    fill: none;
    stroke: #1d4ed8;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workspace-analysis-preview__chart circle {
    fill: #ffffff;
    stroke: #f7b733;
    stroke-width: 4;
}

.workspace-analysis-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.workspace-analysis-preview__meta span {
    border-radius: 999px;
    background: #eef5fb;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 0.42rem 0.62rem;
}

.workspace-panel__insight {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 16px;
    background: #eef5fb;
    color: #334155;
    font-weight: 750;
    line-height: 1.6;
    padding: 0.85rem 1rem;
    margin-top: 1rem;
}

.workspace-panel__insight i {
    color: #f7b733;
}

.workspace-stats,
.workspace-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.1rem;
}

.workspace-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-stat-card {
    min-height: 148px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 46px rgba(15, 76, 117, 0.09);
    color: inherit;
    text-decoration: none;
    padding: 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workspace-stat-card:hover {
    color: inherit;
    border-color: rgba(29, 78, 216, 0.24);
    box-shadow: 0 24px 58px rgba(15, 76, 117, 0.14);
    transform: translateY(-3px);
}

.workspace-stat-card__icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    border-radius: 16px;
    font-size: 1.35rem;
}

.workspace-stat-card__icon--blue {
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
}

.workspace-stat-card__icon--green {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.workspace-stat-card__icon--amber {
    background: rgba(247, 183, 51, 0.18);
    color: #d48a00;
}

.workspace-stat-card strong {
    display: block;
    color: #081f38;
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.35rem 0 0.45rem;
}

.workspace-stat-card p {
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
}

.workspace-main-card,
.workspace-side-card,
.workspace-table-card {
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.1);
    padding: 1.35rem;
}

.workspace-section-head {
    margin-bottom: 1.2rem;
}

.workspace-section-head--compact {
    align-items: flex-start;
}

.workspace-section-head h2 {
    color: #081f38;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.workspace-section-head p {
    margin: 0.35rem 0 0;
    line-height: 1.6;
}

.workspace-section-head > a:not(.workspace-btn) {
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.workspace-readiness {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.workspace-readiness__visual {
    position: relative;
    min-height: 260px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(255, 251, 235, 0.82));
    border: 1px solid rgba(15, 76, 117, 0.1);
}

.workspace-readiness__sun {
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-start: 1rem;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff7df;
    color: #f7b733;
    font-size: 1.4rem;
}

.workspace-readiness__ring {
    width: 166px;
    height: 166px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #ffffff 0 58%, transparent 59%),
        conic-gradient(#1d4ed8 0 342deg, rgba(15, 76, 117, 0.12) 342deg 360deg);
    box-shadow: 0 20px 50px rgba(15, 76, 117, 0.13);
}

.workspace-readiness__ring strong,
.workspace-readiness__ring span {
    grid-area: 1 / 1;
}

.workspace-readiness__ring strong {
    color: #081f38;
    font-size: 2rem;
    font-weight: 950;
    transform: translateY(-0.55rem);
}

.workspace-readiness__ring span {
    max-width: 105px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    transform: translateY(1.25rem);
}

.workspace-readiness__steps {
    display: grid;
    gap: 0.75rem;
}

.workspace-readiness__steps a,
.workspace-actions-list a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    color: #24364a;
    font-weight: 800;
    line-height: 1.55;
    text-decoration: none;
    padding: 0.95rem 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.workspace-readiness__steps a:hover,
.workspace-actions-list a:hover {
    color: #0f4c75;
    border-color: rgba(29, 78, 216, 0.22);
    background: #ffffff;
    transform: translateX(-2px);
}

[dir="ltr"] .workspace-readiness__steps a:hover,
[dir="ltr"] .workspace-actions-list a:hover {
    transform: translateX(2px);
}

.workspace-readiness__steps i,
.workspace-actions-list i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border-radius: 13px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 1.15rem;
}

.workspace-actions-list {
    display: grid;
    gap: 0.75rem;
}

.workspace-table-card {
    margin-top: 1.1rem;
}

.workspace-table-wrap {
    overflow-x: auto;
}

.workspace-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0 0.55rem;
}

.workspace-table th {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0 1rem 0.4rem;
}

.workspace-table td {
    background: #f8fbff;
    color: #24364a;
    font-weight: 750;
    padding: 0.95rem 1rem;
    border-block: 1px solid rgba(15, 76, 117, 0.08);
}

.workspace-table td:first-child {
    border-start-start-radius: 14px;
    border-end-start-radius: 14px;
    border-inline-start: 1px solid rgba(15, 76, 117, 0.08);
}

.workspace-table td:last-child {
    border-start-end-radius: 14px;
    border-end-end-radius: 14px;
    border-inline-end: 1px solid rgba(15, 76, 117, 0.08);
}

.workspace-empty {
    text-align: center;
    color: #64748b !important;
}

@media (max-width: 1100px) {
    .workspace-hero,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .workspace-hero__content,
    .workspace-hero__panel {
        min-height: auto;
    }
}

@media (max-width: 860px) {
    .workspace-home {
        padding: 1rem 0 2rem;
    }

    .workspace-hero {
        border-radius: 22px;
        padding: 1.25rem;
    }

    .workspace-hero h1 {
        font-size: 2.25rem;
    }

    .workspace-stats,
    .workspace-readiness {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .workspace-home__container {
        padding-inline: 0.85rem;
    }

    .workspace-hero {
        padding: 1rem;
    }

    .workspace-hero__actions,
    .workspace-panel__top,
    .workspace-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-btn,
    .workspace-section-head > a {
        width: 100%;
    }

    .workspace-panel__meter {
        grid-template-columns: 1fr;
    }

    .workspace-mini-chart {
        gap: 0.35rem;
        padding: 0.75rem;
    }

    .workspace-mini-chart span {
        min-width: 0;
    }

    .workspace-stat-card {
        min-height: auto;
    }

    .workspace-hero h1 {
        font-size: 1.9rem;
    }
}

/* Charts & Analytics Workspace */
body.charts-body {
    background:
        radial-gradient(circle at 14% 12%, rgba(247, 183, 51, 0.14), transparent 30%),
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 38%, #ffffff 100%);
}

.charts-workspace {
    min-height: calc(100vh - 78px);
    padding: 2rem 0 3.5rem;
    overflow-x: hidden;
}

.charts-workspace section {
    background: transparent;
    padding: 0;
}

.charts-workspace *,
.charts-workspace *::before,
.charts-workspace *::after {
    min-width: 0;
}

.charts-workspace__container {
    width: calc(100% - 2rem);
    max-width: 1260px;
    margin-inline: auto;
    padding-inline: 0;
}

.charts-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: 1.25rem;
    align-items: stretch;
    border: 1px solid rgba(15, 76, 117, 0.12);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.94)),
        linear-gradient(135deg, rgba(15, 76, 117, 0.11), rgba(247, 183, 51, 0.1));
    box-shadow: 0 30px 80px rgba(15, 76, 117, 0.14);
    padding: 2.15rem;
}

.charts-hero::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 48%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(247, 183, 51, 0.15), transparent 64%),
        repeating-linear-gradient(135deg, rgba(15, 76, 117, 0.075) 0 1px, transparent 1px 28px);
    pointer-events: none;
}

.charts-hero__content,
.charts-hero__panel {
    position: relative;
    z-index: 1;
}

.charts-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
}

.charts-hero__status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #0f4c75;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0.48rem 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 76, 117, 0.08);
}

.charts-hero__status i {
    color: #f7b733;
}

.charts-hero h1 {
    max-width: 760px;
    margin: 1.1rem 0 0.95rem;
    color: #081f38;
    font-size: clamp(2.2rem, 4.6vw, 4rem);
    font-weight: 950;
    line-height: 1.06;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.charts-hero p {
    max-width: 680px;
    color: #52657a;
    font-size: 1.04rem;
    line-height: 1.85;
    margin: 0;
}

.charts-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.55rem;
}

.charts-hero__panel,
.charts-filters,
.analytics-chart-card {
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.1);
}

.charts-hero__panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 1.35rem;
}

.charts-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.charts-panel__top span,
.charts-readiness small,
.charts-summary-grid span,
.analytics-chart-card p {
    color: #64748b;
}

.charts-panel__top span {
    display: block;
    font-size: 0.84rem;
    font-weight: 850;
    margin-bottom: 0.28rem;
}

.charts-panel__top strong {
    display: block;
    color: #081f38;
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.25;
}

.charts-panel__top > i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 16px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.35rem;
}

.charts-readiness {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.1rem 0;
}

.charts-readiness div {
    min-height: 92px;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.85rem;
}

.charts-readiness small {
    display: block;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.35;
}

.charts-readiness strong {
    display: block;
    margin-top: 0.35rem;
    color: #081f38;
    font-size: clamp(1.1rem, 2.4vw, 1.55rem);
    font-weight: 950;
    line-height: 1.15;
}

.charts-panel__note,
.charts-banner,
.charts-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 16px;
    background: #eef5fb;
    color: #334155;
    font-weight: 750;
    line-height: 1.65;
    padding: 0.85rem 1rem;
}

.charts-panel__note i,
.charts-banner i,
.charts-status i {
    color: #1d4ed8;
}

.charts-banner,
.charts-filters,
.charts-status,
.charts-summary-grid,
.charts-grid {
    margin-top: 1.1rem;
}

.charts-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.25fr) minmax(170px, 0.7fr) minmax(170px, 0.7fr) minmax(150px, 0.55fr);
    gap: 0.85rem;
    align-items: end;
    padding: 1.1rem;
}

.charts-field {
    display: grid;
    gap: 0.42rem;
}

.charts-field label {
    color: #081f38;
    font-size: 0.86rem;
    font-weight: 900;
}

.charts-field select,
.charts-field input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(15, 76, 117, 0.16);
    border-radius: 13px;
    background: #ffffff;
    color: #10253f;
    font-size: 0.92rem;
    font-weight: 750;
    padding: 0.7rem 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.charts-field select:focus,
.charts-field input:focus {
    border-color: rgba(29, 78, 216, 0.5);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
}

.charts-filter-submit {
    width: 100%;
    min-height: 46px;
}

.charts-status {
    border: 1px solid rgba(15, 76, 117, 0.08);
    background: rgba(238, 245, 251, 0.95);
}

.charts-status > i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 14px;
    background: rgba(29, 78, 216, 0.1);
}

.charts-status strong,
.charts-status span {
    display: block;
}

.charts-status strong {
    color: #081f38;
    font-weight: 950;
}

.charts-status span {
    color: #52657a;
    margin-top: 0.12rem;
}

.charts-status--empty {
    border-color: rgba(247, 183, 51, 0.22);
    background: rgba(247, 183, 51, 0.12);
}

.charts-status--empty > i {
    background: rgba(247, 183, 51, 0.18);
    color: #b77900;
}

.charts-status--ready {
    border-color: rgba(20, 184, 166, 0.18);
    background: rgba(20, 184, 166, 0.1);
}

.charts-status--ready > i {
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
}

.charts-status--error {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.09);
}

.charts-status--error > i {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.charts-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.charts-summary-grid article {
    min-height: 132px;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(15, 76, 117, 0.08);
    padding: 1rem;
}

.charts-summary-grid i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.15rem;
}

.charts-summary-grid span {
    display: block;
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1.35;
    margin-top: 0.8rem;
}

.charts-summary-grid strong {
    display: block;
    color: #081f38;
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    font-weight: 950;
    line-height: 1.2;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.analytics-chart-card {
    padding: 1.2rem;
}

.analytics-chart-card--wide {
    grid-column: 1 / -1;
}

.analytics-chart-card h2 {
    color: #081f38;
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1.25;
    margin: 0;
}

.analytics-chart-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0.25rem 0 0;
}

.charts-card-badge {
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.42rem 0.68rem;
}

.analytics-chart-shell {
    position: relative;
    height: 390px;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
    padding: 1rem;
    margin-top: 1rem;
}

.analytics-chart-shell--compact {
    height: 320px;
}

.analytics-chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}

.charts-empty {
    position: absolute;
    inset: 1rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px dashed rgba(15, 76, 117, 0.18);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
    color: #64748b;
    text-align: center;
    padding: 1.35rem;
}

.charts-empty i {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.45rem;
}

.charts-empty strong {
    color: #081f38;
    font-size: 1rem;
    font-weight: 950;
}

.charts-empty span {
    max-width: 430px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.65;
}

@media (max-width: 1120px) {
    .charts-hero,
    .charts-filter-form,
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .charts-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .charts-workspace {
        padding: 1rem 0 2rem;
    }

    .charts-workspace__container {
        width: calc(100% - 1.7rem);
    }

    .charts-hero,
    .charts-hero__panel,
    .charts-filters,
    .analytics-chart-card {
        border-radius: 20px;
        padding: 1rem;
    }

    .charts-hero__content,
    .charts-hero__panel {
        min-height: auto;
    }

    .charts-hero__actions,
    .charts-panel__top,
    .charts-banner,
    .charts-status,
    .analytics-chart-card .workspace-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .charts-hero__actions .workspace-btn {
        width: 100%;
    }

    .charts-readiness,
    .charts-summary-grid {
        grid-template-columns: 1fr;
    }

    .analytics-chart-shell,
    .analytics-chart-shell--compact {
        height: 300px;
        padding: 0.75rem;
    }

    .charts-empty {
        inset: 0.75rem;
        padding: 1rem;
    }
}

/* Alerts Workspace */
body.alerts-body {
    background:
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 40%, #ffffff 100%);
}

.alerts-workspace {
    min-height: calc(100vh - 78px);
    overflow-x: hidden;
    padding: 2rem 0 3.5rem;
}

.alerts-workspace section {
    background: transparent;
    padding: 0;
}

.alerts-workspace *,
.alerts-workspace *::before,
.alerts-workspace *::after {
    min-width: 0;
}

.alerts-workspace__container {
    width: calc(100% - 2rem);
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 0;
}

.alerts-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 1.25rem;
    align-items: stretch;
    border: 1px solid rgba(15, 76, 117, 0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 7% 10%, rgba(247, 183, 51, 0.16), transparent 27%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.94));
    box-shadow: 0 30px 80px rgba(15, 76, 117, 0.14);
    padding: 2rem;
}

.alerts-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.alerts-hero__status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f4c75;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0.48rem 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 76, 117, 0.08);
}

.alerts-hero__status i {
    color: #f7b733;
}

.alerts-hero h1 {
    color: #081f38;
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: 0;
    margin: 1rem 0;
}

.alerts-hero p {
    max-width: 680px;
    color: #52657a;
    font-size: 1.04rem;
    line-height: 1.85;
    margin: 0;
}

.alerts-hero__panel,
.alerts-filter-card,
.alerts-table-card,
.alerts-side-card {
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.1);
    padding: 1.35rem;
}

.alerts-hero__panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

.alerts-hero__panel-head,
.alerts-hero__note {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.alerts-hero__panel-head {
    justify-content: space-between;
}

.alerts-hero__panel-head span {
    color: #64748b;
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.alerts-hero__panel-head strong {
    color: #081f38;
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
}

.alerts-hero__panel-head i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-size: 1.35rem;
}

.alerts-hero__meter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 1.15rem 0;
}

.alerts-hero__meter div {
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.9rem;
}

.alerts-hero__meter small {
    color: #64748b;
    display: block;
    font-weight: 800;
}

.alerts-hero__meter strong {
    color: #081f38;
    display: block;
    font-size: 1.75rem;
    font-weight: 950;
    line-height: 1;
    margin-top: 0.45rem;
}

.alerts-hero__note {
    border-radius: 16px;
    background: #eef5fb;
    color: #334155;
    font-weight: 750;
    line-height: 1.65;
    padding: 0.85rem 1rem;
}

.alerts-hero__note i {
    color: #1d4ed8;
}

.alerts-filter-card,
.alerts-grid {
    margin-top: 1.1rem;
}

.alerts-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.alerts-filter-grid label {
    display: grid;
    gap: 0.4rem;
}

.alerts-filter-grid label span {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 850;
}

.alerts-filter-grid select,
.alerts-filter-grid input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(15, 76, 117, 0.14);
    border-radius: 12px;
    background: #f8fbff;
    color: #081f38;
    font-weight: 750;
    padding: 0.6rem 0.75rem;
}

.alerts-filter-grid select:focus,
.alerts-filter-grid input:focus {
    border-color: rgba(29, 78, 216, 0.46);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.1);
    outline: none;
}

.alerts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
    gap: 1rem;
    align-items: start;
}

.alerts-table-wrap {
    overflow-x: auto;
}

.alerts-table {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 0 0.55rem;
}

.alerts-table th {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0 0.8rem 0.4rem;
}

.alerts-table td {
    background: #f8fbff;
    color: #24364a;
    font-weight: 750;
    padding: 0.9rem 0.8rem;
    border-block: 1px solid rgba(15, 76, 117, 0.08);
}

.alerts-table td:first-child {
    border-start-start-radius: 14px;
    border-end-start-radius: 14px;
    border-inline-start: 1px solid rgba(15, 76, 117, 0.08);
}

.alerts-table td:last-child {
    border-start-end-radius: 14px;
    border-end-end-radius: 14px;
    border-inline-end: 1px solid rgba(15, 76, 117, 0.08);
}

.alerts-table code {
    border-radius: 999px;
    background: rgba(15, 76, 117, 0.08);
    color: #0f4c75;
    font-size: 0.78rem;
    padding: 0.28rem 0.48rem;
}

.alerts-severity {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 0.34rem 0.58rem;
}

.alerts-severity--high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.alerts-severity--medium {
    background: rgba(247, 183, 51, 0.18);
    color: #b77900;
}

.alerts-severity--low {
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
}

.alerts-empty {
    color: #64748b !important;
    font-weight: 800 !important;
    text-align: center;
}

.alerts-chart-shell {
    position: relative;
    min-height: 320px;
}

.alerts-chart-shell canvas {
    width: 100% !important;
    height: 310px !important;
}

.alerts-chart-empty {
    min-height: 310px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(15, 76, 117, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
    padding: 1.5rem;
}

.alerts-chart-empty i {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.45rem;
}

.alerts-chart-empty strong {
    color: #081f38;
    font-size: 1.05rem;
    font-weight: 900;
}

.alerts-chart-empty span {
    color: #64748b;
    line-height: 1.65;
}

@media (max-width: 1100px) {
    .alerts-hero,
    .alerts-grid {
        grid-template-columns: 1fr;
    }

    .alerts-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alerts-filter-grid button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .alerts-workspace {
        padding: 1rem 0 2rem;
    }

    .alerts-workspace__container {
        width: calc(100% - 1.7rem);
    }

    .alerts-hero,
    .alerts-filter-card,
    .alerts-table-card,
    .alerts-side-card {
        border-radius: 20px;
        padding: 1rem;
    }

    .alerts-hero h1 {
        font-size: 2.2rem;
    }

    .alerts-hero__meter,
    .alerts-filter-grid {
        grid-template-columns: 1fr;
    }

    .alerts-hero__panel-head,
    .alerts-hero__note {
        align-items: flex-start;
    }
}

/* Live Monitoring Workspace */
body.monitor-body {
    background:
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 40%, #ffffff 100%);
}

.monitor-workspace {
    min-height: calc(100vh - 78px);
    overflow-x: hidden;
    padding: 2rem 0 3.5rem;
}

.monitor-workspace section {
    background: transparent;
    padding: 0;
}

.monitor-workspace *,
.monitor-workspace *::before,
.monitor-workspace *::after {
    min-width: 0;
}

.monitor-workspace__container {
    width: calc(100% - 2rem);
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 0;
}

.monitor-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 1.25rem;
    align-items: stretch;
    border: 1px solid rgba(15, 76, 117, 0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 8% 12%, rgba(247, 183, 51, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.94));
    box-shadow: 0 30px 80px rgba(15, 76, 117, 0.14);
    padding: 2rem;
}

.monitor-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
}

.monitor-hero__status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f4c75;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0.48rem 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 76, 117, 0.08);
}

.monitor-hero__status i {
    color: #f7b733;
}

.monitor-hero h1 {
    color: #081f38;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: 0;
    margin: 1rem 0;
}

.monitor-hero p {
    max-width: 700px;
    color: #52657a;
    font-size: 1.04rem;
    line-height: 1.85;
    margin: 0;
}

.monitor-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.45rem;
}

.monitor-plant-picker .dropdown-menu {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.16);
    padding: 0.55rem;
}

.monitor-plant-picker .dropdown-item {
    border-radius: 12px;
    color: #24364a;
    font-weight: 750;
    padding: 0.65rem 0.75rem;
}

.monitor-hero__panel,
.monitor-chart-card,
.monitor-forecast-card,
.monitor-alert-card {
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.1);
    padding: 1.35rem;
}

.monitor-hero__panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
}

.monitor-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.monitor-panel__top span,
.monitor-prediction span,
.monitor-prediction small,
.monitor-forecast-grid small {
    color: #64748b;
}

.monitor-panel__top span {
    display: block;
    font-size: 0.85rem;
    font-weight: 850;
    margin-bottom: 0.3rem;
}

.monitor-panel__top > i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 16px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 1.35rem;
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 0.42rem 0.7rem;
}

.monitor-status--offline,
.monitor-status.bg-danger,
.monitor-status.badge.bg-danger,
#connectionStatus.bg-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

#connectionStatus.bg-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

#connectionStatus.bg-warning {
    background: rgba(247, 183, 51, 0.18) !important;
    color: #b77900 !important;
}

#connectionStatus.bg-secondary {
    background: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}

.monitor-prediction {
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
    padding: 1.15rem;
    margin: 1rem 0;
}

.monitor-prediction span {
    display: block;
    font-size: 0.86rem;
    font-weight: 850;
    margin-bottom: 0.45rem;
}

.monitor-prediction strong {
    color: #081f38;
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 950;
    line-height: 1;
    margin-bottom: 0.85rem;
}

.monitor-prediction div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.monitor-source-badge,
#dataSourceBadge {
    border-radius: 999px !important;
    background: rgba(29, 78, 216, 0.1) !important;
    color: #1d4ed8 !important;
    font-weight: 900 !important;
    padding: 0.36rem 0.62rem !important;
}

.monitor-panel__note,
.monitor-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 16px;
    background: #eef5fb;
    color: #334155;
    font-weight: 750;
    line-height: 1.65;
    padding: 0.85rem 1rem;
}

.monitor-panel__note i,
.monitor-banner i {
    color: #1d4ed8;
}

.monitor-banner {
    margin-top: 1.1rem;
}

.monitor-banner--warning {
    background: rgba(247, 183, 51, 0.14);
    color: #7a5200;
}

.monitor-banner--warning i {
    color: #f7b733;
}

.monitor-sensors {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.1rem;
}

.monitor-sensor-card {
    min-height: 162px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(15, 76, 117, 0.09);
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.monitor-sensor-card:hover {
    border-color: rgba(29, 78, 216, 0.22);
    box-shadow: 0 24px 58px rgba(15, 76, 117, 0.14);
    transform: translateY(-3px);
}

.monitor-sensor-card > i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.2rem;
}

.monitor-sensor-card span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1.35;
    margin-top: 0.75rem;
}

.monitor-sensor-card .sensor-value {
    color: #081f38;
    font-size: 1.85rem;
    font-weight: 950;
    line-height: 1;
    margin-top: 0.45rem;
}

.monitor-sensor-card .sensor-unit,
.monitor-sensor-card .sensor-trend {
    color: #64748b;
    font-weight: 800;
}

.monitor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1rem;
    align-items: stretch;
    margin-top: 1.1rem;
}

.monitor-chart-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 999px;
    background: #f8fbff;
    padding: 0.3rem;
}

.monitor-chart-tabs button {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 0.48rem 0.75rem;
}

.monitor-chart-tabs button.active {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
}

.monitor-chart-shell {
    height: 340px;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
    padding: 1rem;
}

.monitor-chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}

.monitor-forecast-grid {
    display: grid;
    gap: 0.75rem;
}

.monitor-forecast-grid div {
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.95rem;
}

.monitor-forecast-grid small {
    display: block;
    font-size: 0.78rem;
    font-weight: 850;
    margin-bottom: 0.4rem;
}

.monitor-forecast-grid strong {
    color: #081f38;
    display: block;
    font-size: 1.3rem;
    font-weight: 950;
    line-height: 1.2;
}

.monitor-forecast-grid span {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.monitor-alert-card {
    margin-top: 1.1rem;
}

.monitor-alert-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 950;
    padding: 0 0.35rem;
}

.monitor-alert-feed {
    max-height: 320px;
    overflow-y: auto;
}

.monitor-empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(15, 76, 117, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
    padding: 1.5rem;
}

.monitor-empty-state i {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(247, 183, 51, 0.18);
    color: #f7b733;
    font-size: 1.45rem;
}

.monitor-empty-state strong {
    color: #081f38;
    font-size: 1.05rem;
    font-weight: 900;
}

.monitor-empty-state span {
    color: #64748b;
    line-height: 1.65;
}

.alert-item {
    border: 1px solid rgba(15, 76, 117, 0.08);
    border-radius: 16px;
    background: #f8fbff;
    margin-bottom: 0.65rem;
    padding: 0.9rem 1rem;
}

.connection-pulse {
    animation: pulse 2s infinite;
}

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

@media (max-width: 1180px) {
    .monitor-sensors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .monitor-hero,
    .monitor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .monitor-workspace {
        padding: 1rem 0 2rem;
    }

    .monitor-workspace__container {
        width: calc(100% - 1.7rem);
    }

    .monitor-hero,
    .monitor-hero__panel,
    .monitor-chart-card,
    .monitor-forecast-card,
    .monitor-alert-card {
        border-radius: 20px;
        padding: 1rem;
    }

    .monitor-hero h1 {
        font-size: 2.15rem;
    }

    .monitor-hero__content,
    .monitor-hero__panel {
        min-height: auto;
    }

    .monitor-hero__actions,
    .monitor-panel__top,
    .monitor-prediction div,
    .monitor-banner,
    .monitor-chart-tabs,
    .monitor-alert-card .workspace-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .monitor-hero__actions .workspace-btn,
    .monitor-plant-picker,
    .monitor-plant-picker .workspace-btn {
        width: 100%;
    }

    .monitor-sensors {
        grid-template-columns: 1fr;
    }

    .monitor-chart-shell {
        height: 300px;
    }
}

/* Admin Workspace */
body.admin-body {
    background:
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 38%, #ffffff 100%);
}

.admin-workspace {
    min-height: calc(100vh - 78px);
    overflow-x: hidden;
    padding: 2rem 0 3.5rem;
}

.admin-workspace section {
    background: transparent;
    padding: 0;
}

.admin-workspace *,
.admin-workspace *::before,
.admin-workspace *::after {
    min-width: 0;
}

.admin-workspace__container {
    width: calc(100% - 2rem);
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 0;
}

.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 1.25rem;
    align-items: stretch;
    border: 1px solid rgba(15, 76, 117, 0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 9% 13%, rgba(247, 183, 51, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.94));
    box-shadow: 0 30px 80px rgba(15, 76, 117, 0.14);
    padding: 2rem;
}

.admin-hero__content {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-hero__status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(247, 183, 51, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f4c75;
    font-size: 0.86rem;
    font-weight: 850;
    padding: 0.48rem 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 76, 117, 0.08);
}

.admin-hero__status i {
    color: #f7b733;
}

.admin-hero h1 {
    max-width: 760px;
    color: #081f38;
    font-size: 3.25rem;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: 0;
    margin: 1rem 0;
    overflow-wrap: anywhere;
}

.admin-hero p {
    max-width: 690px;
    color: #52657a;
    font-size: 1.04rem;
    line-height: 1.85;
    margin: 0;
}

.admin-hero__panel,
.admin-card {
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 54px rgba(15, 76, 117, 0.1);
    padding: 1.35rem;
}

.admin-hero__panel {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-panel__top,
.admin-section-head,
.admin-plan__top,
.admin-plan__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-panel__top span,
.admin-section-head p,
.admin-command-card span,
.admin-table small,
.admin-plan span,
.admin-plan p {
    color: #64748b;
}

.admin-panel__top span {
    display: block;
    font-size: 0.85rem;
    font-weight: 850;
    margin-bottom: 0.25rem;
}

.admin-panel__top strong {
    color: #081f38;
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
}

.admin-panel__top > i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 16px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 1.35rem;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.1rem 0;
}

.admin-metrics div {
    min-height: 96px;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.95rem;
}

.admin-metrics small {
    color: #64748b;
    display: block;
    font-weight: 850;
}

.admin-metrics strong {
    color: #081f38;
    display: block;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
    margin-top: 0.55rem;
}

.admin-panel__note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 16px;
    background: #eef5fb;
    color: #334155;
    font-weight: 750;
    line-height: 1.65;
    padding: 0.85rem 1rem;
}

.admin-panel__note i {
    color: #f7b733;
}

.admin-command-grid,
.admin-grid,
.admin-plans-card {
    margin-top: 1.1rem;
}

.admin-user-plan-card {
    margin-top: 1.1rem;
}

.admin-user-plan-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
    gap: 1rem;
    align-items: start;
}

.admin-assign-form {
    display: grid;
    gap: 0.85rem;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 18px;
    background: #f8fbff;
    padding: 1rem;
}

.admin-assign-form label {
    display: grid;
    gap: 0.4rem;
}

.admin-assign-form label span,
.admin-section-head--mini p {
    color: #64748b;
}

.admin-assign-form label span {
    font-size: 0.82rem;
    font-weight: 850;
}

.admin-assign-form input,
.admin-assign-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(15, 76, 117, 0.14);
    border-radius: 12px;
    background: #ffffff;
    color: #081f38;
    font-size: 0.9rem;
    font-weight: 750;
    padding: 0.62rem 0.75rem;
}

.admin-assign-form input:focus,
.admin-assign-form select:focus {
    border-color: rgba(29, 78, 216, 0.46);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.1);
    outline: none;
}

.admin-user-plan-history {
    min-width: 0;
}

.admin-section-head--mini {
    margin-bottom: 0.75rem;
}

.admin-section-head--mini h3 {
    color: #081f38;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.admin-section-head--mini p {
    font-weight: 750;
    line-height: 1.55;
    margin: 0.25rem 0 0;
}

.admin-command-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.admin-command-card {
    min-height: 138px;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 46px rgba(15, 76, 117, 0.09);
    padding: 1rem;
}

.admin-command-card > i {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    border-radius: 15px;
    background: rgba(247, 183, 51, 0.18);
    color: #d48a00;
    font-size: 1.2rem;
}

.admin-command-card strong {
    color: #081f38;
    display: block;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
}

.admin-command-card span {
    display: block;
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.55;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1rem;
    align-items: start;
}

.admin-grid--balanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-section-head {
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.admin-section-head--compact {
    display: block;
}

.admin-section-head h2 {
    color: #081f38;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.admin-section-head p {
    line-height: 1.65;
    margin: 0.35rem 0 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-card--wide .admin-table-wrap {
    max-height: 640px;
    overflow: auto;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 0.55rem;
}

.admin-table--compact {
    min-width: 100%;
}

.admin-table th {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0 0.8rem 0.35rem;
}

.admin-table td {
    background: #f8fbff;
    color: #24364a;
    font-weight: 750;
    vertical-align: middle;
    padding: 0.9rem 0.8rem;
    border-block: 1px solid rgba(15, 76, 117, 0.08);
}

.admin-table td:first-child {
    border-start-start-radius: 14px;
    border-end-start-radius: 14px;
    border-inline-start: 1px solid rgba(15, 76, 117, 0.08);
    overflow-wrap: anywhere;
}

.admin-table td:last-child {
    border-start-end-radius: 14px;
    border-end-end-radius: 14px;
    border-inline-end: 1px solid rgba(15, 76, 117, 0.08);
}

.admin-table strong,
.admin-table small {
    display: block;
}

.admin-table strong {
    color: #081f38;
    font-weight: 900;
}

.admin-empty {
    width: 100%;
    color: #64748b !important;
    font-weight: 800 !important;
    text-align: center;
    padding: 1.1rem !important;
}

.admin-inline-select,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(15, 76, 117, 0.14);
    border-radius: 12px;
    background: #ffffff;
    color: #081f38;
    font-size: 0.9rem;
    font-weight: 750;
    padding: 0.58rem 0.75rem;
}

.admin-inline-select:focus,
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus {
    border-color: rgba(29, 78, 216, 0.46);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.1);
    outline: none;
}

.admin-inline-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #334155;
    font-weight: 850;
}

.admin-inline-switch input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #1d4ed8;
}

.admin-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 76, 117, 0.13);
    border-radius: 12px;
    background: #ffffff;
    color: #0f4c75;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-icon-btn:hover {
    border-color: rgba(29, 78, 216, 0.24);
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(15, 76, 117, 0.12);
    transform: translateY(-2px);
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 0.34rem 0.58rem;
    box-shadow: none;
}

.admin-status-badge--active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.admin-status-badge--inactive {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.admin-status-badge--processed {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.admin-status-badge--needs-review {
    background: rgba(247, 183, 51, 0.18);
    color: #b77900;
}

.admin-status-badge--uploaded,
.admin-status-badge--previewed,
.admin-status-badge--mapped {
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
}

.admin-focus-list {
    display: grid;
    gap: 0.75rem;
}

.admin-focus-list div {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid rgba(15, 76, 117, 0.1);
    border-radius: 16px;
    background: #f8fbff;
    color: #334155;
    font-weight: 800;
    line-height: 1.65;
    padding: 0.95rem 1rem;
}

.admin-focus-list i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    border-radius: 12px;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    font-size: 1rem;
}

.admin-plans-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.admin-plan {
    display: flex;
    flex-direction: column;
    min-height: 310px;
    border: 1px solid rgba(15, 76, 117, 0.11);
    border-radius: 20px;
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 1.05rem;
}

.admin-plan--featured {
    border-color: rgba(29, 78, 216, 0.45);
    box-shadow: 0 20px 46px rgba(29, 78, 216, 0.12);
}

.admin-plan__top strong {
    color: #081f38;
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
}

.admin-plan__top span {
    font-size: 0.8rem;
    font-weight: 850;
}

.admin-plan__top em {
    border-radius: 999px;
    background: rgba(247, 183, 51, 0.18);
    color: #b77900;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 900;
    padding: 0.34rem 0.55rem;
}

.admin-plan__price {
    margin: 1rem 0 0.7rem;
}

.admin-plan__price strong {
    color: #081f38;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
}

.admin-plan p {
    flex: 1;
    font-weight: 750;
    line-height: 1.65;
    margin: 0 0 1rem;
}

.admin-plan__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.admin-plan__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: #eef5fb;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 850;
    padding: 0.4rem 0.6rem;
}

.admin-plan__actions {
    justify-content: flex-start;
}

.admin-danger-btn {
    border-color: rgba(239, 68, 68, 0.18);
    color: #dc2626;
}

.admin-danger-btn:hover {
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.admin-alert {
    border: 1px solid rgba(247, 183, 51, 0.28);
    border-radius: 16px;
    background: rgba(247, 183, 51, 0.12);
    color: #7a5200;
    font-weight: 850;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.admin-modal .modal-content {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 76, 117, 0.2);
}

.admin-modal .modal-header,
.admin-modal .modal-footer {
    border-color: rgba(15, 76, 117, 0.1);
}

.admin-modal .modal-title {
    color: #081f38;
    font-weight: 900;
}

.admin-form-grid {
    display: grid;
    gap: 0.9rem;
}

.admin-form-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-grid label {
    display: grid;
    gap: 0.38rem;
}

.admin-form-grid label span,
.admin-switches span {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 850;
}

.admin-form-grid__span {
    grid-column: span 3;
}

.admin-switches {
    display: grid;
    gap: 0.55rem;
    align-content: center;
}

.admin-switches .form-check {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    margin: 0;
    min-height: 42px;
}

@media (max-width: 1180px) {
    .admin-command-grid,
    .admin-plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .admin-hero,
    .admin-grid,
    .admin-grid--balanced,
    .admin-user-plan-layout {
        grid-template-columns: 1fr;
    }

    .admin-hero__content,
    .admin-hero__panel {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .admin-workspace {
        padding: 1rem 0 2rem;
    }

    .admin-workspace__container {
        width: calc(100% - 1.7rem);
    }

    .admin-hero,
    .admin-card,
    .admin-hero__panel {
        border-radius: 20px;
        padding: 1rem;
    }

    .admin-hero h1 {
        max-width: 100%;
        font-size: 1.85rem;
        line-height: 1.12;
    }

    .admin-command-grid,
    .admin-metrics,
    .admin-plans-grid,
    .admin-form-grid--wide {
        grid-template-columns: 1fr;
    }

    .admin-form-grid__span {
        grid-column: span 1;
    }

    .admin-panel__top,
    .admin-section-head,
    .admin-plan__top,
    .admin-plan__actions,
    .admin-panel__note {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-section-head .workspace-btn,
    .admin-plan__actions .workspace-btn {
        width: 100%;
    }
}
