/* ============================================================
   Χάρτης Φορέων ΓΕΕ — app.css
   Χρώματα: Βαθύ Μπλε #1a3c6e | Κεραμιδί #c0392b | Ώχρα #e8a838
   Γραμματοσειρά: IBM Plex Sans / IBM Plex Serif
   ============================================================ */

:root {
  --blue-900:  #0f2447;
  --blue-800:  #1a3c6e;
  --blue-700:  #1f4d8c;
  --blue-100:  #e8f0fb;
  --blue-50:   #f0f5ff;
  --red-700:   #c0392b;
  --red-600:   #d44637;
  --red-100:   #fdecea;
  --ochre:     #e8a838;
  --ochre-100: #fdf6e3;
  --neutral-50:  #f8f9fb;
  --neutral-100: #f0f1f4;
  --neutral-200: #e2e4ea;
  --neutral-500: #8890a0;
  --neutral-700: #4a5568;
  --neutral-900: #1e2330;
  --sidebar-w: 260px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(26,60,110,.08);
  --shadow:    0 3px 12px rgba(26,60,110,.12);
  --shadow-lg: 0 8px 30px rgba(26,60,110,.16);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--neutral-900);
  background: var(--neutral-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1,h2,h3,h4,h5,h6 {
  font-family: 'Roboto Slab', serif;
  font-weight: 600;
  color: var(--blue-800);
}

/* ---- Navbar ---- */
.navbar-app {
  background: var(--blue-800);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  padding: .6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-app .navbar-toggler {
  border-color: rgba(255,255,255,.3);
}
.navbar-app .navbar-toggler-icon {
  filter: invert(1);
}
.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--ochre);
  border-radius: 8px;
  color: var(--blue-900);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-main {
  color: #fff;
  font-family: 'Roboto Slab', serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
}
.brand-sub {
  color: rgba(255,255,255,.6);
  font-size: .7rem;
  letter-spacing: .02em;
}
.navbar-app .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-size: .875rem;
  padding: .4rem .75rem !important;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.navbar-app .nav-link:hover,
.navbar-app .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.12);
}
.navbar-app .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  font-size: .875rem;
}
.navbar-app .dropdown-item { padding: .5rem 1rem; border-radius: 6px; }
.navbar-app .dropdown-item:hover { background: var(--blue-50); color: var(--blue-800); }
.user-avatar {
  display: inline-flex;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}
.role-badge {
  font-size: .65rem;
  background: var(--ochre);
  color: var(--blue-900);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  padding-bottom: 2rem;
}

/* ---- Page Header ---- */
.page-header {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 100%);
  color: white;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--ochre);
}
.page-header h1 { color: white; font-size: 1.4rem; margin: 0; }
.page-header .breadcrumb { margin: 0; }
.page-header .breadcrumb-item, .page-header .breadcrumb-item a {
  color: rgba(255,255,255,.7); font-size: .8rem;
}
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.9); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ---- Cards ---- */
.card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  font-weight: 600;
  padding: .875rem 1.25rem;
}
.card-header .card-title { margin: 0; font-size: 1rem; color: var(--blue-800); }

/* Section cards */
.section-card {
  border-top: 3px solid var(--blue-700);
}
.section-card .card-header {
  background: var(--blue-50);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: .75rem;
}

/* ---- Status Badges ---- */
.status-draft     { background: var(--neutral-200); color: var(--neutral-700); }
.status-submitted { background: #fff3cd; color: #856404; }
.status-approved  { background: #cff4fc; color: #055160; }
.status-published { background: #d1e7dd; color: #0a3622; }

/* ---- Forms ---- */
.form-label { font-weight: 500; font-size: .875rem; color: var(--neutral-700); margin-bottom: .35rem; }
.form-label .required { color: var(--red-700); margin-left: 2px; }
.form-control, .form-select {
  border-radius: var(--radius);
  border-color: var(--neutral-200);
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(26,60,110,.1);
}
.input-group-text {
  background: var(--neutral-100);
  border-color: var(--neutral-200);
  color: var(--neutral-500);
}

/* Multi-select checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .75rem;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
}
.checkbox-group .form-check {
  margin: 0;
  flex: 0 0 auto;
}
.checkbox-group .form-check-label {
  font-size: .85rem;
  cursor: pointer;
  padding: .25rem .6rem;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  background: white;
  transition: all .15s;
}
.checkbox-group .form-check-input {
  display: none;
}
.checkbox-group .form-check-input:checked + .form-check-label {
  background: var(--blue-800);
  color: white;
  border-color: var(--blue-800);
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--blue-800);
  border-color: var(--blue-800);
}
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn-danger { background: var(--red-700); border-color: var(--red-700); }
.btn-outline-primary { color: var(--blue-800); border-color: var(--blue-800); }
.btn-outline-primary:hover { background: var(--blue-800); color: white; }
.btn-submit { background: var(--ochre); border-color: var(--ochre); color: var(--blue-900); font-weight: 600; }
.btn-submit:hover { background: #d4952e; border-color: #d4952e; color: var(--blue-900); }

/* ---- Tables ---- */
.table { font-size: .875rem; }
.table thead th {
  background: var(--blue-900);
  color: white;
  font-weight: 500;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: none;
  padding: .75rem 1rem;
}
.table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--blue-50); }
.table-provider-code {
  font-family: 'IBM Plex Sans', monospace;
  font-weight: 600;
  color: var(--blue-700);
  font-size: .8rem;
  letter-spacing: .05em;
}

/* ---- Map ---- */
#map, #map-picker {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow);
}
#map { height: 560px; }
#map-picker { height: 320px; }
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
  min-width: 200px;
}
.map-popup-inner {
  padding: .85rem 1rem 1rem;
}
.map-popup-title { font-weight: 700; color: var(--blue-800); margin-bottom: .4rem; font-size: .9rem; }
.map-popup-info { font-size: .82rem; color: var(--neutral-700); margin-bottom: .75rem; }
.map-popup-info div { margin-bottom: .2rem; }
.map-popup-info a { color: var(--blue-700); }
.map-popup-btn {
  display: block;
  width: 100%;
  padding: .4rem .75rem;
  background: var(--blue-800);
  color: white !important;
  text-align: center;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background .15s;
}
.map-popup-btn:hover { background: var(--blue-700); color: white !important; }

/* ---- Sidebar Filters ---- */
.filter-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}
.filter-sidebar h6 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--neutral-500);
  margin-bottom: .75rem;
}

/* ---- Provider Card (public) ---- */
.provider-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  background: white;
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}
.provider-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.provider-card-header {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  color: white;
  padding: 1rem 1.25rem;
}
.provider-card-type {
  font-size: .7rem;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: .4rem;
  display: inline-block;
}
.provider-card-name { font-size: 1rem; font-weight: 600; font-family: 'IBM Plex Serif', serif; }
.provider-card-body { padding: 1rem 1.25rem; }
.provider-meta { font-size: .82rem; color: var(--neutral-700); }
.provider-meta i { color: var(--blue-700); width: 16px; }
.provider-tag {
  display: inline-block;
  font-size: .72rem;
  background: var(--blue-100);
  color: var(--blue-800);
  border-radius: 20px;
  padding: 2px 10px;
  margin: 2px;
}

/* ---- Phone/Social repeaters ---- */
.repeater-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .5rem;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  margin-bottom: .5rem;
}
.repeater-row .form-control, .repeater-row .form-select {
  flex: 1;
}
.btn-remove-row {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red-100);
  color: var(--red-700);
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.btn-remove-row:hover { background: var(--red-700); color: white; }

/* ---- Duplicate Warning ---- */
.duplicate-alert {
  background: var(--ochre-100);
  border: 1px solid var(--ochre);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: .5rem;
}

/* ---- Stats / Dashboard ---- */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: none;
  color: white;
}
.stat-card.blue    { background: linear-gradient(135deg, var(--blue-800), var(--blue-700)); }
.stat-card.ochre   { background: linear-gradient(135deg, #d4952e, var(--ochre)); color: var(--blue-900); }
.stat-card.green   { background: linear-gradient(135deg, #1a7f5a, #22a06b); }
.stat-card.red     { background: linear-gradient(135deg, #b83225, var(--red-700)); }
.stat-icon {
  font-size: 2rem;
  opacity: .8;
  flex-shrink: 0;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; opacity: .85; margin-top: .2rem; }

/* ---- Login Page ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 100%);
  padding: 1rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
}
.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-logo .logo-icon {
  display: inline-flex;
  width: 64px; height: 64px;
  background: var(--blue-800);
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ochre);
  margin-bottom: .75rem;
}
.login-logo h1 {
  font-size: 1.1rem;
  color: var(--blue-800);
  margin: 0;
}
.login-logo p {
  font-size: .8rem;
  color: var(--neutral-500);
  margin: .25rem 0 0;
}

/* ---- Public Hero ---- */
.public-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, #2563c7 100%);
  color: white;
  padding: 3rem 0;
  border-bottom: 4px solid var(--ochre);
}
.public-hero h1 { color: white; font-size: 1.8rem; }
.public-hero p  { color: rgba(255,255,255,.8); }
.search-hero-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

/* ---- Footer ---- */
.app-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,.6);
  padding: .875rem 0;
  font-size: .8rem;
  margin-top: auto;
}
.footer-brand { color: rgba(255,255,255,.9); font-weight: 600; }
.footer-sub { color: rgba(255,255,255,.5); font-size: .75rem; }
.footer-link {
  color: var(--ochre);
  text-decoration: none;
  transition: color .15s;
}
.footer-link:hover { color: #fff; text-decoration: none; }
.footer-link-muted {
  color: var(--ochre);
  font-size: .8rem;
  text-decoration: none;
  opacity: .75;
  transition: color .15s, opacity .15s;
}
.footer-link-muted:hover { color: #fff; opacity: 1; }

/* ---- Utilities ---- */
.text-blue  { color: var(--blue-800) !important; }
.text-ochre { color: var(--ochre) !important; }
.bg-blue-50 { background: var(--blue-50) !important; }
.divider-section {
  border: none;
  border-top: 2px solid var(--blue-100);
  margin: 1.5rem 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .page-header { padding: 1rem 0; }
  .page-header h1 { font-size: 1.2rem; }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.5rem; }
  .filter-sidebar { position: static; }
}

/* ---- Print ---- */
@media print {
  .navbar-app, .app-footer, .btn, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
