/* ===== ADC Club — demo prototype theme ===== */

:root {
    --adc-brand: #4f46e5;
    --adc-brand-dark: #3730a3;
    --adc-staff: #0891b2;
    --adc-admin: #4f46e5;
    --adc-parent: #db2777;
    --adc-bg: #f5f6fa;
    --adc-card-border: #e5e7eb;
    --adc-muted: #6b7280;
}

html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
}

body {
    background-color: var(--adc-bg);
    color: #1f2937;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    margin-bottom: 60px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #818cf8;
}

/* ---- Navbar ---- */
.adc-navbar {
    background: linear-gradient(90deg, #312e81, #4f46e5);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.adc-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark {
    background: #fff;
    color: var(--adc-brand-dark);
    border-radius: 8px;
    padding: 0.1rem 0.5rem;
    font-weight: 800;
    text-transform: lowercase;
}

.adc-navbar .nav-link {
    color: rgba(255,255,255,0.78);
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    margin: 0 0.1rem;
}

.adc-navbar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.adc-navbar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
}

.persona-switch {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-weight: 600;
}

.persona-switch:hover, .persona-switch:focus, .persona-switch.show {
    background: rgba(255,255,255,0.24);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* ---- Footer ---- */
.adc-footer {
    border-top: 1px solid var(--adc-card-border);
    background: #fff;
    color: var(--adc-muted);
    font-size: 0.85rem;
    padding: 0.9rem 0;
    margin-top: 2rem;
}

.adc-footer a {
    color: var(--adc-muted);
}

/* ---- Page headers ---- */
.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.page-header .subtitle {
    color: var(--adc-muted);
}

/* ---- Cards ---- */
.adc-card {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}

.adc-card .card-body {
    padding: 1.25rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    height: 100%;
}

.stat-card .stat-label {
    color: var(--adc-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-note {
    color: var(--adc-muted);
    font-size: 0.85rem;
}

.stat-card.warn {
    border-color: #fecaca;
    background: #fef2f2;
}

.stat-card.warn .stat-value {
    color: #b91c1c;
}

/* ---- Badges ---- */
.adc-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #e5e7eb; color: #374151; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-pink { background: #fce7f3; color: #9d174d; }
.badge-cyan { background: #cffafe; color: #155e75; }

/* ---- Alerts ---- */
.adc-alert {
    border-radius: 10px;
    font-weight: 500;
}

.allergy-banner {
    background: #fef2f2;
    border: 2px solid #f87171;
    color: #991b1b;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    font-weight: 700;
    font-size: 1.05rem;
}

/* ---- Session cards ---- */
.session-card {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}

.session-card:hover {
    box-shadow: 0 4px 14px rgba(16,24,40,0.10);
}

.session-card .session-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.session-card .session-time {
    color: var(--adc-muted);
    font-weight: 600;
}

.session-card .session-metrics {
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.session-card .metric {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.session-card .metric .label {
    color: var(--adc-muted);
}

/* ---- Attendance register (tablet-first) ---- */
.register-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.6rem;
}

.register-row.present { border-left: 6px solid #16a34a; }
.register-row.collected { border-left: 6px solid #6b7280; }
.register-row.absent { border-left: 6px solid #dc2626; }
.register-row.notarrived { border-left: 6px solid #d1d5db; }

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.register-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.register-meta {
    color: var(--adc-muted);
    font-size: 0.9rem;
}

.register-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-touch {
    min-height: 48px;
    min-width: 130px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ---- Tables ---- */
.adc-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--adc-card-border);
}

.adc-table table {
    margin-bottom: 0;
}

.adc-table thead th {
    background: #f9fafb;
    color: var(--adc-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 1px solid var(--adc-card-border);
    padding: 0.7rem 1rem;
    white-space: nowrap;
}

.adc-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-scroll {
    overflow-x: auto;
}

/* ---- Persona landing ---- */
.persona-card {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.persona-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(16,24,40,0.12);
    color: inherit;
}

.persona-card .persona-icon {
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
}

.persona-card h3 {
    font-weight: 700;
    font-size: 1.3rem;
}

.persona-card p {
    color: var(--adc-muted);
    margin-bottom: 0;
}

/* ---- Persona accent touches ---- */
.persona-staff .adc-navbar { background: linear-gradient(90deg, #155e75, #0891b2); }
.persona-staff .brand-mark { color: #155e75; }
.persona-parent .adc-navbar { background: linear-gradient(90deg, #9d174d, #db2777); }
.persona-parent .brand-mark { color: #9d174d; }

/* ---- Detail lists ---- */
.detail-list dt {
    color: var(--adc-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.8rem;
}

.detail-list dd {
    margin-bottom: 0;
    font-size: 1rem;
}

/* ---- Forms ---- */
.adc-form .form-label {
    font-weight: 600;
}

.adc-form .form-control, .adc-form .form-select {
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
}

.adc-form .btn {
    border-radius: 8px;
    font-weight: 600;
}

/* ---- Buttons ---- */
.btn {
    border-radius: 8px;
}

.btn-adc {
    background: var(--adc-brand);
    border-color: var(--adc-brand);
    color: #fff;
    font-weight: 600;
}

.btn-adc:hover, .btn-adc:focus {
    background: var(--adc-brand-dark);
    border-color: var(--adc-brand-dark);
    color: #fff;
}

.btn-outline-adc {
    border-color: var(--adc-brand);
    color: var(--adc-brand);
    font-weight: 600;
}

.btn-outline-adc:hover {
    background: var(--adc-brand);
    color: #fff;
}

/* ---- Warning panel ---- */
.warning-panel {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 6px solid #f59e0b;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.danger-panel {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 6px solid #dc2626;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

/* ---- Confirmation ---- */
.confirmation-panel {
    text-align: center;
    padding: 3rem 1.5rem;
}

.confirmation-panel .confirm-icon {
    font-size: 3.5rem;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 767.98px) {
    .stat-card .stat-value { font-size: 1.6rem; }
    .register-row { flex-wrap: wrap; }
    .register-actions { width: 100%; }
    .register-actions .btn, .register-actions form { flex: 1; }
    .register-actions .btn-touch { width: 100%; }
}

/* ---- Child switcher ---- */
.child-switcher {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.child-switcher a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.4rem;
    border-radius: 999px;
    border: 2px solid var(--adc-card-border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.child-switcher a.active {
    border-color: var(--adc-parent);
    background: #fdf2f8;
}

.child-switcher .avatar {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
}

/* ---- Attendance calendar ---- */
.att-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.att-calendar .cal-head {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--adc-muted);
    text-transform: uppercase;
    padding: 0.25rem 0;
}

.cal-day {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 8px;
    min-height: 64px;
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cal-day.outside {
    background: #fafafa;
    border-color: #f1f1f4;
}

.cal-day .cal-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--adc-muted);
}

.cal-day.outside .cal-num {
    color: #c9ccd3;
}

.cal-day.today {
    border: 2px solid var(--adc-parent);
}

.cal-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.cal-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.cal-dot.morning { background: #22c55e; }
.cal-dot.afternoon { background: #3b82f6; }
.cal-dot.fullday { background: #a855f7; }

.cal-dot.pending {
    background: #fff;
    border: 2px dashed #f59e0b;
}

.cal-pill {
    display: block;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    padding: 1px 3px;
    line-height: 1.5;
}

.cal-pill.morning { background: #22c55e; }
.cal-pill.afternoon { background: #3b82f6; }
.cal-pill.fullday { background: #a855f7; }
.cal-pill.pending { background: #f59e0b; }

.cal-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--adc-muted);
}

.cal-legend .cal-dot {
    vertical-align: -2px;
    margin-right: 4px;
}

@media (max-width: 575.98px) {
    .cal-day { min-height: 52px; }
}

/* ---- Notifications ---- */
.notification-row.unread {
    background: #fdf2f8;
    border-left: 4px solid var(--adc-parent);
}

/* ---- Invoice ---- */
.invoice-header {
    background: #312e81;
    color: #fff;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.invoice-header .invoice-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.invoice-body {
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
}

.invoice-total-row td {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ---- Quick actions ---- */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid var(--adc-card-border);
    border-radius: 12px;
    padding: 1.1rem 0.5rem;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    height: 100%;
    transition: box-shadow 0.15s ease;
}

.quick-action:hover {
    box-shadow: 0 4px 14px rgba(16,24,40,0.10);
    color: inherit;
}

.quick-action .qa-icon {
    font-size: 1.6rem;
}

/* ---- Login / register ---- */
.auth-card {
    max-width: 460px;
    margin: 2rem auto;
}

.demo-credentials {
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}
