@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&family=League+Spartan:wght@100..900&display=swap');

/* ============================================================
   CSS DESIGN SYSTEM — Custom PHP Framework
   Dark mode by default. Override with light-mode class on body.
   ============================================================ */

:root {
    /* Core Colors */
    --background:    #030407;
    --surface:       #0d1117;
    --surface-2:     #161b22;
    --border:        #21262d;
    --primary:       #FFFFFF;
    --secondary:     #4A4A4A;
    --accent:        #FF4A00;
    --accent-hover:  #e03e00;

    /* Text */
    --text-primary:  #e6edf3;
    --text-secondary:#8b949e;
    --text-active:   #FF4A00;
    --underline-color:#FF4A00;

    /* Status */
    --success:       #3fb950;
    --warning:       #d29922;
    --error:         #f85149;
    --info:          #388bfd;

    /* Typography */
    --font-base:     "Be Vietnam Pro", sans-serif;
    --font-accent:   "League Spartan", sans-serif;
    --fs-xxl:        80px;
    --fs-xl:         60px;
    --fs-lg:         32px;
    --fs-md:         24px;
    --fs-sm:         18px;
    --fs-xs:         14px;
    --fs-2xs:        12px;
    --lh-heading:    1.1;
    --lh-body:       1.6;

    /* Spacing */
    --space-xs:  8px;
    --space-sm:  12px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-xxl: 48px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);

    /* Transitions */
    --transition: all 0.25s ease;

    /* Layout */
    --sidebar-width: 240px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    background: var(--background);
    color: var(--text-primary);
    line-height: var(--lh-body);
    cursor: none;        /* Custom ball cursor replaces default */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

p { color: var(--text-secondary); line-height: var(--lh-body); }

img { max-width: 100%; display: block; }

/* ─── Custom Ball Cursor ─────────────────────────────────── */
.ball {
    width: 10px;
    height: 10px;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.ball::after {
    content: '';
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 0; left: 0;
    z-index: 9999;
}

.ball::before {
    content: '';
    width: 32px; height: 32px;
    border: 1.5px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    top: -12px; left: -12px;
    z-index: 9998;
    opacity: 0.6;
    transition: width 0.15s ease, height 0.15s ease, top 0.15s ease, left 0.15s ease, opacity 0.1s ease;
}

/* Expand ring on hoverable elements */
a:hover ~ .ball::before,
button:hover ~ .ball::before { width: 48px; height: 48px; top: -20px; left: -20px; opacity: 1; }

/* ─── Public Navigation ──────────────────────────────────── */
.core-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xxl);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(3, 4, 7, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav__brand a {
    font-family: var(--font-accent);
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav__links {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}

.nav-item {
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-item:hover,
.nav-item.active { color: var(--primary); }
.nav-item:hover::after,
.nav-item.active::after { width: 100%; }

/* ─── Main Content ───────────────────────────────────────── */
#main-content {
    padding-top: 80px;  /* below fixed nav */
    min-height: 100vh;
}

/* ─── Hero Section ───────────────────────────────────────── */
.public-home { display: flex; align-items: center; min-height: 100vh; padding: 0 var(--space-xxl); }

.hero h1 {
    font-family: var(--font-accent);
    font-size: var(--fs-xxl);
    font-weight: 900;
    line-height: var(--lh-heading);
    letter-spacing: -2px;
}

.hero h1 span { color: var(--accent); }

.hero__sub {
    margin-top: var(--space-md);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,74,0,0.3); }

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--primary); transform: translateY(-2px); }

/* ─── Footer ─────────────────────────────────────────────── */
.core-footer {
    text-align: center;
    padding: var(--space-xl);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: var(--fs-xs);
}

/* ─── Error Page ─────────────────────────────────────────── */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: var(--space-md);
    text-align: center;
    padding: var(--space-xxl);
}

.error-container h1 { font-size: var(--fs-xl); font-family: var(--font-accent); }

/* ─── Login / Signup ─────────────────────────────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xxl);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xxl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    font-family: var(--font-accent);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xl);
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-md); }

.form-group label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

.form-group input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-base);
    font-size: var(--fs-sm);
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,74,0,0.15); }

/* ─── Admin Panel ────────────────────────────────────────── */
body.dark-mode { background: var(--background); }

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar__brand {
    padding: var(--space-xl) var(--space-lg);
    font-family: var(--font-accent);
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

.sidebar__nav { list-style: none; padding: var(--space-lg) 0; flex: 1; }

.sidebar__item a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: var(--transition);
}

.sidebar__item a:hover,
.sidebar__item.active a {
    color: var(--primary);
    background: rgba(255, 74, 0, 0.08);
    border-right: 3px solid var(--accent);
}

.sidebar__item--logout { margin-top: auto; }
.sidebar__item--logout a:hover { color: var(--error); background: rgba(248,81,73,0.08); border-right-color: var(--error); }

.main-panel {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-navbar__title { font-weight: 600; font-size: var(--fs-sm); }

.admin-navbar__right { display: flex; align-items: center; gap: var(--space-lg); }

.admin-navbar__user { font-size: var(--fs-xs); color: var(--text-secondary); }

.btn-logout {
    font-size: var(--fs-xs);
    color: var(--error);
    border: 1px solid var(--error);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.btn-logout:hover { background: var(--error); color: var(--primary); }

.content { padding: var(--space-xxl); }

/* Stat Cards */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-xxl); }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.stat-card h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.stat-value { font-family: var(--font-accent); font-size: var(--fs-xl); font-weight: 700; color: var(--accent); }

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

.sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    body { cursor: auto; }
    .ball { display: none; }

    .core-nav { padding: var(--space-md); }
    .nav__links { gap: var(--space-lg); }

    .hero h1 { font-size: var(--fs-xl); }

    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-panel { margin-left: 0; }
    .sidebar-toggle { display: flex; }
}
