/* ClearMTD — Clear brand identity */
:root {
    --navy: #1B2B4B;
    --white: #FFFFFF;
    --teal: #00B4A6;
    --teal-dark: #009688;
    --grey-50: #F8F9FA;
    --grey-100: #F1F3F5;
    --grey-200: #E9ECEF;
    --grey-400: #ADB5BD;
    --grey-600: #6C757D;
    --grey-800: #343A40;
    --red: #DC3545;
    --green: #28A745;
    --orange: #FD7E14;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--navy);
    background: var(--grey-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 1.5rem; }

/* Nav */
.nav {
    background: var(--navy);
    padding: 1rem 0;
    border-bottom: 2px solid var(--teal);
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.nav-logo {
    color: var(--white);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
    color: var(--grey-200);
    font-size: 0.9rem;
    text-decoration: none;
}
.nav-links a:hover { color: var(--white); }

/* Sandbox banner */
.sandbox-banner {
    background: var(--orange);
    color: var(--white);
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--grey-800);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 180, 166, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); text-decoration: none; }
.btn-secondary { background: var(--grey-200); color: var(--navy); }
.btn-secondary:hover { background: var(--grey-400); text-decoration: none; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c82333; text-decoration: none; }
.btn-full { width: 100%; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error { background: #FDF2F2; color: var(--red); border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: var(--green); border: 1px solid #BBF7D0; }
.alert-info { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--grey-200);
    font-size: 0.9rem;
}
.table th { font-weight: 600; color: var(--grey-600); font-size: 0.8rem; text-transform: uppercase; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }

/* Page sections */
.page-header {
    padding: 2rem 0 1.5rem;
}
.page-header h1 { font-size: 1.5rem; }
.page-header p { color: var(--grey-600); margin-top: 0.25rem; }

/* Hero (landing page) */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: var(--navy);
    color: var(--white);
}
.hero h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.hero h1 span { color: var(--teal); }
.hero p { font-size: 1.125rem; color: var(--grey-400); max-width: 600px; margin: 0 auto 2rem; }

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--grey-600); }
.text-small { font-size: 0.85rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Responsive */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.75rem; }
    .nav-links { gap: 1rem; }
    .table { font-size: 0.8rem; }
    .table th, .table td { padding: 0.5rem; }
}
