/* CSS Variables - Identity Ultracon */
:root {
    /* Colors */
    --primary-blue: #002B49;
    /* Azul Profundo */
    --secondary-blue: #00A3E0;
    /* Azul Claro/Cyan */
    --accent-yellow: #FDB913;
    /* Amarelo Institucional */
    --premium-grad: linear-gradient(135deg, #002B49 0%, #00467F 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    --bg-light: #F0F2F5;
    --text-dark: #1A1A1A;
    --white: #FFFFFF;

    /* Variáveis de Tema Padrão (Claro) */
    --page-bg: var(--bg-light);
    --card-bg: var(--white);
    --text-main: var(--text-dark);
    --border-color: #E5E7EB;
    --text-on-dark: #FFFFFF;
    --bg-sidebar: #002B49;
    --bg-surface: #FFFFFF;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 100px;
}

/* Dark Mode Overrides */
.dark-mode {
    --page-bg: #111827;
    --card-bg: #1F2937;
    --text-main: #F9FAFB;
    --border-color: #374151;
    --primary-blue: #60A5FA;
    --bg-sidebar: #0F172A;
    /* Sidebar levemente mais escura */
    --bg-surface: #1F2937;
    --text-dark: #F9FAFB;
    --text-secondary: #9CA3AF;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--page-bg);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Layout Grid */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--premium-grad);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    margin-left: var(--spacing-xs);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md) 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-on-dark);
}

.nav-item.active {
    border-left-color: var(--accent-yellow);
}

.nav-item .icon {
    margin-right: var(--spacing-sm);
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: var(--spacing-sm);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    flex-shrink: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--secondary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #008CBF;
}

.btn-icon {
    background: transparent;
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* Utility */
.card {
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Elementos de Formulário e Tabela Adaptáveis */
.dark-mode input,
.dark-mode select {
    background-color: #374151 !important;
    color: white !important;
    border-color: #4B5563 !important;
}

.dark-mode th {
    color: #9CA3AF !important;
    border-bottom-color: #374151 !important;
}

.dark-mode td {
    color: #F3F4F6 !important;
    border-bottom-color: #374151 !important;
}

.dark-mode .card,
.dark-mode .top-header {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
    color: var(--text-main) !important;
}

/* Login Screen Styles */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--page-bg);
    z-index: 10000;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001524 100%);
}

.login-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: var(--spacing-lg);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.login-logo .logo-icon {
    font-size: 2rem;
}

.login-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-left: var(--spacing-xs);
}

.login-header h1 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6B7280;
    font-size: 0.9rem;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    background-color: var(--secondary-blue);
    color: white;
    margin-top: 1rem;
}

.login-error {
    background-color: #FEE2E2;
    color: #DC2626;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

.login-footer {
    margin-top: var(--spacing-lg);
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Logout Button */
.btn-logout {
    width: 100%;
    margin-top: var(--spacing-sm);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.3);
}

/* Dark Mode Adaptation for Login (Optional if login has its own bg) */
.dark-mode .login-card {
    background: var(--card-bg);
}

.dark-mode .login-header h1,
.dark-mode .login-form label {
    color: var(--text-main);
}

.dark-mode .login-form input {
    background-color: #374151;
    border-color: #4B5563;
    color: white;
}

/* ========================================
   MODAL STYLES - CRITICAL FOR PROPOSALS
   ======================================== */

.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.modal-large {
    max-width: 1000px;
}

.modal-content.modal-xlarge {
    max-width: 1200px;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001524 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Dark mode adaptations for modals */
.dark-mode .modal-content {
    background-color: var(--card-bg);
    color: var(--text-main);
}

.dark-mode .modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.notification-item.unread {
    border-left: 3px solid var(--secondary-blue);
    background-color: rgba(0, 163, 224, 0.05);
}

.notification-item h4 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--primary-blue);
}

.notification-item p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
}

.notification-item .time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-yellow);
    color: var(--primary-blue);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid var(--bg-surface);
}

/* Permission Utilities */
.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: block !important;
}

tr.admin-only,
.admin-only-flex {
    display: none !important;
}

body.is-admin tr.admin-only {
    display: table-row !important;
}

body.is-admin .admin-only-flex {
    display: flex !important;
}

body.is-admin button.admin-only,
body.is-admin a.admin-only {
    display: inline-flex !important;
}

/* Superadmin Utilities */
.superadmin-only {
    display: none !important;
}

body.is-superadmin .superadmin-only {
    display: block !important;
}

body.is-superadmin a.superadmin-only {
    display: flex !important;
}

/* SaaS Management Styles */
.saas-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: 12px;
}

.metric-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.metric-data .label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.metric-data .value {
    /* =========================================
   MODERN SAAS DASHBOARD THEME (PREMIUM UI)
   ========================================= */

    /* Variáveis Locais de Cores Refinadas */
    :root {
        --slate-50: #f8fafc;
        --slate-100: #f1f5f9;
        --slate-200: #e2e8f0;
        --slate-300: #cbd5e1;
        --slate-400: #94a3b8;
        --slate-500: #64748b;
        --slate-600: #475569;
        --slate-700: #334155;
        --slate-800: #1e293b;
        --slate-900: #0f172a;

        --primary-brand: #0f172a;
        --accent-brand: #3b82f6;
        /* Azul vibrante moderno */
        --success-soft: #dcfce7;
        --success-text: #166534;
        --danger-soft: #fee2e2;
        --danger-text: #991b1b;
    }

    /* Base Layout & Typography (Local overrides) */
    .saas-dashboard h1,
    .saas-dashboard h2,
    .saas-dashboard h3 {
        letter-spacing: -0.025em;
        /* Tight tracking form moderno */
    }

    /* --- Metrics Grid --- */
    .saas-metrics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .metric-card {
        background: white;
        padding: 1.75rem;
        border-radius: 16px;
        border: 1px solid var(--slate-100);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
        display: flex;
        align-items: flex-start;
        gap: 1.25rem;
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    }

    .metric-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
        border-color: var(--slate-200);
    }

    .metric-icon-wrapper {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        flex-shrink: 0;
    }

    .metric-icon-blue {
        background: #eff6ff;
        color: #3b82f6;
    }

    .metric-icon-purple {
        background: #f5f3ff;
        color: #8b5cf6;
    }

    .metric-icon-green {
        background: #f0fdf4;
        color: #22c55e;
    }

    .metric-icon-orange {
        background: #fff7ed;
        color: #f97316;
    }

    .metric-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }

    .metric-label {
        font-size: 0.9rem;
        color: var(--slate-500);
        font-weight: 500;
        margin-bottom: 6px;
    }

    .metric-value {
        font-size: 2rem;
        font-weight: 800;
        color: var(--slate-900);
        line-height: 1;
        letter-spacing: -0.5px;
    }

    .metric-trend {
        font-size: 0.8rem;
        font-weight: 600;
        margin-top: 8px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 99px;
        background: var(--slate-50);
    }

    .trend-up {
        color: #10b981;
        background: #ecfdf5;
    }

    .trend-down {
        color: #ef4444;
        background: #fef2f2;
    }

    .trend-neutral {
        color: var(--slate-400);
    }

    /* --- Tables & Lists --- */
    .saas-table-wrapper {
        background: white;
        border-radius: 16px;
        border: 1px solid var(--slate-200);
        overflow: hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    }

    .saas-table {
        width: 100%;
        border-collapse: collapse;
    }

    .saas-table thead {
        background: var(--slate-50);
        border-bottom: 1px solid var(--slate-200);
    }

    .saas-table th {
        padding: 1rem 1.5rem;
        text-align: left;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--slate-500);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .saas-table td {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--slate-100);
        color: var(--slate-700);
        font-size: 0.95rem;
        vertical-align: middle;
    }

    .saas-table tr:last-child td {
        border-bottom: none;
    }

    .saas-table tr:hover td {
        background-color: #f8fafc;
    }

    /* Avatars & Info */
    .info-group {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .avatar-sq {
        width: 48px;
        height: 48px;
        background: var(--primary-brand);
        color: white;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .text-main {
        font-weight: 700;
        color: var(--slate-900);
        display: block;
        font-size: 1rem;
    }

    .text-sub {
        font-size: 0.85rem;
        color: var(--slate-500);
        display: block;
        margin-top: 2px;
    }

    /* Status Badges */
    .status-badge {
        padding: 6px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .status-active {
        background: var(--success-soft);
        color: var(--success-text);
    }

    .status-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .status-danger {
        background: var(--danger-soft);
        color: var(--danger-text);
    }

    /* --- Tenant Detail Cards (Advanced List) --- */
    .tenant-list-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .tenant-detailed-card {
        background: white;
        border: 1px solid var(--slate-200);
        border-radius: 16px;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    }

    .tenant-detailed-card:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
        border-color: var(--slate-300);
    }

    .tenant-header {
        background: white;
        padding: 1.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--slate-100);
    }

    .tenant-meta {
        display: flex;
        gap: 1.25rem;
        align-items: center;
    }

    .tenant-plan-badge {
        text-align: right;
        background: var(--slate-50);
        padding: 0.75rem 1.25rem;
        border-radius: 12px;
        border: 1px solid var(--slate-200);
    }

    .tenant-plan-name {
        font-weight: 800;
        color: var(--primary-brand);
        display: block;
        font-size: 1.1rem;
    }

    .tenant-plan-price {
        font-size: 0.85rem;
        color: var(--slate-500);
        font-weight: 500;
    }

    .tenant-team-section {
        padding: 1.5rem 1.75rem;
        background: #fcfcfc;
    }

    .team-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.25rem;
    }

    .team-label {
        font-size: 0.75rem;
        font-weight: 800;
        color: var(--slate-400);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .team-members-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .member-chip {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: white;
        border: 1px solid var(--slate-200);
        border-radius: 10px;
        transition: all 0.2s;
    }

    .member-chip:hover {
        border-color: var(--accent-brand);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }

    .member-avatar-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--slate-800);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* --- Plan Pricing Cards (Modern) --- */
    .pricing-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
        margin-top: 1.5rem;
    }

    .pricing-card {
        background: white;
        border-radius: 20px;
        border: 1px solid var(--slate-200);
        padding: 2.5rem;
        display: flex;
        flex-direction: column;
        position: relative;
        transition: all 0.3s ease;
    }

    .pricing-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    }

    .pricing-card.highlighted {
        border: 2px solid var(--accent-brand);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
    }

    .popular-badge {
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--accent-brand);
        color: white;
        padding: 6px 16px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    }

    .plan-title {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--slate-900);
        margin-bottom: 0.5rem;
    }

    .plan-desc {
        color: var(--slate-500);
        font-size: 1rem;
        margin-bottom: 2rem;
        min-height: 48px;
        line-height: 1.5;
    }

    .plan-price-box {
        margin-bottom: 2rem;
    }

    .price-value {
        font-size: 3.5rem;
        font-weight: 800;
        color: var(--slate-900);
        letter-spacing: -2px;
    }

    .price-period {
        color: var(--slate-400);
        font-weight: 500;
        font-size: 1.1rem;
    }

    .plan-features-list {
        margin-bottom: 2.5rem;
        flex: 1;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
        color: var(--slate-700);
        font-size: 1rem;
    }

    .check-icon {
        color: var(--accent-brand);
        font-weight: bold;
        background: #eff6ff;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }

    .plan-btn {
        width: 100%;
        padding: 1rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }

    .btn-outline {
        background: white;
        border: 2px solid var(--slate-200);
        color: var(--slate-700);
    }

    .btn-outline:hover {
        border-color: var(--primary-brand);
        color: var(--primary-brand);
        background: var(--slate-50);
    }

    .btn-filled {
        background: var(--primary-brand);
        border: 2px solid var(--primary-brand);
        color: white;
    }

    .btn-filled:hover {
        background: var(--slate-800);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    }

    /* --- Forms & Inputs Modern --- */
    .modal-content.modern {
        border-radius: 16px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        border: 1px solid var(--slate-200);
    }

    .form-group label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--slate-700);
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="number"],
    select {
        width: 100%;
        padding: 0.875rem 1rem;
        background: var(--slate-50);
        border: 1px solid var(--slate-200);
        border-radius: 10px;
        font-size: 1rem;
        color: var(--slate-800);
        transition: all 0.2s;
    }

    .form-control:focus,
    input:focus,
    select:focus {
        background: white;
        border-color: var(--accent-brand);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        outline: none;
    }

    /* Page Header */
    .page-header-modern {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 3rem;
        border-bottom: 1px solid var(--slate-200);
        padding-bottom: 1.5rem;
    }

    .page-title-modern h1 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--slate-900);
        margin-bottom: 0.5rem;
    }

    .page-title-modern p {
        color: var(--slate-500);
        font-size: 1.1rem;
    }

    /* Utilities */
    .btn-sm-modern {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 8px;
        background: white;
        border: 1px solid var(--slate-200);
        color: var(--slate-600);
        font-weight: 700;
        transition: all 0.2s;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .btn-sm-modern:hover {
        border-color: var(--slate-400);
        color: var(--slate-900);
        background: var(--slate-50);
    }

    .text-link {
        color: var(--accent-brand);
        text-decoration: none;
        font-weight: 600;
        cursor: pointer;
    }

    .text-link:hover {
        text-decoration: underline;
        color: #2563eb;
    }

    /* Tags */
    .tags-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .tag-pill {
        font-size: 0.75rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--slate-600);
        background: var(--slate-100);
        padding: 4px 10px;
        border-radius: 8px;
        border: 1px solid var(--slate-200);
    }