/* ---------------------------------------------------------
   GLOBAL VARIABLES
   --------------------------------------------------------- */
:root {
  --bg: #eaf3ff;
  --card: #fff;
  --text: #173b63;
  --muted: #5d7fa6;
  --border: #cfe2ff;

  --accent: #76a9fa;
  --accent-600: #4f89f5;
  --accent-700: #3c70d8;

  --green: #22c55e;
  --green-bg: #e8fbe8;

  --orange: #f59e0b;
  --orange-bg: #fff4d6;

  --red: #ef4444;
  --red-bg: #ffe2e2;

  --purple: #6b21a8;

  --radius: 14px;
  --shadow: 0 6px 20px rgba(32, 64, 128, 0.1);
}

/* ---------------------------------------------------------
   RESET & BASE
   --------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(800px 400px at 10% 10%, #d9ecff, transparent 50%),
    radial-gradient(900px 500px at 90% 0%, #cde3ff, transparent 55%),
    var(--bg);
}

/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */
.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.card {
  width: 100%;
  max-width: 980px;
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(118,169,250,0.20), transparent 35%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 14px 40px rgba(32,64,128,0.15);
}

/* ---------------------------------------------------------
   HEADERS & TITLES
   --------------------------------------------------------- */
.header,
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.title,
h1 {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   FORMS & INPUTS
   --------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.label {
  font-size: 0.95rem;
  color: var(--text);
}

.input,
.select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f6fbff;
  color: var(--text);
  outline: none;
}

.input[disabled],
.select[disabled],
button[disabled] {
  background: #d9d9d9 !important;
  color: #555 !important;
  border-color: #aaa !important;
  cursor: not-allowed;
}

.section {
  margin-bottom: 1.5rem;
}

.section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent-700);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.table-container {
  overflow-x: auto;
  margin-top: 0.9rem;
}

.form-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table th,
.form-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.form-table tr.row-disabled {
  opacity: 0.55;
}

.form-table tr.row-fading {
  opacity: 0.45;
}

.row-error {
  background: rgba(238, 128, 128, 0.85) !important;
}

.row-success {
  background: rgba(34, 197, 94, 0.15)!important;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.grid-table th,
.grid-table td {
  padding: 0.75rem;
  text-align: left;
}

.grid-table thead tr {
  background: var(--surface);
}

.grid-table tbody tr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.grid-table thead tr,
.grid-table tbody tr {
  width: 100%;
}

@media (max-width: 720px) {
  .grid-table thead {
    display: none;
  }

  .grid-table tbody tr {
    grid-template-columns: 1fr;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    padding: 0.5rem;
  }

  .grid-table tbody tr td {
    display: block;
    width: 100%;
    border: none;
    padding: 0.35rem 0;
  }

  .grid-table tbody tr td:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }
}

.autosave-error {
  background: #ffe5e5 !important;
  border-color: #ff7f7f !important;
}

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--accent), var(--accent-600));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-600));
  color: #fff;
}

.btn-secondary {
  display: inline-block;
  background: linear-gradient(180deg, #f6fbff, #eaf3ff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
/*  margin-right: 0.4rem;*/
  color: var(--accent-700);
  font-weight: 600;
  cursor: pointer;
}

.footer-actions .btn + .btn {
  margin-left: 0.5rem;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  z-index: 9999;
  pointer-events: none;
}

.busy-overlay.visible {
  display: flex;
  pointer-events: all;
}

.busy-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(16, 32, 72, 0.18);
  max-width: min(90%, 380px);
  text-align: center;
}

.busy-spinner {
  width: 3rem;
  height: 3rem;
  border: 0.4rem solid rgba(118, 169, 250, 0.28);
  border-top-color: var(--accent-700);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.busy-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------
   LANGUAGE SELECTOR
   --------------------------------------------------------- */
.lang-select {
  appearance: none;
  background: linear-gradient(180deg, #f6fbff, #eaf3ff);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ---------------------------------------------------------
   TABLES
   --------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(32,64,128,0.1);
}

thead th {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: #f6fbff;
  font-weight: 700;
}

tbody td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

/* ---------------------------------------------------------
   LINKS & TEXT
   --------------------------------------------------------- */
a {
  color: var(--accent-700);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

/* ---------------------------------------------------------
   STATUS COLORS
   --------------------------------------------------------- */
.ok-green,
.status-ok {
  color: var(--green);
  font-weight: 700;
}

.ok-red,
.status-todo {
  color: var(--red);
  font-weight: 700;
}

.ok-orange {
  color: var(--orange);
}

.ok-purple {
  color: var(--purple);
  font-weight: 700;
}

/* ---------------------------------------------------------
   GRID
   --------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 980px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   ATTENDANCE LAYOUT
   --------------------------------------------------------- */
#attendance-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.day-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(32,64,128,0.1);
  margin-bottom: 1rem;
}

.day-header {
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--accent-700);
}

.day-card .field {
  margin-bottom: 0.75rem;
}

.day-card.valid-true {
  background: #e8fbe8;
  border-color: var(--green);
}

.day-card.valid-false {
  background: #fdeaea;
  border-color: var(--red);
}

/* Desktop layout */
@media (min-width: 1000px) {
  #attendance-body {
    gap: 0.5rem;
  }

  .day-card {
    display: grid;
    grid-template-columns: 120px 180px 120px 120px 120px 120px;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  .day-card .field {
    margin-bottom: 0;
  }

  .day-header {
    margin-bottom: 0;
  }
}

/* ---------------------------------------------------------
   DASHBOARD CARDS
   --------------------------------------------------------- */
.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(32,64,128,0.1);
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   MISC
   --------------------------------------------------------- */
.actions,
.footer-actions {
  margin-top: 1rem;
  white-space: nowrap;
}

.notice {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.respite-warning {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--red);
}

.flex-counter {
  margin-left: 0.5rem;
  font-weight: 700;
}

.child-link {
  color: var(--accent-700);
  font-weight: 700;
}

.child-link:hover {
  text-decoration: underline;
}

.week-header {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-700);
}





.password-rules ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.password-rules li.rule {
    font-size: 14px;
    margin: 4px 0;
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
} 

/* icoon vóór de tekst */
.password-rules li.rule::before {
    content: "✖";
    color: #d9534f;
    font-weight: bold;
    width: 1em;
}

/* fout */
.password-rules li.error {
    color: #d9534f;
	text-decoration: line-through;
}

/* goed */
.password-rules li.ok {
    color: #28a745;
    transform: translateX(4px);
}

.password-rules li.ok::before {
    content: "✔";
    color: #28a745;
}

/* Password strength container */
.password-strength {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Background bar */
.password-strength #strength-bar {
    height: 8px;
    width: 0%;
    background: red;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Strength label */
.password-strength #strength-text {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--muted-text, #666);
}






/* ---------------------------------------------------------
   RTL SUPPORT
   --------------------------------------------------------- */

html[dir="rtl"] body {
    direction: rtl;
}

/* Margins */
html[dir="rtl"] .btn-secondary {
    margin-right: 0;
    margin-left: 0.4rem;
}

html[dir="rtl"] .footer-actions .btn + .btn {
    margin-left: 0;
    margin-right: 0.5rem;
}

html[dir="rtl"] .flex-counter {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Text alignment */
html[dir="rtl"] thead th,
html[dir="rtl"] tbody td,
html[dir="rtl"] .child-link,
html[dir="rtl"] .muted,
html[dir="rtl"] .week-header,
html[dir="rtl"] .dashboard-card,
html[dir="rtl"] .day-card,
html[dir="rtl"] .field,
html[dir="rtl"] .label {
    text-align: right;
}

/* Flex direction */
html[dir="rtl"] .header,
html[dir="rtl"] .topbar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .actions,
html[dir="rtl"] .footer-actions {
    text-align: right;
}

/* Password rules */
html[dir="rtl"] .password-rules ul {
    text-align: right;
}

html[dir="rtl"] .password-rules li.rule {
    flex-direction: row-reverse;
}

html[dir="rtl"] .password-rules li.rule::before {
    margin-left: 6px;
    margin-right: 0;
}

html[dir="rtl"] .password-rules li.ok {
    transform: translateX(-4px);
}

/* Tables */
html[dir="rtl"] table {
    direction: rtl;
}

html[dir="rtl"] thead th,
html[dir="rtl"] tbody td {
    text-align: right;
}







.checkbox-field {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}





.divider {
    border: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 1.5rem 0;
}

.info.small {
    font-size: 0.85rem;
    opacity: 0.75;
}


html[dir="rtl"] .header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header > div {
    flex-direction: row-reverse;
}

/* --- Hamburger button (desktop hidden) --- */
.menu-toggle {
    display: none;
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
}

/* --- Desktop menu items (zichtbaar) --- */
.menu-items {
    display: flex;
    gap: 0.5rem;
    position: relative; /* belangrijk: geen absolute op desktop */
}

/* --- Overlay behind mobile menu --- */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 900;
}

/* --- Mobile layout --- */
@media (max-width: 600px) {

    /* Hamburger zichtbaar */
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
    }

    /* Mobile menu (verborgen standaard) */
    .menu-items {
        display: none;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-radius: 14px;
        border: 1px solid #ddd;
        position: absolute;
        right: 1rem;
        top: 3.5rem;
        width: 180px;
        z-index: 1000;

        /* animatie */
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    /* Mobile menu open */
    .menu-items.open {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
}

.day-card {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.day-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.field {
    margin-bottom: 0.8rem;
}

.status-todo {
    color: #d9534f;
    font-weight: bold;
    margin-left: 0.5rem;
}

.status-ok {
    color: #5cb85c;
    font-weight: bold;
    margin-left: 0.5rem;
}
.attendance-btn {
    display: inline-block;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}









/* ---------------------------------------------------------
   DASHBOARD CARDS
   --------------------------------------------------------- */

.dashboard-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-bottom: 1.2rem;
}

/* Naam van het kind */
.dashboard-card .day-header {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent-700);
    margin-bottom: 0.8rem;
}

/* Periode-secties */
.dashboard-card .field {
    margin-bottom: 0.9rem;
}

/* Label links van de knoppen */
.dashboard-card .field label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
    display: block;
}

/* ---------------------------------------------------------
   DESKTOP LAYOUT
   --------------------------------------------------------- */
@media (min-width: 900px) {
    .dashboard-card {
        display: grid;
        grid-template-columns: 220px 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }

    .dashboard-card .day-header {
        margin-bottom: 0;
    }

    .dashboard-card .field {
        margin-bottom: 0.5rem;
    }

    .dashboard-card .field label {
        margin-bottom: 0.4rem;
    }
}






/* ---------------------------------------------------------
   ATTENDANCE BUTTONS
   --------------------------------------------------------- */

.attendance-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(180deg, var(--accent), var(--accent-600));
    color: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0.25rem 0;
    white-space: nowrap;
}

/* Kalender-icoon */
.attendance-btn::before {
    content: "📅";
    font-size: 1rem;
}

/* Status-badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-ok {
    background: #d1f7d8;
    color: var(--green);
}

.badge-todo {
    background: #ffe0e0;
    color: var(--red);
}








/* ---------------------------------------------------------
   RTL SUPPORT
   --------------------------------------------------------- */

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .header,
html[dir="rtl"] .topbar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .dashboard-card,
html[dir="rtl"] .day-card,
html[dir="rtl"] .field,
html[dir="rtl"] .label,
html[dir="rtl"] .muted,
html[dir="rtl"] .week-header {
    text-align: right;
}

html[dir="rtl"] .password-rules li.rule {
    flex-direction: row-reverse;
}

html[dir="rtl"] .password-rules li.rule::before {
    margin-left: 6px;
    margin-right: 0;
}



/* ---------------------------------------------------------
   MOBILE MENU
   --------------------------------------------------------- */

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-items {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 900;
}

@media (max-width: 600px) {
    .menu-toggle {
        display: block;
    }

    .menu-items {
        display: none;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-radius: 14px;
        border: 1px solid #ddd;
        position: absolute;
        right: 1rem;
        top: 3.5rem;
        width: 180px;
        z-index: 1000;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .menu-items.open {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
}













:root {
  --bg: #eaf3ff;
  --card: #fff;
  --text: #173b63;
  --muted: #5d7fa6;
  --border: #cfe2ff;

  --accent: #76a9fa;
  --accent-600: #4f89f5;
  --accent-700: #3c70d8;

  --green: #22c55e;
  --green-bg: #e8fbe8;

  --orange: #f59e0b;
  --orange-bg: #fff4d6;

  --red: #ef4444;
  --red-bg: #ffe2e2;

  --radius: 14px;
  --shadow: 0 6px 20px rgba(32,64,128,0.1);
}












* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(800px 400px at 10% 10%, #d9ecff, transparent 50%),
    radial-gradient(900px 500px at 90% 0%, #cde3ff, transparent 55%),
    var(--bg);
}





.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.card {
  width: 100%;
  max-width: 980px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}




.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-items {
  display: flex;
  gap: 0.5rem;
  position: relative;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 900;
}

@media (max-width: 600px) {
  .menu-toggle { display: block; }

  .menu-items {
    display: none;
    flex-direction: column;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: absolute;
    right: 1rem;
    top: 3.5rem;
    width: 180px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .25s, transform .25s;
  }

  .menu-items.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }
}







.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-600));
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(180deg, #f6fbff, #eaf3ff);
  border: 1px solid var(--border);
  color: var(--accent-700);
}


/* ---------------------------------------------------------
   WEEK HEADERS (ATTENDANCE)
   --------------------------------------------------------- */

.week-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 .75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-700);
}

.week-icon {
    font-size: 1.4rem;
}

.week-title {
    flex-grow: 1;
}

.week-badge {
    background: var(--accent-600);
    color: #fff;
    padding: .25rem .6rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(79,137,245,0.25);
}


/* ---------------------------------------------------------
   ATTENDANCE BUTTONS (STATUS-BASED COLORS)
   --------------------------------------------------------- */

.attendance-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    margin: .25rem 0;
    white-space: nowrap;
    color: #fff;
    transition: background .25s ease, box-shadow .25s ease;
}

/* Icon */
.attendance-btn::before {
    content: "📅";
    font-size: 1rem;
}

/* --- COMPLETE (GROEN) --- */
.attendance-complete {
    background: var(--green);
    box-shadow: 0 3px 10px rgba(34,197,94,0.25);
}

/* --- TODO (ORANJE) --- */
.attendance-todo {
    background: var(--orange);
    box-shadow: 0 3px 10px rgba(245,158,11,0.25);
}

/* Hover states */
.attendance-complete:hover {
    background: #1ea34f;
}

.attendance-todo:hover {
    background: #e08c07;
}

.badge {
  padding: .15rem .45rem;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 700;
}

.badge-ok {
  background: var(--green-bg);
  color: var(--green);
}

.badge-todo {
  background: var(--orange-bg);
  color: var(--orange);
}






.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}

.day-header {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-700);
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.day-header::before {
  font-size: 1.3rem;
}

.day-header.child-header::before {
  content: "👦";
}

.dashboard-card:nth-child(even) .day-header.child-header::before {
  content: "👧";
}

.day-header.daycare-header::before {
  content: "🏫";
}

.day-header.date-header::before {
  content: "⏰";
}

.list-children-page {
  display: grid;
  gap: 1.4rem;
}

.filters-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.filter-top-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-title h2 {
  margin: 0;
}

.filter-subtitle {
  margin: 0.35rem 0 0;
  color: var(--accent-500);
  font-size: 0.95rem;
}

.filter-groups {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.filter-group {
  display: grid;
  gap: 0.5rem;
}

.date-range {
  display: grid;
  gap: 0.75rem;
}

.children-results {
  display: grid;
  gap: 1rem;
}

.child-row {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
}

.child-row .child-header {
  margin: 0;
}

/*@media (min-width: 1000px) {
  .child-row {
    grid-template-columns: 220px 140px 140px minmax(220px, 1fr) 220px 120px;
    align-items: center;
  }

  .child-row .child-header {
    margin-bottom: 0;
  }
}*/

.child-column {
  min-width: 0;
}

.child-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}

.child-periods .period-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.child-periods .period-item:last-child {
  border-bottom: none;
}

.period-description {
  font-size: 0.95rem;
}

.period-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-icon {
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.85rem;
}

.period-empty,
.list-empty,
.list-error,
.list-loading {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.field {
  margin-bottom: .9rem;
}

.field label {
  font-weight: 600;
  margin-bottom: .3rem;
  display: block;
}

@media (min-width: 900px) {
  .dashboard-card {
    display: grid;
    grid-template-columns: 220px 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .day-header { margin-bottom: 0; }

  .field { margin-bottom: .5rem; }
}




html[dir="rtl"] body { direction: rtl; }

html[dir="rtl"] .header,
html[dir="rtl"] .menu-items {
  flex-direction: row-reverse;
}

html[dir="rtl"] .dashboard-card,
html[dir="rtl"] .field,
html[dir="rtl"] .day-header {
  text-align: right;
}

html[dir="rtl"] .attendance-btn::before {
  margin-left: .4rem;
  margin-right: 0;
}





.week-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 2rem 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-700);
}

.week-icon {
    font-size: 1.4rem;
}

.week-title {
    flex-grow: 1;
}

.week-badge {
    background: var(--accent-600);
    color: #fff;
    padding: .25rem .6rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(79,137,245,0.25);
}



.day-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: border-color .2s, background .2s;
}

.day-header {
    font-weight: 700;
    margin-bottom: .75rem;
    font-size: 1rem;
    color: var(--text-strong);
}


.valid-true {
    border-color: var(--green);
}

.valid-false {
    border-color: var(--red);
}



.respite-warning {
    background: var(--yellow-light);
    color: var(--yellow-dark);
    padding: .75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 600;
}


.btn.disabled {
    opacity: .5;
    cursor: default;
    pointer-events: none;
}




.info-block {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.info-icon {
    font-size: 1.3rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-muted);
}

.info-badge {
    background: #fff;
    color: var(--accent-600);
    padding: .25rem .6rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(79,137,245,0.25);
}





.flex-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    margin-left: 10px;
}

.badge-green { background: #4caf50; color: white; }
.badge-orange { background: #ff9800; color: white; }
.badge-red { background: #f44336; color: white; }

.day-card.unsaved {
    border: 2px solid #ff9800;
}

.day-card.save-error {
    border: 2px solid #f44336;
}

.day-card .save-error-message {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #f44336;
}

#save-status.notice {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: bold;
}

#save-status.error {
    background: #f44336;
    color: white;
}

#save-status.warning {
    background: #ff9800;
    color: white;
}


.hidden {
  display: none !important;
}








.remark-box {
  background: #fff7d6;
  border: 2px solid #f4c542;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #5a4500;
  font-weight: 600;
}

.remark-notice {
  background: #eef6ff;
  border: 2px solid #7bb3ff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #003366;
}

.respite-counter-box {
  background: #ffe8ef;
  border: 2px solid #ff8aa0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #7a0020;
  font-weight: 600;
}


.btn-manual {
  background: linear-gradient(180deg, #9b5cf0, #6a2cd8) !important;
}

.btn-manual:hover {
  background: linear-gradient(180deg, #b06cff, #5a1fc4) !important;
}


.btn-remove {
  background: linear-gradient(180deg, #e97e7e, #f21313) !important;
}

.btn-remove:hover {
  background: linear-gradient(180deg, #d63333, #b02a2a) !important;
}

#edit-fieldset {
  border: none;
}

#edit-fieldset:disabled {
  background: #e97e7e;
  opacity: 50%;
}



.footer-actions-buttons {
  display: flex;
  flex-wrap: wrap;
}