:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    font-size: 16px;
    min-height: 100vh;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 16px;
    margin-bottom: 24px;
}
.header-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}
.header a { color: var(--primary); text-decoration: none; font-size: .9rem; }
.header a:hover { text-decoration: underline; }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--gray-100);
}
.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}
.card-header p {
    font-size: .875rem;
    color: var(--gray-600);
    margin-top: 2px;
}
.card-body { padding: 20px; }
.card-footer {
    padding: 14px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}
label .hint {
    font-weight: 400;
    color: var(--gray-400);
    font-size: .8rem;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--gray-900);
    background: white;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.time-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}
.time-sep {
    color: var(--gray-400);
    font-size: 1.2rem;
    text-align: center;
    padding-top: 2px;
}
.day-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.day-row:last-child { border-bottom: none; }
.day-label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 80px;
}
.day-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.day-row.disabled input[type="time"] {
    opacity: .4;
    pointer-events: none;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 80px;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { background: #15803d; }
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-outline:hover { background: var(--gray-50); }
.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 10px;
    width: 100%;
}
.btn-sm {
    padding: 7px 14px;
    font-size: .875rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger  { background: var(--danger-light);  color: var(--danger);  border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #fde68a; }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; }

/* Hour display (for email link page) */
.hours-display {
    text-align: center;
    padding: 32px 20px;
}
.hours-display .date-label {
    font-size: .9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 500;
}
.hours-display .hours-big {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.02em;
    line-height: 1;
    margin-bottom: 6px;
}
.hours-display .hours-sep {
    color: var(--gray-400);
    font-size: 2rem;
    font-weight: 300;
}
.hours-display .day-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 32px;
}

/* Status badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 500;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 20px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 10px 18px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}
.tab.active, .tab:hover { color: var(--primary); }
.tab.active { border-bottom-color: var(--primary); }

/* Section divider */
.section-title {
    font-size: .75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 20px 0 10px;
}

/* Divider */
hr { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }

/* Mobile adjustments */
@media (max-width: 480px) {
    .hours-display .hours-big { font-size: 2.4rem; }
    .day-row { grid-template-columns: auto 1fr 1fr; gap: 8px; }
    .day-label { min-width: 68px; font-size: .8rem; }
}

/* Login page */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: 32px;
}
.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.login-card p {
    color: var(--gray-600);
    font-size: .9rem;
    margin-bottom: 24px;
}

/* Adjust page CTA */
.adjust-cta {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.adjust-cta .btn { flex: 1; }

/* Success page */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
