@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --border: #cbd5e1;
    --border-strong: #94a3b8;
    --border-focus: #2563eb;
    --primary: #1e3a8a;
    --primary-strong: #1e40af;
    --accent: #0369a1;
    --danger: #be123c;
    --danger-strong: #9f1239;
    --success: #065f46;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15.6px; /* Increased by 20% from 13px base size */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 5px;
    border: 2px solid #e2e8f0;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

a {
    color: #1d4ed8;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* High contrast Navy header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: var(--primary);
    border: 2px solid var(--primary-strong);
    color: #ffffff;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid var(--border-strong);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.brand-logo img {
    width: 100%;
    height: auto;
    padding: 2px;
}

.brand-copy h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-copy h1 i {
    color: #93c5fd;
}

.brand-copy p {
    margin: 6px 0 0;
    max-width: 600px;
    color: #e0f2fe;
    font-size: 1rem;
    font-weight: 500;
}

.cards {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

/* Solid card styling */
.card {
    display: block;
    padding: 20px;
    background: var(--surface);
    border-radius: 16px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    background: var(--surface-alt);
}

.card h2 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    font-size: 1.3rem;
}

.card p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* Panels with thick solid borders */
.panel {
    background: var(--surface);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow);
}

.panel h2 {
    margin-top: 0;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel h2 i {
    color: var(--primary);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.inline-field {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

.inline-field input {
    margin-top: 0;
    flex: 1;
}

.inline-field button {
    white-space: nowrap;
}

/* Standard readable form controls */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    border: 2px solid var(--border-strong);
    border-radius: 10px;
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.15s ease;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    outline: 2px solid transparent;
}

select option {
    padding: 8px;
    font-size: 1rem;
}

/* Standard clickable buttons */
button,
.secondary,
a.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    border: none;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.3;
}

button:hover,
.secondary:hover,
a.secondary:hover {
    transform: translateY(-2px);
}

button:active,
.secondary:active,
a.secondary:active {
    transform: translateY(0);
}

button.primary,
button[type="submit"]:not(.secondary):not(.danger),
a.primary {
    background: var(--primary);
    color: #ffffff;
    border: 2px solid var(--primary-strong);
    box-shadow: 0 3px 6px rgba(30, 58, 138, 0.15);
    text-decoration: none;
}

button.primary:hover,
button[type="submit"]:not(.secondary):not(.danger):hover,
a.primary:hover {
    background: var(--primary-strong);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.secondary,
a.secondary {
    background: #ffffff;
    color: var(--text);
    border: 2px solid var(--border-strong);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.secondary:hover,
a.secondary:hover {
    background: #f8fafc;
    border-color: var(--text);
}

button.danger,
a.danger {
    background: var(--danger);
    color: #ffffff;
    border: 2px solid var(--danger-strong);
    box-shadow: 0 3px 6px rgba(190, 18, 60, 0.15);
    text-decoration: none;
}

button.danger:hover,
a.danger:hover {
    background: var(--danger-strong);
    box-shadow: 0 4px 10px rgba(190, 18, 60, 0.25);
}

/* Accessible checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-strong);
    accent-color: var(--primary);
    cursor: pointer;
    margin: 0;
}

/* High contrast alert containers */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    background: #dbeafe;
    color: #1e3a8a;
    margin-bottom: 20px;
    border: 2px solid #3b82f6;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

/* Zebra striped tables */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid var(--border-strong);
    background: #ffffff;
    margin-top: 16px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

th {
    background: #1e293b;
    color: #ffffff;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #0f172a;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

tbody tr:hover {
    background-color: #e2e8f0;
}

.small-text {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
    font-weight: 500;
}

.hidden {
    display: none;
}

footer {
    margin-top: 30px;
    text-align: center;
    border-top: 2px solid var(--border);
    padding-top: 20px;
}

footer p {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

/* Calendar status elements */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.2);
}
.status-dot.green {
    background: #10b981;
}
.status-dot.red {
    background: #f43f5e;
}
.status-dot.orange {
    background: #f59e0b;
}

.course-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 2px dashed var(--border);
    gap: 16px;
}

.course-row:last-child {
    border-bottom: none;
}

.course-meta {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 4px;
    font-weight: 500;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 700;
}

.legend span {
    display: flex;
    align-items: center;
}

.section-spacer {
    height: 25px;
}

dialog {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    margin: 0;
    border: none;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
}

body:has(dialog[open]) {
    overflow: hidden;
}

@media (min-width: 720px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
