/* ======================================================
   Paniekmelding.nl - Custom Stylesheet (FlexAdmin style)
   Accent color: #c84631 (Paniekmelding red)
   ====================================================== */

:root {
  --pm-red: #c84631;
  --pm-red-dark: #8b2e1e;
  --pm-red-light: #e05a3f;
  --pm-red-muted: rgba(200, 70, 49, 0.1);
  --pm-bg: #f6f9ff;
  --pm-sidebar-width: 300px;
  --pm-header-height: 60px;
  --pm-footer-height: 52px;
  scroll-behavior: smooth;
}

/* ====== General ====== */
body {
  font-family: "Open Sans", "Segoe UI", sans-serif;
  background: var(--pm-bg);
  color: #444;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--pm-red); text-decoration: none; }
a:hover { color: var(--pm-red-light); text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Segoe UI", "Open Sans", sans-serif;
  font-weight: 600;
}

/* ====== Admin Header ====== */
#header {
  transition: all 0.5s;
  z-index: 997;
  height: var(--pm-header-height);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  background: var(--pm-red);
  padding: 0 20px;
}

#header .toggle-sidebar-btn {
  font-size: 22px;
  cursor: pointer;
  color: #fff;
  margin-right: 10px;
  line-height: 1;
}

#header .logo {
  line-height: 1;
  text-decoration: none;
}

#header .logo span {
  font-size: 24px;
  font-weight: 700;
  color: var(--pm-red);
  letter-spacing: -0.5px;
}

.header-nav .nav-link {
  font-size: 16px;
  color: rgba(255,255,255,0.85) !important;
}

.header-nav .nav-link:hover { color: #fff !important; }

.header-nav .dropdown-menu {
  min-width: 220px;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
  border-radius: 8px;
}

.header-nav .dropdown-menu .dropdown-header {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  background: #f6f9ff;
  border-radius: 8px 8px 0 0;
}

.header-nav .dropdown-item {
  padding: 10px 20px;
  font-size: 14px;
  color: #444;
}

.header-nav .dropdown-item:hover,
.header-nav .dropdown-item.active {
  background: var(--pm-red-muted);
  color: var(--pm-red);
}

.header-nav .dropdown-item i {
  margin-right: 8px;
  color: var(--pm-red);
}

/* ====== Admin Sidebar ====== */
#sidebar {
  position: fixed;
  top: var(--pm-header-height);
  left: 0;
  bottom: 0;
  width: var(--pm-sidebar-width);
  z-index: 996;
  transition: all 0.3s;
  padding: 16px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8d3e6 transparent;
  background: #fff;
  border-right: 1px solid #eef0f6;
}

@media (max-width: 1199px) {
  #sidebar { left: calc(-1 * var(--pm-sidebar-width)); }
}

.sidebar-nav { padding: 0; margin: 0; list-style: none; }
.sidebar-nav li { padding: 0; margin: 0; list-style: none; }
.sidebar-nav .nav-item { margin-bottom: 2px; }

.sidebar-nav .nav-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aab7cf;
  font-weight: 700;
  margin: 18px 0 6px 20px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  background: transparent;
  padding: 10px 20px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-nav .nav-link i {
  font-size: 17px;
  margin-right: 12px;
  color: #aab7cf;
  min-width: 20px;
  transition: color 0.2s;
}

.sidebar-nav .nav-link:hover {
  color: var(--pm-red);
  background: rgba(200,70,49,0.05);
  border-left-color: rgba(200,70,49,0.3);
}

.sidebar-nav .nav-link:hover i { color: var(--pm-red); }

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:not(.collapsed) {
  color: var(--pm-red);
  background: rgba(200,70,49,0.07);
  border-left-color: var(--pm-red);
  font-weight: 600;
}

.sidebar-nav .nav-link.active i,
.sidebar-nav .nav-link:not(.collapsed) i { color: var(--pm-red); }

/* ====== Admin Main ====== */
#main {
  flex: 1;
  margin-top: var(--pm-header-height);
  padding: 20px 30px calc(var(--pm-footer-height) + 20px);
  transition: all 0.3s;
}

@media (min-width: 1200px) {
  #main { margin-left: var(--pm-sidebar-width); }
}

/* Toggle sidebar */
.toggle-sidebar #sidebar { left: 0; }
@media (min-width: 1200px) {
  .toggle-sidebar #main { margin-left: 0; }
  .toggle-sidebar #sidebar { left: calc(-1 * var(--pm-sidebar-width)); }
}

/* ====== Page Title / Breadcrumb ====== */
.pagetitle { margin-bottom: 10px; }
.pagetitle h1 { font-size: 24px; margin-bottom: 0; font-weight: 600; color: #012970; }

.breadcrumb { font-size: 14px; color: #899bbd; font-weight: 600; }
.breadcrumb a { color: #899bbd; transition: 0.3s; }
.breadcrumb a:hover { color: var(--pm-red); }
.breadcrumb .breadcrumb-item::before { color: #899bbd; }
.breadcrumb .active { color: var(--pm-red); font-weight: 600; }

/* ====== Cards ====== */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: 5px;
  box-shadow: 0 0 30px rgba(1, 41, 112, 0.1);
}

.card-header, .card-footer {
  border-color: #ebeef4;
  background: #fff;
  color: #798eb3;
  padding: 15px;
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 500;
  color: #012970;
}

.card-body { padding: 0 20px 20px 20px; }

/* ====== Admin Footer ====== */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pm-footer-height);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  font-size: 13px;
  background: var(--pm-red);
  color: #fff;
}

#footer a { color: #fff; }
#footer a:hover { color: rgba(255,255,255,0.8); }

/* ====== Back to Top ====== */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--pm-red);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top i { font-size: 24px; color: #fff; line-height: 0; }
.back-to-top:hover { background: var(--pm-red-dark); color: #fff; }
.back-to-top.active { visibility: visible; opacity: 1; }

/* ====== Bootstrap overrides ====== */
.btn-primary { background: var(--pm-red); border-color: var(--pm-red); }
.btn-primary:hover, .btn-primary:focus { background: var(--pm-red-dark); border-color: var(--pm-red-dark); }

.btn-outline-primary { color: var(--pm-red); border-color: var(--pm-red); }
.btn-outline-primary:hover { background: var(--pm-red); border-color: var(--pm-red); color: #fff; }

.text-primary { color: var(--pm-red) !important; }
.bg-primary { background: var(--pm-red) !important; }
.border-primary { border-color: var(--pm-red) !important; }

.form-control:focus, .form-select:focus {
  border-color: var(--pm-red-light);
  box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.2);
}

.badge-primary { background: var(--pm-red); }

.table thead th { background: #f8f9fa; color: #444; font-weight: 600; border-bottom: 2px solid #dee2e6; }
.table-hover tbody tr:hover { background: #f4f6fb; }

/* ====== Alert override ====== */
.alert-danger { background: rgba(192, 57, 43, 0.08); border-color: var(--pm-red); color: var(--pm-red-dark); }

/* ====== Validation ====== */
.field-validation-error { color: var(--pm-red); font-size: 0.85em; }
.input-validation-error { border-color: var(--pm-red); }
.validation-summary-errors { color: var(--pm-red); }

/* ====== PUBLIC LAYOUT ====== */
/* Navbar public */
.public-nav {
  background: var(--pm-red);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.public-nav .navbar-brand { color: #fff !important; }

.public-nav .navbar-toggler { border-color: rgba(255,255,255,0.4); }
.public-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.public-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  padding: 8px 16px !important;
  transition: color 0.2s;
}

.public-nav .nav-link:hover { color: #fff !important; }

.public-nav .btn-login {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  font-weight: 600;
  padding: 8px 20px !important;
}

.public-nav .btn-login:hover { background: rgba(255,255,255,0.28); color: #fff !important; }

/* Hero */
.hero-section {
  background: linear-gradient(160deg, #4a1409 0%, #8b2e1e 40%, #c84631 80%, #e05a3f 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-section .hero-content { position: relative; z-index: 1; }

.hero-section h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 35px;
  max-width: 600px;
}

.hero-section .btn-hero {
  background: #fff;
  color: var(--pm-red);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 4px;
  border: none;
  transition: all 0.3s;
  margin-right: 12px;
}

.hero-section .btn-hero:hover { background: #f5f5f5; color: var(--pm-red-dark); transform: translateY(-2px); }

.hero-section .btn-hero-outline {
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 4px;
  border: 2px solid #fff;
  transition: all 0.3s;
}

.hero-section .btn-hero-outline:hover { background: rgba(255,255,255,0.15); }

/* Feature cards */
.feature-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px 30px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.06);
  text-align: center;
  height: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }

.feature-card .feature-icon {
  width: 70px;
  height: 70px;
  background: var(--pm-red-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-card .feature-icon i {
  font-size: 32px;
  color: var(--pm-red);
}

.feature-card h4 { color: #012970; font-weight: 700; margin-bottom: 12px; }
.feature-card p { color: #666; font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* How it works */
.how-it-works { background: #f6f9ff; }

.step-card {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 3px 20px rgba(0,0,0,0.06);
  height: 100%;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--pm-red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h5 { color: #012970; font-weight: 600; margin-bottom: 10px; }
.step-card p { color: #666; font-size: 0.9rem; line-height: 1.6; margin: 0; }

.step-circle {
  width: 72px; height: 72px;
  background: var(--pm-red); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto;
  box-shadow: 0 4px 16px rgba(200,70,49,0.35);
}

.partner-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.08);
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}
.partner-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.14); }
.partner-card img { display: block; max-width: 100%; }

/* Contact section */
.contact-section { background: #fff; }
.contact-info h5 { color: #012970; font-weight: 700; margin-bottom: 15px; }
.contact-info p { color: #555; margin-bottom: 8px; line-height: 1.8; }
.contact-info i { color: var(--pm-red); margin-right: 8px; }

/* Public footer */
.public-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 40px 0 20px;
}

.public-footer .footer-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--pm-red-light);
  margin-bottom: 10px;
}

.public-footer p { font-size: 0.9rem; line-height: 1.7; }
.public-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; font-size: 0.85rem; text-align: center; }
.public-footer a { color: rgba(255,255,255,0.5); }
.public-footer a:hover { color: var(--pm-red-light); }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #8b2e1e 0%, #c84631 100%);
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.login-card .brand { font-size: 28px; font-weight: 700; color: var(--pm-red); text-align: center; margin-bottom: 8px; }
.login-card .subtitle { text-align: center; color: #666; margin-bottom: 32px; font-size: 0.95rem; }
.login-card .btn-primary { width: 100%; padding: 12px; font-size: 16px; font-weight: 600; }
.login-card label { font-weight: 600; color: #333; }

/* ====== Settings: toggle rows ====== */
.setting-toggle-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
}

.setting-switch {
  width: 2.8em;
  height: 1.5em;
  cursor: pointer;
}

.setting-switch:checked {
  background-color: var(--pm-red);
  border-color: var(--pm-red);
}

.setting-switch:focus {
  box-shadow: 0 0 0 0.2rem rgba(200,70,49,0.25);
  border-color: var(--pm-red-light);
}

/* ====== Settings: channel cards ====== */
.channel-card {
  border: 1px solid #eef0f6;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.channel-card:hover {
  border-color: rgba(200,70,49,0.3);
  box-shadow: 0 4px 16px rgba(200,70,49,0.08);
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.channel-icon {
  width: 40px;
  height: 40px;
  background: var(--pm-red-muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-icon i { font-size: 18px; color: var(--pm-red); }

.channel-label { font-weight: 600; font-size: 0.95rem; color: #222; line-height: 1.2; }
.channel-desc { font-size: 0.8rem; color: #888; }

.channel-extra { border-top: 1px solid #f0f0f0; padding-top: 12px; }
