/* ============================================================
   VACATUM DESIGN SYSTEM v1.0
   ============================================================ */

/* --- RESET & BOX-SIZING --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- CSS VARIABLES --- */
:root {
    --primary:   #2c3e50;
    --accent:    #f7931a;
    --gold:      #d4af37;
    --bg:        #f8f9fa;
    --text:      #333333;
    --border:    #e0e0e0;
    --white:     #ffffff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.07);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --radius:    8px;
    --nav-height: 64px;
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- DARK MODE --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #1a1a2e;
        --white:     #16213e;
        --text:      #d8d8d8;
        --border:    #2e2e4a;
        --primary:   #8ab4d4;
        --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
        --shadow-md: 0 4px 20px rgba(0,0,0,0.45);
    }
}

/* --- BASE TYPOGRAPHY --- */
body {
    font-family: var(--font);
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    line-height: 1.3;
    margin-top: 0;
}

a { color: var(--accent); }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- VAC-NAV --- */
.vac-nav {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.vac-nav__container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vac-nav__logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vac-nav__logo span { color: var(--accent); }

.vac-nav__links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.vac-nav__links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.vac-nav__links a:hover,
.vac-nav__links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.vac-nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.vac-nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .vac-nav__hamburger { display: flex; }

    .vac-nav__links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem 2rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        text-align: center;
        gap: 1rem;
        z-index: 999;
    }

    .vac-nav__links.open { display: flex; }
}

/* --- VAC-FOOTER --- */
.vac-footer {
    margin-top: auto;
    background: var(--white);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: #7f8c8d;
    font-size: 0.9rem;
}

.vac-footer a {
    color: #7f8c8d;
    text-decoration: none;
    margin: 0 6px;
    transition: color 0.2s;
}

.vac-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* --- VAC-DISCLAIMER --- */
.vac-disclaimer {
    background: #1c1c1c;
    border-bottom: 3px solid var(--accent);
    font-size: 0.82rem;
    font-family: var(--font);
    position: relative;
    z-index: 9999;
}

.vac-disclaimer__body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.vac-disclaimer__text {
    color: #c8c8c8;
    line-height: 1.55;
    flex: 1;
}

.vac-disclaimer__controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 2px;
}

.vac-disclaimer__btn {
    background: none;
    border: 1px solid #555;
    color: #aaa;
    cursor: pointer;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 0.78rem;
    transition: border-color 0.2s, color 0.2s;
    font-family: var(--font);
}

.vac-disclaimer__btn:hover {
    border-color: #aaa;
    color: #fff;
}

.vac-disclaimer__mini {
    display: none;
    padding: 4px 16px;
    max-width: 1400px;
    margin: 0 auto;
    cursor: pointer;
    color: #777;
    font-size: 0.78rem;
}

/* --- VAC-CARD --- */
.vac-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
    border-top: 5px solid var(--border);
    display: flex;
    flex-direction: column;
}

.vac-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.vac-card--accent  { border-top-color: var(--accent); }
.vac-card--primary { border-top-color: var(--primary); }
.vac-card--gold    { border-top-color: var(--gold); }

/* --- VAC-BREADCRUMB --- */
.vac-breadcrumb {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.vac-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.vac-breadcrumb a:hover { color: var(--accent); }

.vac-breadcrumb__sep {
    margin: 0 6px;
    color: var(--border);
}

/* --- VAC-BTN --- */
.vac-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: var(--font);
}

.vac-btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.vac-btn--primary:hover {
    background: #e6841a;
    border-color: #e6841a;
    color: #fff;
}

.vac-btn--secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
}

.vac-btn--secondary:hover {
    background: var(--bg);
    border-color: var(--primary);
}

/* --- VAC-HERO --- */
.vac-hero {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.vac-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.vac-hero p {
    font-size: 1.15rem;
    color: #555;
    max-width: 650px;
    margin: 0 auto 2rem;
}

.vac-hero__img {
    max-width: 220px;
    height: auto;
    margin-bottom: 2rem;
    animation: vac-float 6s ease-in-out infinite;
}

@keyframes vac-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .vac-hero h1    { font-size: 2rem; }
    .vac-hero__img  { max-width: 160px; }
}

/* --- TABLE SCROLL WRAPPER --- */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.table-scroll table,
.vac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-scroll th,
.table-scroll td,
.vac-table th,
.vac-table td {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    text-align: left;
}

.table-scroll thead th,
.vac-table thead th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.table-scroll tbody tr:nth-child(even),
.vac-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

/* --- CHART CONTAINER --- */
.chart-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* --- BUTTONS – FINGER FRIENDLY --- */
.vac-btn {
    min-height: 44px;
}

/* --- FORMS ON MOBILE --- */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
    font-family: var(--font);
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--text);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- MOBILE SMALL --- */
@media (max-width: 480px) {
    .vac-nav { padding: 0 0.75rem; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
}

/* --- MOBILE 768px – RESPONSIVE LAYOUT --- */
@media (max-width: 768px) {
    /* Cards */
    .vac-card {
        padding: 1.1rem;
    }

    /* Tables become scrollable */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Forms */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="date"],
    select,
    textarea {
        width: 100%;
        box-sizing: border-box;
    }

    /* Chart containers */
    .chart-container,
    .chart-wrapper {
        min-height: 260px;
        height: auto;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Grid: single column on mobile */
    .dashboard-grid,
    .entry-grid,
    .grid {
        grid-template-columns: 1fr;
    }
}

/* --- MOBILE 360px – NO HORIZONTAL OVERFLOW --- */
@media (max-width: 400px) {
    .vac-nav {
        padding: 0 0.5rem;
    }
    .vac-nav__logo {
        font-size: 1.2rem;
    }
    .vac-card {
        padding: 0.9rem;
    }
    .vac-hero h1 {
        font-size: 1.5rem;
    }
    .vac-hero p {
        font-size: 1rem;
    }
    main,
    .container,
    .academy-container,
    .legal-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* --- WIDE SCREEN --- */
@media (min-width: 1400px) {
    .vac-nav, main, .container { max-width: 1400px; margin: 0 auto; }
}

/* --- PRINT / PDF --- */
@media print {
    .vac-nav,
    .vac-footer,
    .vac-disclaimer,
    .vac-breadcrumb,
    .vac-nav__hamburger,
    button { display: none !important; }

    @page { size: A4; margin: 2cm; }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
        line-height: 1.5;
    }

    h1, h2, h3 {
        page-break-after: avoid;
        color: #000;
    }

    table {
        page-break-inside: avoid;
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }

    table th, table td {
        border: 1px solid #999;
        padding: 4pt 6pt;
    }

    .vac-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .chart-container,
    .chart-wrapper {
        page-break-inside: avoid;
        max-height: 400px;
    }

    a[href]:after {
        content: ' (' attr(href) ')';
        font-size: 9pt;
        color: #555;
    }

    a[href^="#"]:after,
    a[href^="javascript"]:after {
        content: '';
    }
}
