/**
 * LeaseCraft Premium Redesign — 2026
 * Professional, user-friendly design system applied across all pages.
 * Extends modern-design-system.css with refined tokens and components.
 */

/* ========== PREMIUM DESIGN TOKENS ========== */
:root {
    --premium-primary: #0c4a6e;
    --premium-primary-light: #0ea5e9;
    --premium-primary-dark: #072f4a;
    --premium-accent: #059669;
    --premium-accent-light: #10b981;
    --premium-surface: #ffffff;
    --premium-surface-alt: #f8fafc;
    --premium-surface-elevated: #ffffff;
    --premium-border: #e2e8f0;
    --premium-border-light: #f1f5f9;
    --premium-text: #0f172a;
    --premium-text-muted: #475569;
    --premium-text-subtle: #64748b;
    --premium-nav-bg: rgba(255, 255, 255, 0.98);
    --premium-nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --premium-footer-bg: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --premium-card-radius: 16px;
    --premium-btn-radius: 12px;
    --premium-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --premium-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --premium-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --premium-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --premium-font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ========== GLOBAL PREMIUM OVERRIDES ========== */
body.premium-body {
    font-family: var(--premium-font);
    color: var(--premium-text);
    background: var(--premium-surface-alt);
    -webkit-font-smoothing: antialiased;
}

.premium-body .lead,
.premium-body .text-muted {
    color: var(--premium-text-muted) !important;
}

/* ========== PREMIUM NAVBAR ========== */
.navbar-premium {
    background: var(--premium-nav-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--premium-nav-shadow) !important;
    border-bottom: 1px solid var(--premium-border-light) !important;
    padding: 0.75rem 0 !important;
}

.navbar-premium .navbar-brand {
    font-family: var(--premium-font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--premium-primary) !important;
}

.navbar-premium .nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--premium-text-muted) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--premium-btn-radius);
}

.navbar-premium .nav-link:hover {
    color: var(--premium-primary) !important;
    background: rgba(14, 165, 233, 0.08);
}

.navbar-premium .nav-link.fw-semibold {
    color: var(--premium-primary) !important;
}

.navbar-premium .btn-primary {
    background: linear-gradient(135deg, var(--premium-primary) 0%, #0e7490 100%);
    border: none;
    border-radius: var(--premium-btn-radius);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    box-shadow: var(--premium-shadow-sm);
}

.navbar-premium .btn-primary:hover {
    background: linear-gradient(135deg, #0e7490 0%, var(--premium-primary) 100%);
    box-shadow: var(--premium-shadow);
}

.navbar-premium .dropdown-menu {
    border: 1px solid var(--premium-border);
    border-radius: 12px;
    box-shadow: var(--premium-shadow-lg);
    padding: 0.5rem;
}

.navbar-premium .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

/* ========== AI BANNER — PREMIUM, SUBTLE ========== */
.premium-ai-banner,
#ai-assistant-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: linear-gradient(90deg, var(--premium-primary) 0%, #0e7490 100%);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--premium-shadow);
    border: none;
}

.premium-ai-banner:hover {
    opacity: 0.95;
}

.premium-ai-banner-icon {
    margin-right: 0.35rem;
}

.premium-banner-spacer {
    height: 40px;
}

/* ========== MAIN CONTENT — PREMIUM LAYOUT ========== */
.main-content-premium {
    background: var(--premium-surface-alt);
    min-height: 60vh;
}

.premium-content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.premium-bg-layer-1,
.premium-bg-layer-2,
.premium-bg-layer-3 {
    display: none;
}

/* ========== PREMIUM SECTIONS ========== */
.premium-section {
    padding: 3rem 0;
}

.premium-section-alt {
    background: var(--premium-surface);
    border-radius: var(--premium-card-radius);
    box-shadow: var(--premium-shadow-sm);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.premium-hero {
    background: linear-gradient(165deg, var(--premium-primary-dark) 0%, var(--premium-primary) 50%, #0e7490 100%);
    color: #fff;
    padding: 3.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 20V40H20'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.premium-hero h1,
.premium-hero .premium-hero-title {
    font-family: var(--premium-font-display);
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #fff !important;
}

.premium-hero p,
.premium-hero .premium-hero-sub {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== PREMIUM CARDS ========== */
.premium-card,
.premium-body .card {
    background: var(--premium-surface);
    border: 1px solid var(--premium-border-light);
    border-radius: var(--premium-card-radius);
    box-shadow: var(--premium-shadow-sm);
}

.premium-body .card:hover {
    box-shadow: var(--premium-shadow);
    border-color: var(--premium-border);
}

.premium-body .card-header {
    background: var(--premium-surface-alt);
    border-bottom: 1px solid var(--premium-border-light);
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.premium-body .card-body {
    padding: 1.5rem;
}

/* ========== PREMIUM BUTTONS ========== */
.premium-body .btn-primary {
    background: linear-gradient(135deg, var(--premium-primary) 0%, #0e7490 100%);
    border: none;
    border-radius: var(--premium-btn-radius);
    font-weight: 600;
    box-shadow: var(--premium-shadow-sm);
}

.premium-body .btn-primary:hover {
    background: linear-gradient(135deg, #0e7490 0%, var(--premium-primary) 100%);
    box-shadow: var(--premium-shadow);
}

.premium-body .btn-success {
    background: linear-gradient(135deg, var(--premium-accent) 0%, #047857 100%);
    border: none;
    border-radius: var(--premium-btn-radius);
    font-weight: 600;
}

.premium-body .btn-outline-primary {
    border: 2px solid var(--premium-primary);
    color: var(--premium-primary) !important;
    border-radius: var(--premium-btn-radius);
    font-weight: 600;
}

.premium-body .btn-outline-primary:hover {
    background: rgba(12, 74, 110, 0.08);
    color: var(--premium-primary) !important;
}

.premium-body .btn-outline-secondary {
    border: 1px solid var(--premium-border);
    color: var(--premium-text-muted) !important;
    border-radius: var(--premium-btn-radius);
}

.premium-body .btn-light {
    background: #fff;
    color: var(--premium-primary) !important;
    border: none;
    border-radius: var(--premium-btn-radius);
    font-weight: 600;
    box-shadow: var(--premium-shadow);
}

.premium-body .btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #fff !important;
    border-radius: var(--premium-btn-radius);
}

.premium-body .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* ========== CORE ACTIONS BAR — PREMIUM ========== */
.core-actions {
    background: var(--premium-surface) !important;
    border-bottom: 1px solid var(--premium-border-light) !important;
    padding: 0.75rem 1rem !important;
}

.core-actions .core-action-link {
    color: var(--premium-text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.core-actions .core-action-link:hover {
    color: var(--premium-primary);
}

.core-actions .core-action-link.fw-semibold {
    color: var(--premium-primary);
}

.core-actions .text-muted {
    color: var(--premium-border) !important;
}

/* ========== PREMIUM FOOTER ========== */
.premium-body .footer {
    background: var(--premium-footer-bg) !important;
    color: #fff;
    padding: 3rem 0 2rem;
    margin-top: 0;
    border-top: none;
}

.premium-body .footer-section h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.premium-body .footer-section a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.35rem 0;
    display: block;
}

.premium-body .footer-section a:hover {
    color: #fff;
}

.premium-body .footer-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.premium-body .footer .status-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--premium-accent-light);
    color: #6ee7b7;
}

.premium-body .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
}

.premium-body .footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ========== FORMS — PREMIUM ========== */
.premium-body .form-control,
.premium-body .form-select {
    border: 1px solid var(--premium-border);
    border-radius: 10px;
    padding: 0.625rem 1rem;
}

.premium-body .form-control:focus,
.premium-body .form-select:focus {
    border-color: var(--premium-primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.premium-body .form-label {
    font-weight: 600;
    color: var(--premium-text);
}

/* ========== MOBILE BOTTOM NAV — PREMIUM ========== */
.mobile-bottom-nav {
    background: var(--premium-nav-bg) !important;
    border-top: 1px solid var(--premium-border-light);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.mobile-bottom-nav .mobile-nav-link {
    color: var(--premium-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-bottom-nav .mobile-nav-link.active,
.mobile-bottom-nav .mobile-nav-link.mobile-nav-cta {
    color: var(--premium-primary);
}

/* ========== HUB PAGES — HERO, POPULAR, STATS, GRIDS ========== */
.premium-hero .btn-light { background: #fff; color: var(--premium-primary) !important; font-weight: 600; }
.premium-hero .btn-success { background: rgba(16, 185, 129, 0.9); border: none; color: #fff; font-weight: 600; }
.premium-hero .text-white-50 { color: rgba(255, 255, 255, 0.7); }

.premium-popular-strip {
    background: var(--premium-surface);
    padding: 2rem 0;
    border-bottom: 1px solid var(--premium-border-light);
}

.premium-stats-section {
    background: linear-gradient(165deg, var(--premium-primary) 0%, #0e7490 100%);
    color: #fff;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.premium-stats-section .stat-number {
    font-family: var(--premium-font-display);
    font-size: 2rem;
    font-weight: 800;
    display: block;
}

.premium-stats-section .stat-label {
    font-size: 0.9375rem;
    opacity: 0.9;
}

.premium-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.premium-doc-card {
    background: var(--premium-surface);
    border: 1px solid var(--premium-border-light);
    border-radius: var(--premium-card-radius);
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.premium-doc-card:hover {
    box-shadow: var(--premium-shadow);
    border-color: var(--premium-border);
}

.premium-category-card {
    background: var(--premium-surface);
    border: 1px solid var(--premium-border-light);
    border-radius: var(--premium-card-radius);
    padding: 2rem;
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.premium-category-card:hover {
    box-shadow: var(--premium-shadow);
    border-color: var(--premium-primary-light);
}

.premium-search-bar .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
}

/* ========== SKIP LINK & ACCESSIBILITY ========== */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: var(--premium-primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--premium-btn-radius);
}

.skip-to-content:focus {
    left: 1rem;
    top: 1rem;
}

/* ========== PAGE TITLES & SECTIONS ========== */
.premium-body h1, .premium-body .h1 {
    font-family: var(--premium-font-display);
    font-weight: 800;
    color: var(--premium-text);
    letter-spacing: -0.03em;
}

.premium-body h2, .premium-body .h2 {
    font-family: var(--premium-font-display);
    font-weight: 700;
    color: var(--premium-text);
}

.premium-body .display-4,
.premium-body .display-5,
.premium-body .display-6 {
    font-family: var(--premium-font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--premium-text);
}

.text-primary {
    color: var(--premium-primary) !important;
}

/* ========== ALERTS & BADGES ========== */
.premium-body .alert-info {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--premium-primary-dark);
    border-radius: 12px;
}

.premium-body .alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.premium-body .badge.bg-primary {
    background: rgba(12, 74, 110, 0.12) !important;
    color: var(--premium-primary) !important;
}

/* ========== CONTAINER & LAYOUT ========== */
.premium-body .container {
    max-width: 1200px;
}

@media (min-width: 1400px) {
    .premium-body .container { max-width: 1320px; }
}

/* ========== SEARCH MODAL & TOAST — PREMIUM ========== */
.premium-body #searchModal .modal-content {
    border: 1px solid var(--premium-border-light);
    border-radius: var(--premium-card-radius);
    box-shadow: var(--premium-shadow-lg);
}

.premium-body #searchModal .modal-header .form-control {
    border-radius: 12px;
}

.premium-body #auto-save-toast .toast {
    border-radius: 12px;
    box-shadow: var(--premium-shadow-lg);
}

.premium-body .offline-banner {
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    color: #92400e;
}

/* ========== DARK MODE ADJUSTMENTS ========== */
[data-theme="dark"] .premium-body,
.premium-body.dark {
    --premium-surface: #1e293b;
    --premium-surface-alt: #0f172a;
    --premium-text: #f1f5f9;
    --premium-text-muted: #94a3b8;
    --premium-border: #334155;
    --premium-border-light: #1e293b;
}
