/* LeaveFlow Pro - Main Stylesheet */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --dark: #0f172a;
    --dark-sidebar: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --radius: 10px;
    --sidebar-width: 260px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ===== LANDING PAGE ===== */
.landing-page { background: var(--white); }

.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
}

.landing-nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}

.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--gray-700); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: var(--gray-100); color: var(--primary-dark); }

.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

.btn-warning { background: var(--warning); color: white; }

/* Hero */
.hero {
    padding: 140px 24px 100px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,.3) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .85rem;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -.02em;
}

.hero h1 span { color: #93c5fd; }

.hero p {
    font-size: 1.15rem;
    opacity: .85;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.15);
}

.stat-item h3 { font-size: 2rem; font-weight: 700; }
.stat-item p { font-size: .85rem; opacity: .7; }

.hero-visual {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.dashboard-preview {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.preview-header {
    background: var(--dark-sidebar);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #10b981; }

.preview-body { padding: 20px; }

.preview-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.preview-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 14px;
}

.preview-card .num { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.preview-card .lbl { font-size: .75rem; color: var(--gray-500); }

.preview-chart {
    height: 80px;
    background: linear-gradient(to top, var(--primary-light), transparent);
    border-radius: 8px;
    position: relative;
}

.preview-chart::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    border-radius: 0 0 8px 8px;
}

/* Features Section */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.25rem; font-weight: 700; color: var(--dark); margin-bottom: 16px; }
.section-header p { font-size: 1.1rem; color: var(--gray-500); max-width: 600px; margin: 0 auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 32px;
    transition: all .3s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 52px; height: 52px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 { font-size: 1.15rem; font-weight: 600; color: var(--dark); margin-bottom: 10px; }
.feature-card p { color: var(--gray-500); font-size: .95rem; }

/* How it works */
.how-section { background: var(--gray-50); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card { text-align: center; padding: 24px; }

.step-num {
    width: 48px; height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 16px;
}

.step-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--dark); }
.step-card p { font-size: .9rem; color: var(--gray-500); }

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    text-align: center;
    padding: 80px 24px;
}

.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.cta-section p { opacity: .9; margin-bottom: 32px; font-size: 1.1rem; }

/* Footer */
.landing-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 48px 24px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p { margin-top: 12px; font-size: .9rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: .95rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-col a:hover { color: white; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    font-size: .85rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--gray-50);
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
}

.login-left h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.login-left p { opacity: .85; font-size: 1rem; line-height: 1.7; margin-bottom: 32px; }

.login-features { list-style: none; }
.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: .95rem;
    opacity: .9;
}

.login-features li::before {
    content: '✓';
    width: 24px; height: 24px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    flex-shrink: 0;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.login-card .subtitle { color: var(--gray-500); margin-bottom: 32px; font-size: .95rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: .95rem;
    font-family: var(--font);
    transition: border-color .2s, box-shadow .2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.login-footer { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--gray-500); }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-sidebar);
    color: white;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: transform .3s;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-header .logo { color: white; font-size: 1.1rem; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section { margin-bottom: 24px; }
.nav-section-title {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
}

.user-avatar {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .85rem;
    flex-shrink: 0;
}

.user-details .name { font-size: .875rem; font-weight: 600; }
.user-details .role { font-size: .75rem; color: rgba(255,255,255,.5); }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-left h1 { font-size: 1.25rem; font-weight: 600; color: var(--dark); }
.topbar-left .breadcrumb { font-size: .85rem; color: var(--gray-500); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.page-content { padding: 32px; flex: 1; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); }
.stat-icon.green { background: var(--success-bg); }
.stat-icon.yellow { background: var(--warning-bg); }
.stat-icon.red { background: var(--danger-bg); }
.stat-icon.purple { background: #ede9fe; }

.stat-info h3 { font-size: 1.75rem; font-weight: 700; color: var(--dark); line-height: 1; margin-bottom: 4px; }
.stat-info p { font-size: .85rem; color: var(--gray-500); font-weight: 500; }

/* Cards & Tables */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h2 { font-size: 1.05rem; font-weight: 600; color: var(--dark); }
.card-body { padding: 24px; }
.card-body.no-padding { padding: 0; }

.table-responsive { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

table.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

table.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

table.data-table tr:hover td { background: var(--gray-50); }
table.data-table tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-success { background: var(--success-bg); color: #065f46; }
.badge-danger { background: var(--danger-bg); color: #991b1b; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-secondary { background: var(--gray-100); color: var(--gray-700); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }

/* Action buttons in table */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* Search bar */
.search-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-bar .form-control { max-width: 280px; }

/* Modal overlay (simple) */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--dark); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item label { font-size: .8rem; color: var(--gray-500); font-weight: 500; display: block; margin-bottom: 4px; }
.info-item span { font-size: .95rem; color: var(--dark); font-weight: 500; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    .features-grid { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: block; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .page-content { padding: 20px 16px; }
    .info-grid { grid-template-columns: 1fr; }
}
