:root {
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --ink: #1e1b2e;
    --paper: #f7f7fb;
    --surface: #ffffff;
    --border: #ececf3;
    --muted: #6b6980;
    --shadow-color: 30, 27, 46;
}

[data-bs-theme="dark"] {
    --brand: #6366f1;
    --brand-hover: #818cf8;
    --ink: #e8e6f0;
    --paper: #14121e;
    --surface: #1b1926;
    --border: #2c283b;
    --muted: #a29fb5;
    --shadow-color: 0, 0, 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--paper);
    color: var(--ink);
}

.app-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-top: .85rem;
    padding-bottom: .85rem;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}

.navbar-brand {
    font-weight: 700;
    color: var(--ink) !important;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .6rem;
    background: var(--brand);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}

.card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(var(--shadow-color), .04);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-radius: 1rem 1rem 0 0 !important;
    font-weight: 600;
}

.auth-shell,
.form-shell {
    max-width: 640px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.hero h1 {
    font-weight: 700;
    letter-spacing: -.02em;
}

.hero p {
    color: var(--muted);
    font-size: 1.05rem;
}

.option-card {
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, box-shadow .12s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(var(--shadow-color), .08);
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-header:hover {
    color: var(--brand);
}

.sort-indicator {
    display: inline-block;
    width: 1em;
    font-size: .7em;
    margin-left: .25rem;
}

.app-footer {
    border-top: 1px solid var(--border);
}

.badge {
    font-weight: 600;
    letter-spacing: .01em;
}

.assignment-picker {
    position: relative;
}

.assignment-pill .btn-close {
    font-size: .55rem;
    opacity: .85;
}

.assignment-pill .btn-close:hover {
    opacity: 1;
}

.assignment-dropdown {
    position: absolute;
    z-index: 20;
    width: 100%;
    max-height: 12rem;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(var(--shadow-color), .12);
}
