/* ΤΟΕΒ Άρδευση — (C)2026 Pinet Digital Media */

/* ---- brand palette (teal) for both colour modes -------------------------------------- */
:root,
[data-bs-theme="light"] {
  --toeb-accent: #0f766e;
  --toeb-accent-rgb: 15, 118, 110;
  --toeb-accent-hover: #115e59;
  --toeb-accent-contrast: #ffffff;
  --bs-primary: var(--toeb-accent);
  --bs-primary-rgb: var(--toeb-accent-rgb);
  --bs-primary-text-emphasis: #134e4a;
  --bs-primary-bg-subtle: #ccfbf1;
  --bs-primary-border-subtle: #99f6e4;
  --bs-link-color: var(--toeb-accent);
  --bs-link-color-rgb: var(--toeb-accent-rgb);
  --bs-link-hover-color: var(--toeb-accent-hover);
  --bs-link-hover-color-rgb: 17, 94, 89;
  --bs-body-bg: #f5f7f8;
  --toeb-surface: #ffffff;
  --toeb-muted-surface: #eef2f3;
  --toeb-nav-bg: #ffffff;
}

[data-bs-theme="dark"] {
  --toeb-accent: #2dd4bf;
  --toeb-accent-rgb: 45, 212, 191;
  --toeb-accent-hover: #5eead4;
  --toeb-accent-contrast: #042f2e;
  --bs-primary: var(--toeb-accent);
  --bs-primary-rgb: var(--toeb-accent-rgb);
  --bs-primary-text-emphasis: #99f6e4;
  --bs-primary-bg-subtle: #0b3b37;
  --bs-primary-border-subtle: #115e59;
  --bs-link-color: var(--toeb-accent);
  --bs-link-color-rgb: var(--toeb-accent-rgb);
  --bs-link-hover-color: var(--toeb-accent-hover);
  --bs-link-hover-color-rgb: 94, 234, 212;
  --bs-body-bg: #0f1418;
  --bs-body-color: #dbe2e6;
  --bs-tertiary-bg: #161c21;
  --bs-border-color: #2a333a;
  --toeb-surface: #161c21;
  --toeb-muted-surface: #1c242a;
  --toeb-nav-bg: #12181c;
}

.btn-primary {
  --bs-btn-color: var(--toeb-accent-contrast);
  --bs-btn-bg: var(--toeb-accent);
  --bs-btn-border-color: var(--toeb-accent);
  --bs-btn-hover-color: var(--toeb-accent-contrast);
  --bs-btn-hover-bg: var(--toeb-accent-hover);
  --bs-btn-hover-border-color: var(--toeb-accent-hover);
  --bs-btn-active-color: var(--toeb-accent-contrast);
  --bs-btn-active-bg: var(--toeb-accent-hover);
  --bs-btn-active-border-color: var(--toeb-accent-hover);
  --bs-btn-disabled-bg: var(--toeb-accent);
  --bs-btn-disabled-border-color: var(--toeb-accent);
  --bs-btn-focus-shadow-rgb: var(--toeb-accent-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--toeb-accent);
  --bs-btn-border-color: var(--toeb-accent);
  --bs-btn-hover-color: var(--toeb-accent-contrast);
  --bs-btn-hover-bg: var(--toeb-accent);
  --bs-btn-hover-border-color: var(--toeb-accent);
  --bs-btn-active-color: var(--toeb-accent-contrast);
  --bs-btn-active-bg: var(--toeb-accent);
  --bs-btn-active-border-color: var(--toeb-accent);
  --bs-btn-focus-shadow-rgb: var(--toeb-accent-rgb);
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--toeb-accent-rgb), .6);
  box-shadow: 0 0 0 .25rem rgba(var(--toeb-accent-rgb), .2);
}
.form-check-input:checked { background-color: var(--toeb-accent); border-color: var(--toeb-accent); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--toeb-accent); --bs-nav-pills-link-active-color: var(--toeb-accent-contrast); }
.nav-underline .nav-link.active { color: var(--toeb-accent); }
.pagination { --bs-pagination-active-bg: var(--toeb-accent); --bs-pagination-active-border-color: var(--toeb-accent); --bs-pagination-active-color: var(--toeb-accent-contrast); --bs-pagination-color: var(--toeb-accent); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--toeb-accent); --bs-dropdown-link-active-color: var(--toeb-accent-contrast); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--toeb-accent); }

/* ---- layout --------------------------------------------------------------------------- */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

.toeb-navbar {
  background: var(--toeb-nav-bg);
  border-bottom: 1px solid var(--bs-border-color);
}
.toeb-brand { font-weight: 700; letter-spacing: .01em; }
.toeb-brand .brand-mark {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: .6rem;
  background: linear-gradient(135deg, var(--toeb-accent), #0891b2);
  color: #fff; font-size: 1.05rem;
}
.toeb-navbar .nav-link { font-weight: 500; }
.toeb-navbar .nav-link.active { color: var(--toeb-accent) !important; }

.card { --bs-card-bg: var(--toeb-surface); border-color: var(--bs-border-color); }
.card.shadow-soft { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04); }
[data-bs-theme="dark"] .card.shadow-soft { box-shadow: none; }

.page-header { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-header .subtitle { color: var(--bs-secondary-color); font-size: .925rem; }

.stat-card .stat-icon {
  width: 2.75rem; height: 2.75rem; border-radius: .75rem;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: var(--bs-secondary-color); font-size: .85rem; }

/* ---- tables --------------------------------------------------------------------------- */
.table-toeb { --bs-table-bg: transparent; margin-bottom: 0; }
.table-toeb thead th {
  background: var(--toeb-muted-surface);
  color: var(--bs-secondary-color);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600;
  border-bottom-width: 1px; white-space: nowrap; vertical-align: bottom;
}
.table-toeb td, .table-toeb th { padding: .55rem .75rem; }
.table-toeb tbody tr[data-href] { cursor: pointer; }
.table-toeb .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-toeb tr.row-group td { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.table-toeb tr.row-subtotal td { font-weight: 600; background: var(--toeb-muted-surface); }
.table-toeb tr.row-total td, .table-toeb tfoot td { font-weight: 700; border-top: 2px solid var(--bs-border-color); background: var(--toeb-muted-surface); }
.table-scroll { overflow: auto; max-height: calc(100vh - 290px); }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.caption-break { white-space: pre-line; }

.owner-avatar {
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.15rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
}
.kv dt { color: var(--bs-secondary-color); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kv dd { margin-bottom: .6rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--bs-secondary-color); }
.empty-state .bi { font-size: 2.25rem; display: block; margin-bottom: .5rem; opacity: .6; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 420px; }

.theme-icon-active { width: 1em; }
.footer-toeb { border-top: 1px solid var(--bs-border-color); color: var(--bs-secondary-color); font-size: .85rem; }

/* ---- print ---------------------------------------------------------------------------- */
.print-toolbar { position: sticky; top: 0; z-index: 10; }
.print-page { background: #fff; color: #000; margin: 1rem auto; padding: 12mm; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.print-page.portrait { width: 210mm; min-height: 297mm; }
.print-page.landscape { width: 297mm; min-height: 210mm; }
.print-page h2 { font-size: 15pt; text-align: center; margin: 0 0 2mm; font-weight: 700; }
.print-page .subtitle { text-align: center; font-weight: 600; font-size: 10.5pt; margin-bottom: 1mm; }
.print-page .meta { display: flex; justify-content: space-between; font-size: 8pt; color: #444; margin-bottom: 2mm; }
.print-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.print-table.dense { font-size: 7.2pt; }
.print-table th { border: 1px solid #000; padding: 1.2mm 1mm; text-align: center; font-weight: 700; white-space: pre-line; vertical-align: bottom; }
.print-table td { padding: .8mm 1mm; border-bottom: .2mm solid #ddd; }
.print-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.print-table tr.row-group td { background: #eee; font-weight: 700; border-top: .3mm solid #000; }
.print-table tr.row-subtotal td, .print-table tr.row-pagesum td, .print-table tr.row-total td { font-weight: 700; border-top: .3mm solid #000; border-bottom: none; }
.print-footer { font-size: 7.5pt; color: #555; margin-top: 3mm; display: flex; justify-content: space-between; }

@media print {
  body { background: #fff !important; }
  .print-toolbar, .no-print { display: none !important; }
  .print-page { margin: 0; padding: 0; box-shadow: none; width: auto !important; min-height: 0 !important; page-break-after: always; break-after: page; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
}

/* Year / organisation pill in the navbar */
.year-pill { background: var(--bs-tertiary-bg); color: var(--bs-body-color); font-weight: 600; }
.year-pill:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
