/* ============================================================
   style.css — Childminding Management System
   Premium theme v2.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
    --bg:         #f5f6fa;
    --surface:    #ffffff;
    --surface2:   #f8f9fb;
    --border:     #e8eaef;
    --border2:    #d1d5e0;
    --text:       #0f1117;
    --text2:      #374151;
    --muted:      #6b7280;
    --muted2:     #9ca3af;
    --accent:     #4f46e5;
    --accent2:    #6366f1;
    --accent-bg:  #f0efff;
    --radius:     14px;
    --radius-sm:  8px;
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:     0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --transition: all 0.18s ease;
    --success:    #059669;
    --success-bg: #ecfdf5;
    --success-bd: #a7f3d0;
    --error:      #dc2626;
    --error-bg:   #fef2f2;
    --error-bd:   #fecaca;
    --info-bg:    #f0efff;
    --info-bd:    #c4c5f4;
    --info-text:  #4f46e5;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.navbar-brand .logo-mark {
    width: 36px; height: 36px;
    min-width: 36px; min-height: 36px; max-width: 36px; max-height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    flex-shrink: 0; overflow: hidden;
}
.navbar-brand .logo-mark.fallback {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.navbar-brand .logo-mark img {
    width: 36px !important; height: 36px !important;
    max-width: 36px !important; max-height: 36px !important;
    min-width: 36px !important; min-height: 36px !important;
    object-fit: cover; border-radius: 9px; display: block;
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.navbar-brand .brand-name {
    font-size: 14px; font-weight: 700;
    color: var(--text); letter-spacing: -0.01em;
}

.navbar-brand .brand-sub {
    font-size: 10px; color: var(--muted2);
    text-transform: uppercase; letter-spacing: 0.07em;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.navbar-menu a {
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    color: var(--muted);
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.navbar-menu a:hover { color: var(--text); background: var(--surface2); }

.navbar-menu a.active {
    color: var(--accent);
    background: var(--accent-bg);
    font-weight: 600;
}

.navbar-right {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.badge-version {
    font-size: 10px; font-weight: 600; color: var(--muted);
    background: var(--surface2); border: 1px solid var(--border);
    padding: 2px 9px; border-radius: 20px; letter-spacing: 0.04em;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem 1.75rem 5rem;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.page-header-icon {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #f0efff, #e8e7ff);
    border: 1px solid #c4c5f4;
    box-shadow: 0 2px 8px rgba(79,70,229,0.1);
}

.page-title {
    font-size: 1.4rem; font-weight: 800;
    color: var(--text); letter-spacing: -0.02em;
    margin-bottom: 3px;
}

.page-subtitle {
    font-size: 13px; color: var(--muted); font-weight: 400;
}

/* ── ALERTS ──────────────────────────────────────────────── */
.alerte {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 500;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.alerte-success {
    background: var(--success-bg);
    border: 1px solid var(--success-bd);
    color: var(--success);
}

.alerte-error {
    background: var(--error-bg);
    border: 1px solid var(--error-bd);
    color: var(--error);
}

.alerte-info {
    background: var(--info-bg);
    border: 1px solid var(--info-bd);
    color: var(--info-text);
}

/* ── FORM CARD ───────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ── FORM SECTION ────────────────────────────────────────── */
.form-section {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
    font-size: 11.5px; font-weight: 700;
    color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.09em; margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: 9px;
}

.form-section-title::before {
    content: '';
    display: inline-block;
    width: 3px; height: 14px;
    background: linear-gradient(180deg, var(--accent), var(--accent2));
    border-radius: 2px; flex-shrink: 0;
}

.form-subsection-title {
    font-size: 11.5px; font-weight: 600;
    color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.07em; margin: 1.5rem 0 1rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}

/* ── FORM GRID ───────────────────────────────────────────── */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.125rem 1.5rem;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

/* ── LABELS ──────────────────────────────────────────────── */
label {
    font-size: 12px; font-weight: 600;
    color: var(--text2); letter-spacing: 0.01em;
}

.req { color: var(--error); margin-left: 2px; }

.form-hint {
    font-size: 11px; font-weight: 400;
    color: var(--muted2); font-style: italic; margin-left: 5px;
}

/* ── INPUTS ──────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 9px 13px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px; font-weight: 400;
    transition: var(--transition);
    outline: none;
    appearance: none; -webkit-appearance: none;
    line-height: 1.4;
}

input::placeholder, textarea::placeholder {
    color: var(--muted2); font-weight: 300;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

input[readonly] {
    background: var(--surface2); color: var(--muted); cursor: default;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer; opacity: 0.5;
}

textarea { resize: vertical; min-height: 78px; line-height: 1.6; }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── CHECKBOXES / RADIOS ─────────────────────────────────── */
.checkbox-group {
    display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px;
}

.checkbox-label {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 13px; font-weight: 500;
    color: var(--text2); text-transform: none; letter-spacing: 0;
    padding: 8px 14px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition); user-select: none;
}

.checkbox-label:hover {
    border-color: var(--accent); background: var(--accent-bg); color: var(--accent);
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: 15px; height: 15px;
    accent-color: var(--accent);
    cursor: pointer; flex-shrink: 0;
    border: none; box-shadow: none; padding: 0;
}

.checkbox-label input[type="radio"]:checked + * { color: var(--accent); }

/* ── NOTE BOXES ──────────────────────────────────────────── */
.form-preamble {
    padding: 1rem 2rem;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.form-preamble p {
    font-size: 13px; color: var(--muted);
    font-style: italic; line-height: 1.7;
}

.form-note {
    font-size: 12.5px; color: var(--muted);
    font-style: italic; margin-bottom: 1rem; line-height: 1.6;
}

.form-note-box {
    padding: 12px 15px;
    background: var(--info-bg); border: 1px solid var(--info-bd);
    border-radius: var(--radius-sm); font-size: 13px;
    color: var(--info-text); line-height: 1.6;
}

/* ── TABLES ──────────────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
}

.hours-table, .invoice-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}

.hours-table thead tr,
.invoice-table thead tr {
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.hours-table th, .invoice-table th {
    padding: 10px 14px;
    font-size: 10.5px; font-weight: 700;
    color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.07em; text-align: left; white-space: nowrap;
}

.hours-table td, .invoice-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.hours-table tbody tr:last-child td,
.invoice-table tbody tr:last-child td { border-bottom: none; }

.hours-table tbody tr:hover td,
.invoice-table tbody tr:hover td { background: #fafbff; }

.hours-table td input, .invoice-table td input {
    background: transparent;
    border: none; border-bottom: 1.5px solid var(--border);
    border-radius: 0; padding: 5px 6px;
    font-size: 13px; width: 100%; color: var(--text);
}

.hours-table td input:focus, .invoice-table td input:focus {
    border-bottom-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: none; outline: none;
}

.day-label {
    font-weight: 600; color: var(--text2); font-size: 13px;
    white-space: nowrap; padding-left: 14px !important; width: 110px;
}

.additional-row td { background: var(--surface2); }

.additional-hint {
    font-size: 11px; color: var(--muted2);
    font-style: italic; display: block; padding: 0 6px;
}

/* ── FORM ACTIONS ────────────────────────────────────────── */
.form-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 10px; padding: 1.375rem 2rem;
    background: var(--surface2); border-top: 1px solid var(--border);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff; border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px; font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    background: var(--surface); color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--border2); color: var(--text); background: var(--surface2);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1.375rem 1.5rem;
    font-size: 11.5px; color: var(--muted2);
    border-top: 1px solid var(--border); margin-top: 2rem;
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
/* ── HAMBURGER ─────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 36px; height: 36px;
    background: var(--surface2); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; padding: 0;
}
.hamburger span {
    display: block; width: 16px; height: 2px;
    background: var(--muted); border-radius: 2px;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .navbar { padding: 0 1rem; height: 54px; }
    .hamburger { display: flex; }
    .navbar-menu {
        display: none;
        position: absolute; top: 54px; left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        flex-direction: column; gap: 0; list-style: none;
        z-index: 200; padding: 8px 0;
    }
    .navbar-menu.open { display: flex; }
    .navbar-menu a {
        display: block; padding: 12px 20px;
        border-radius: 0; font-size: 14px;
        border-bottom: 1px solid var(--border);
    }
    .navbar-menu li:last-child a { border-bottom: none; }
    .main-content { padding: 1.25rem 1rem 4rem; }
    .form-section { padding: 1.25rem 1.125rem; }
    .form-preamble { padding: 0.875rem 1.125rem; }
    .form-actions { padding: 1rem 1.125rem; flex-direction: column-reverse; gap: 8px; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .form-group.full { grid-column: 1; }
    .page-header { gap: 0.875rem; }
    .page-header-icon { width: 44px; height: 44px; font-size: 20px; }
    .page-title { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .hours-table th:nth-child(3),
    .hours-table th:nth-child(4),
    .hours-table td:nth-child(3),
    .hours-table td:nth-child(4) { display: none; }
    .table-responsive { font-size: 12px; }
}