/* ═══════════════════════════════════════════════════════════════
   Clean.Citalin — Global Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --blue: #1a73e8;
    --blue-dark: #0d47a1;
    --blue-light: #e8f0fe;
    --blue-gradient: linear-gradient(135deg, #0d47a1 0%, #1a73e8 50%, #4fc3f7 100%);
    --white: #ffffff;
    --black: #1a1a1a;
    --gray: #5f6368;
    --gray-light: #f8f9fa;
    --gray-border: #dadce0;
    --green: #1e8e3e;
    --red: #d93025;
    --gold: #f9ab00;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.bg-light { background: var(--gray-light); }
.bg-gray { background: #f5f7fa; }
.text-muted { color: var(--gray); }
.text-center { text-align: center; }

/* ── Navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 2rem; background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--gray-border);
    transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-logo { font-size: 1.3rem; font-weight: 800; color: var(--blue-dark); text-decoration: none; }
.navbar-logo:hover { text-decoration: none; }
.navbar-logo span { color: var(--blue); }
.navbar-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.navbar-links a { text-decoration: none; color: var(--gray); font-size: .9rem; font-weight: 500; transition: color .2s; }
.navbar-links a:hover { color: var(--blue); text-decoration: none; }
.btn-nav {
    display: inline-flex; align-items: center; padding: .5rem 1.1rem;
    border-radius: 8px; font-size: .85rem; font-weight: 600;
    text-decoration: none; transition: all .2s;
}
.btn-nav:hover { text-decoration: none; }
.btn-nav-outline { border: 2px solid var(--blue); color: var(--blue); }
.btn-nav-outline:hover { background: var(--blue); color: var(--white); }
.btn-nav-fill { background: var(--blue); color: var(--white); border: 2px solid var(--blue); }
.btn-nav-fill:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--black); margin: 5px 0; transition: .3s; }

/* ── Flash Messages ── */
.flash {
    padding: .75rem 1.25rem; border-radius: 8px; font-size: .88rem;
    font-weight: 500; margin-bottom: 1.25rem; position: relative;
}
.flash-success { background: #e6f4ea; color: var(--green); }
.flash-error { background: #fce8e6; color: var(--red); }
.flash-info { background: var(--blue-light); color: var(--blue); }
.flash-warning { background: #fef7e0; color: #e65100; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .65rem 1.4rem; border-radius: 8px; font-family: inherit; font-weight: 600;
    font-size: .88rem; text-decoration: none; border: none; cursor: pointer; transition: all .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-danger { background: var(--white); color: var(--red); border: 2px solid var(--red); }
.btn-danger:hover { background: #fce8e6; }
.btn-success { background: var(--green); color: var(--white); }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; border-radius: 6px; }
.btn-hero {
    display: inline-flex; align-items: center; gap: .5rem; padding: .9rem 1.8rem;
    border-radius: 50px; font-size: 1rem; font-weight: 700; text-decoration: none;
    transition: transform .2s, box-shadow .2s; cursor: pointer; border: none;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); text-decoration: none; }
.btn-hero-white { background: var(--white); color: var(--blue-dark); }
.btn-hero-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-hero-outline:hover { border-color: var(--white); }

/* ── Cards ── */
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem;
}
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--blue-dark); }

/* ── Sections ── */
.section { padding: 5rem 2rem; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: .5rem; color: var(--black); }
.section-subtitle { text-align: center; color: var(--gray); font-size: 1rem; max-width: 600px; margin: 0 auto 3rem; line-height: 1.6; }

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #842029; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-muted { background: #e2e3e5; color: #6c757d; }
.badge-verified { background: #e6f4ea; color: var(--green); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.form-group label { font-weight: 600; font-size: .85rem; color: #555; }
.form-input, .form-select, .form-textarea {
    padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: .9rem; font-family: inherit; transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--blue); outline: none;
}
.form-help { font-size: .78rem; color: var(--gray); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: .9rem; }
th { background: var(--gray-light); font-weight: 600; font-size: .8rem; text-transform: uppercase; color: #666; }

/* ── Footer ── */
.footer {
    background: #0a1929; padding: 3rem 2rem 1.5rem; color: rgba(255,255,255,.6);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem; max-width: 1100px; margin: 0 auto;
}
.footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--white); margin-bottom: .5rem; }
.footer-brand span { color: #4fc3f7; }
.footer-desc { font-size: .82rem; line-height: 1.6; margin-bottom: 1rem; }
.footer h4 { color: var(--white); font-size: .85rem; font-weight: 600; margin-bottom: .75rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: .4rem; }
.footer a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .82rem; transition: color .2s; }
.footer a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
    text-align: center; font-size: .75rem; max-width: 1100px; margin: 2rem auto 0;
    padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
}

/* ── Dashboard Shared ── */
.dash-header {
    background: var(--blue-dark); color: #fff; padding: 16px 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.dash-brand { font-size: 1.3rem; font-weight: 700; text-decoration: none; color: #fff; }
.dash-brand:hover { text-decoration: none; }
.dash-brand span { color: #8ab4f8; }
.dash-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dash-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; padding: 6px 14px; border-radius: 8px; transition: background .2s; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,.15); text-decoration: none; }
.dash-container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.dash-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.dash-card h2 { margin-bottom: 16px; font-size: 1.3rem; }
.dash-card h3 { margin: 20px 0 12px; font-size: 1.1rem; color: var(--blue-dark); }

/* ── KPIs ── */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.kpi-val { font-size: 2rem; font-weight: 800; color: var(--blue); }
.kpi-label { font-size: .85rem; color: #666; margin-top: 4px; }
.kpi-success .kpi-val { color: var(--green); }
.kpi-warning .kpi-val { color: #ffc107; }

/* ── Progress Bar ── */
.progress-bar-bg { background: #e9ecef; border-radius: 20px; height: 12px; overflow: hidden; margin-top: 8px; }
.progress-bar-fill { height: 100%; border-radius: 20px; background: var(--blue); transition: width .4s; }

/* ── Legal Pages ── */
.legal-page { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.legal-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem 2.5rem 3rem; }
.legal-card h1 { font-size: 1.6rem; font-weight: 700; color: var(--blue-dark); margin-bottom: .25rem; }
.legal-updated { font-size: .8rem; color: var(--gray); margin-bottom: 2rem; }
.legal-card h2 { font-size: 1.05rem; font-weight: 700; color: var(--blue-dark); margin: 2rem 0 .6rem; padding-top: .5rem; border-top: 1px solid var(--gray-light); }
.legal-card h2:first-of-type { border-top: none; margin-top: 0; }
.legal-card p, .legal-card li { font-size: .88rem; line-height: 1.75; color: var(--black); }
.legal-card ul, .legal-card ol { margin: .5rem 0 1rem 1.5rem; }
.legal-card li { margin-bottom: .3rem; }
.legal-card a { color: var(--blue); text-decoration: none; }
.legal-card a:hover { text-decoration: underline; }
.legal-card strong { font-weight: 600; }
.legal-highlight { background: #fef7e0; border-left: 4px solid #f9ab00; padding: .75rem 1rem; border-radius: 6px; margin: 1rem 0; font-size: .85rem; line-height: 1.7; }

/* ── Alert Boxes ── */
.alert-info { background: #d1ecf1; color: #0c5460; padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; }
.alert-warning { background: #fff3cd; color: #856404; padding: 12px 20px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .dash-container { padding: 16px; }
    .kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .navbar-links {
        display: none; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: var(--white);
        padding: 1rem 2rem; box-shadow: var(--shadow); gap: .75rem;
    }
    .navbar-links.open { display: flex; }
    .hamburger { display: block; }
    .section-title { font-size: 1.5rem; }
    .section { padding: 3rem 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .legal-card { padding: 1.5rem 1.25rem 2rem; }
    .legal-card h1 { font-size: 1.3rem; }
    .container { padding: 0 1rem; }
}
