@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');

:root {
    --surface: #ffffff;
    --border: #e4e4e7;
    --border-inner: #f0f0f1;
    --text: #18181b;
    --muted: #71717a;
    --accent: #c026d3;
    --accent-light: #f3e8ff;
    --accent-hover: #a21caf;
    --radius: 12px;
    --fw-semibold: 600;
    --nav-width: 220px;
    --footer-height: 56px;
    font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ?? Layout Structure ????????????????????????????????? */
.layout-root {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.layout-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ?? Side Navigation ?????????????????????????????????? */
.side-nav {
    width: var(--nav-width);
    background: #f7f7f5;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.nav-logo {
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-section {
    padding: 16px 8px 8px;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 8px 8px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
}
    .nav-item > span {
        flex: 1;
    }

    .nav-item:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #222;
    }

    .nav-item.active {
        background: var(--accent);
        color: #fff;
        font-weight: 600;
    }

    .nav-item svg {
        flex-shrink: 0;
    }

.nav-spacer {
    flex: 1;
}

.nav-user {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.main-content {
    flex: 1;
    min-height: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.content-area {
    flex: 1;
    padding: 32px 40px;
}

/* ?? Footer ??????????????????????????????????????????? */
.footer {
    height: var(--footer-height);
    background: #f7f7f5;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--muted);
}

/* ?? Content Headers ?????????????????????????????????? */
.header {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .title h1 {
        margin: 0;
        font-size: 28px;
        font-weight: 700;
        letter-spacing: -0.5px;
        color: var(--text);
    }

    .title p {
        margin: 2px 0 0 0;
        color: var(--muted);
        font-size: 14px;
        font-weight: 400;
    }

/* ?? Login Form ??????????????????????????????????????? */
.login-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 380px;
}

    .login-card h2 {
        margin: 0 0 4px;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: -0.4px;
        color: var(--text);
    }

    .login-card .login-subtitle {
        margin: 0 0 24px;
        font-size: 14px;
        color: var(--muted);
    }

.login-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 24px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

    .login-field label {
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
    }

    .login-field input[type="text"],
    .login-field input[type="email"],
    .login-field input[type="password"] {
        border: 1.5px solid var(--border);
        border-radius: 8px;
        padding: 9px 12px;
        font-size: 14px;
        font-family: inherit;
        color: var(--text);
        background: var(--surface);
        outline: none;
        transition: border-color 0.15s, box-shadow 0.15s;
        width: 100%;
    }

        .login-field input[type="text"]:focus,
        .login-field input[type="email"]:focus,
        .login-field input[type="password"]:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-light);
        }

    .login-field .field-error {
        font-size: 12px;
        color: #dc2626;
    }

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

    .login-remember input[type="checkbox"] {
        width: 16px;
        height: 16px;
        border: 1.5px solid #d4d4d8;
        border-radius: 4px;
        accent-color: var(--accent);
        cursor: pointer;
        flex-shrink: 0;
    }

    .login-remember label {
        font-size: 14px;
        color: #3f3f46;
        cursor: pointer;
    }

.login-submit {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

    .login-submit:hover {
        background: var(--accent-hover);
    }

.login-footer-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.login-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 10px;
}

.login-create-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--surface);
    color: var(--accent);
    border: 1.5px solid #e4d5f5;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

    .login-create-btn:hover {
        background: #fdf4ff;
        border-color: var(--accent);
    }

/* ?? Responsive ??????????????????????????????????????? */
@media (max-width: 768px) {
    :root {
        --nav-width: 200px;
    }

    .content-area {
        padding: 20px 24px;
    }

    .title h1 {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    :root {
        --nav-width: 200px;
    }

    .layout-body {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .content-area {
        padding: 16px;
    }

    .title h1 {
        font-size: 18px;
    }

    .login-card {
        padding: 28px 20px 24px;
    }
}

.nav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    background: #eee;
    color: #888;
    margin-left: 8px;
}

    /* shown when there ARE unread notifications */
    .nav-badge.active {
        background: #f4c2f4;
        color: #8b5a8b;
    }
