/* =========================
   DESIGN SYSTEM
   ========================= */

:root {
    --bg: #0b1220;
    --panel: #111827;
    --panel-2: #0f172a;
    --text: #ffffff;
    --muted: #94a3b8;
    --border: #1f2937;
    --radius: 12px;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: var(--text);
}

/* =========================
   AUTH PAGES
   ========================= */

body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;padding: 20px;
    background: var(--bg);
}

/* container centers everything */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* login box */
.login-box {
    background: var(--panel);
    color: var(--text);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;max-width: 320px;
}

.login-box h2 {
    margin-bottom: 15px;
}

/* inputs */
input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    background: #020617;
    border: 1px solid var(--border);
    color: white;
    border-radius: 6px;
}

input::placeholder {
    color: #64748b;
}

/* button */
button {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

.error {
    color: red;
    font-size: 0.9em;
}

/* create account section */
.create-user {
    margin-top: 20px;
    text-align: center;
    width: 100%;max-width: 320px;
    color: var(--muted);
}

.create-user a {
    color: #60a5fa;
    text-decoration: none;
}

.create-user a:hover {
    text-decoration: underline;
}

/* =========================
   SAAS APP LAYOUT
   ========================= */

body.app-page {
    background: var(--bg);
}

.app {
    display: flex;
    min-min-height: 100vh;padding: 20px;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--panel-2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-right: 1px solid var(--border);
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
    background: #1e293b;
    color: white;
}

/* Main */
.main {
    flex: 1;
    padding: 30px;
}

/* Topbar */
.topbar h1 {
    font-size: 28px;
}

.topbar p {
    color: var(--muted);
    margin-top: 5px;
}

/* GRID */
.grid {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

/* CARD */
.card {
    background: var(--panel);
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card h3 {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.card .big {
    font-size: 24px;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
