:root {
  --wasd-primary: #0F4C81;
  --wasd-secondary: #1E88E5;
  --wasd-accent: #00C853;
  --wasd-dark: #0F172A;
  --wasd-light: #F8FAFC;
  --wasd-white: #FFFFFF;
  --wasd-border: #E5E7EB;
  --wasd-text: #111827;
  --wasd-text-secondary: #6B7280;
  --wasd-text-muted: #9CA3AF;
  --wasd-shadow-sm: 0 4px 12px rgba(0,0,0,.08);
  --wasd-shadow-md: 0 10px 30px rgba(0,0,0,.12);
  --wasd-shadow-lg: 0 20px 60px rgba(0,0,0,.15);
  --wasd-radius-btn: 12px;
  --wasd-radius-card: 16px;
  --wasd-radius-input: 10px;
  --wasd-container: 1280px;
  --wasd-content: 1180px;
  --anim: 300ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Helvetica, Arial, sans-serif;
  color: var(--wasd-text);
  background: var(--wasd-light);
  line-height: 28px;
  font-size: 16px;
}

.btn,
.login-submit,
.gallery-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.container {
  width: min(100% - 48px, var(--wasd-container));
  margin-inline: auto;
}
.content-width { width: min(100%, var(--wasd-content)); margin-inline: auto; }

.public-shell { min-height: 100vh; }
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wasd-border);
}
.theme-dark .site-header { background: rgba(15,23,42,.92); border-color: #1f2937; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 80px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.admin-brand-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.login-logo { width: 64px; height: 64px; object-fit: contain; }
.footer-logo { width: 48px; height: 48px; object-fit: contain; }
.company-logo { max-width: 100%; }
.brand strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--wasd-primary); letter-spacing: .04em; }
.brand span { display: block; font-size: .75rem; color: var(--wasd-text-secondary); line-height: 1.2; }
.site-nav { display: flex; gap: 24px; }
.site-nav a {
  text-decoration: none; color: var(--wasd-text-secondary); font-weight: 600;
  transition: color var(--anim);
}
.site-nav a:hover { color: var(--wasd-secondary); }
.header-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 1101px) {
  .site-nav { display: flex !important; position: static; flex-direction: row; background: transparent; border: 0; box-shadow: none; padding: 0; }
  .site-nav a { padding: 0; border: 0; }
  .mobile-nav-toggle { display: none !important; }
}

.btn-glow {
  border-radius: var(--wasd-radius-btn) !important;
  padding: 12px 24px !important;
  box-shadow: 0 10px 25px rgba(30,136,229,.2) !important;
  transition: transform var(--anim), box-shadow var(--anim), background var(--anim) !important;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30,136,229,.35) !important; }
.btn-outline-wasd {
  border: 2px solid var(--wasd-secondary) !important;
  color: var(--wasd-secondary) !important;
  background: #fff !important;
  border-radius: var(--wasd-radius-btn) !important;
}
.btn-outline-wasd:hover { background: var(--wasd-secondary) !important; color: #fff !important; }

.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
.hero-media { min-height: min(92vh, 900px); }
.hero-video,
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero-photo { background: center/cover no-repeat; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(120deg, rgba(15,76,129,.88) 0%, rgba(15,23,42,.55) 45%, rgba(15,23,42,.82) 100%);
}
.hero-inner-wide {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end;
  padding: 120px 0 80px;
}
.hero-copy { max-width: 680px; }
.hero-btn-light {
  color: #fff !important; border-color: rgba(255,255,255,.85) !important; background: transparent !important;
}
.hero-btn-light:hover { background: rgba(255,255,255,.15) !important; color: #fff !important; }
.hero-preview-strip { display: grid; gap: 14px; }
.hero-preview-card {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center;
  padding: 10px; border-radius: 14px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px); transition: transform var(--anim), background var(--anim);
}
.hero-preview-card:hover { transform: translateX(4px); background: rgba(255,255,255,.16); color: #fff; }
.hero-preview-card img {
  width: 88px; height: 64px; object-fit: cover; border-radius: 10px;
}
.hero-preview-card span { font-weight: 700; font-size: .9375rem; line-height: 1.3; }

.section-head-row {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  flex-wrap: wrap; margin-bottom: 40px;
}
.media-count-badge {
  display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px;
  background: rgba(30,136,229,.1); color: var(--wasd-primary); font-weight: 700; font-size: .875rem;
}
.media-empty-state {
  text-align: center; padding: 64px 24px; border-radius: 20px;
  border: 2px dashed var(--wasd-border); background: rgba(255,255,255,.7);
}
.media-empty-state i { font-size: 2.5rem; color: var(--wasd-secondary); display: block; margin-bottom: 16px; }
.media-empty-state h3 { margin: 0 0 8px; color: var(--wasd-primary); }
.media-empty-state p { margin: 0; color: var(--wasd-text-secondary); max-width: 520px; margin-inline: auto; }
.media-empty-state code {
  background: #EEF2FF; padding: 2px 8px; border-radius: 6px; font-size: .875rem;
}

.video-showcase { display: grid; gap: 24px; }
.video-featured { padding: 0; overflow: hidden; }
.video-player-wrap { background: #000; aspect-ratio: 16/9; }
.video-player-wrap video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-meta { padding: 24px 28px; }
.video-category {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--wasd-secondary); margin-bottom: 8px;
}
.video-meta h3 { margin: 0 0 8px; font-size: 1.35rem; color: var(--wasd-primary); }
.video-meta p { margin: 0; color: var(--wasd-text-secondary); }
.video-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.video-card { padding: 0; overflow: hidden; }
.video-card-trigger {
  display: block; width: 100%; border: 0; padding: 0; background: none; cursor: pointer;
}
.video-card-poster {
  aspect-ratio: 16/10; background: linear-gradient(135deg, #0F4C81, #1E88E5) center/cover no-repeat;
  position: relative;
}
.video-play-btn {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15, 23, 42, 0.28); transition: background var(--anim);
}
.video-play-btn i {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--wasd-primary); font-size: 1.75rem;
  box-shadow: var(--wasd-shadow-md);
}
.video-card-trigger:hover .video-play-btn { background: rgba(15, 23, 42, 0.42); }
.video-card-body { padding: 18px 20px 22px; }
.video-card-body h3 { margin: 6px 0 0; font-size: 1.05rem; color: var(--wasd-primary); }
.video-modal-content, .gallery-modal-content { overflow: hidden; border-radius: 16px; }
#videoModalPlayer, #galleryModalImage { display: block; max-height: 78vh; object-fit: contain; background: #000; }

.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.gallery-filter {
  border: 1px solid var(--wasd-border); background: #fff; color: var(--wasd-text-secondary);
  border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer; transition: all var(--anim);
}
.gallery-filter:hover, .gallery-filter.active {
  background: var(--wasd-secondary); border-color: var(--wasd-secondary); color: #fff;
}
.gallery-masonry {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px;
}
.gallery-item { grid-column: span 4; }
.gallery-item-featured { grid-column: span 8; grid-row: span 2; }
.gallery-item-trigger {
  display: block; width: 100%; border: 0; padding: 0; background: none; cursor: pointer;
  border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 4/3;
}
.gallery-item-featured .gallery-item-trigger { aspect-ratio: 16/10; min-height: 100%; }
.gallery-item-trigger img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease;
}
.gallery-item-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: end;
  padding: 20px; text-align: left; color: #fff;
  background: linear-gradient(180deg, transparent 35%, rgba(15,23,42,.82) 100%);
  opacity: 0; transition: opacity var(--anim);
}
.gallery-item-overlay i { font-size: 1.5rem; margin-bottom: auto; }
.gallery-item-overlay strong { display: block; font-size: 1.05rem; }
.gallery-item-overlay em { font-style: normal; opacity: .85; font-size: .875rem; }
.gallery-item-trigger:hover img { transform: scale(1.05); }
.gallery-item-trigger:hover .gallery-item-overlay { opacity: 1; }

.theme-dark .media-empty-state { background: rgba(17,24,39,.8); border-color: #334155; }
.theme-dark .gallery-filter { background: #111827; border-color: #334155; color: #CBD5E1; }

.hero-inner { position: relative; z-index: 2; padding: 96px 0 120px; max-width: 760px; }
.hero-kicker {
  display: inline-block; margin-bottom: 16px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #90CAF9; font-size: .875rem;
}
.hero h1 {
  margin: 0 0 16px; font-size: clamp(2.5rem, 5vw, 56px); font-weight: 800;
  line-height: 1.15; animation: fadeSlideUp .7s ease both;
}
.hero p {
  margin: 0 0 32px; font-size: 1.125rem; color: #E5E7EB; max-width: 560px;
  animation: fadeSlideUp .8s ease .1s both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; animation: fadeSlideUp .9s ease .15s both; }
.floating-icons { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.float-icon {
  position: absolute; width: 56px; height: 56px; border-radius: 16px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center; animation: float 6s ease-in-out infinite;
  backdrop-filter: blur(4px);
}
.float-icon:nth-child(1) { top: 18%; left: 8%; animation-delay: 0s; }
.float-icon:nth-child(2) { top: 28%; right: 12%; animation-delay: 1s; }
.float-icon:nth-child(3) { bottom: 22%; left: 16%; animation-delay: 2s; }
.float-icon:nth-child(4) { bottom: 18%; right: 18%; animation-delay: 1.5s; }

.section { padding: 96px 0; }
.section-alt { background: #fff; }
.theme-dark .section-alt { background: #111827; }
.section-title { margin: 0 0 8px; font-size: clamp(1.75rem, 3vw, 36px); font-weight: 800; color: var(--wasd-primary); }
.section-sub { margin: 0 0 48px; color: var(--wasd-text-secondary); max-width: 640px; }
.sample-media-note {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--wasd-text-secondary);
  max-width: 640px;
}

.logo-slider {
  overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.logo-track {
  display: flex; gap: 48px; width: max-content; animation: slide 28s linear infinite;
}
.logo-item {
  width: 160px; height: 72px; border-radius: 12px; border: 1px solid var(--wasd-border);
  background: #fff; display: grid; place-items: center; color: var(--wasd-text-secondary);
  font-weight: 700; letter-spacing: .04em; flex: 0 0 auto;
}
.theme-dark .logo-item { background: #0f172a; border-color: #1f2937; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.wasd-card {
  background: #fff; border: 1px solid var(--wasd-border); border-radius: var(--wasd-radius-card);
  box-shadow: 0 8px 30px rgba(0,0,0,.06); padding: 32px;
  transition: transform var(--anim), box-shadow var(--anim);
  animation: fadeSlideUp .6s ease both;
}
.wasd-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--wasd-shadow-md); }
.theme-dark .wasd-card { background: #111827; border-color: #1f2937; }
.service-icon {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(30,136,229,.12);
  color: var(--wasd-secondary); display: grid; place-items: center;
}
.pricing-card.featured { border: 2px solid var(--wasd-secondary); transform: scale(1.03); }
.price { font-size: 2.25rem; font-weight: 800; color: var(--wasd-primary); margin: 16px 0; }
.price span { font-size: 1rem; font-weight: 500; color: var(--wasd-text-secondary); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card {
  text-align: center; padding: 32px; border-radius: 16px;
  background: linear-gradient(160deg, #0F4C81, #1E88E5); color: #fff;
  box-shadow: var(--wasd-shadow-md);
}
.stat-card strong { display: block; font-size: 2.75rem; font-weight: 800; line-height: 1.2; }
.stat-card span { opacity: .9; }

.cta-banner {
  border-radius: 24px; padding: 64px; color: #fff;
  background: linear-gradient(120deg, #0F4C81 0%, #1E88E5 55%, #00C853 160%);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  box-shadow: var(--wasd-shadow-lg);
}
.site-footer {
  background: var(--wasd-dark); color: #cbd5e1; padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 48px; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #64748b; font-size: .875rem;
}
.socials { display: flex; gap: 12px; }

.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(circle at top right, rgba(30,136,229,.25), transparent 40%),
    radial-gradient(circle at bottom left, rgba(0,200,83,.15), transparent 35%),
    var(--wasd-light);
  padding: 32px;
}
.login-card {
  width: min(100%, 440px); background: #fff; border-radius: 20px;
  border: 1px solid var(--wasd-border); box-shadow: var(--wasd-shadow-lg); padding: 40px;
}
.admin-shell { display: flex; min-height: 100vh; }
.admin-body { overflow-x: hidden; }
.login-body { min-height: 100vh; }
.admin-sidebar {
  width: 260px; flex-shrink: 0; background: #0F172A; color: #E2E8F0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
}
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 0 20px; background: linear-gradient(90deg, var(--wasd-primary), #1565C0);
  color: #fff; box-shadow: 0 2px 12px rgba(15, 76, 129, 0.18);
  position: sticky; top: 0; z-index: 1020;
}
.admin-topbar-title { font-weight: 700; letter-spacing: .02em; }
.admin-content { background: var(--wasd-light); flex: 1; }
.admin-page { padding: 28px 24px 40px; max-width: 1400px; margin-inline: auto; width: 100%; }
.admin-drawer-brand {
  display: flex; gap: 12px; align-items: center; color: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

/* Harmonize Bootstrap with WASD brand inside admin */
.admin-shell {
  --bs-primary: #1E88E5;
  --bs-primary-rgb: 30, 136, 229;
  --bs-link-color: #1E88E5;
  --bs-link-hover-color: #1565C0;
  --bs-border-radius: 10px;
  --bs-border-radius-lg: 16px;
}
.admin-shell .btn-primary {
  --bs-btn-bg: #1E88E5;
  --bs-btn-border-color: #1E88E5;
  --bs-btn-hover-bg: #1565C0;
  --bs-btn-hover-border-color: #1565C0;
  --bs-btn-active-bg: #0F4C81;
  --bs-btn-active-border-color: #0F4C81;
}
.admin-shell .btn-outline-primary {
  --bs-btn-color: #1E88E5;
  --bs-btn-border-color: #1E88E5;
  --bs-btn-hover-bg: #1E88E5;
  --bs-btn-hover-border-color: #1E88E5;
}
.admin-shell .form-control:focus,
.admin-shell .form-select:focus {
  border-color: #1E88E5;
  box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.18);
}
.admin-shell .page-heading { margin-bottom: 1.5rem; }
.admin-shell .page-heading h1,
.admin-shell h1.h3 { color: var(--wasd-primary); font-weight: 800; }
.admin-shell .card {
  border: 1px solid var(--wasd-border);
  border-radius: var(--wasd-radius-card);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  background: #fff;
}
.admin-shell .table thead th {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--wasd-text-secondary);
  border-bottom-width: 1px;
}
.admin-shell .table-hover tbody tr:hover { background: rgba(30, 136, 229, 0.04); }
.admin-topbar .btn-link {
  color: rgba(255, 255, 255, 0.92) !important;
  text-decoration: none;
}
.admin-topbar .btn-link:hover,
.admin-topbar .btn-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}
.admin-topbar .badge { font-weight: 600; }

/* Selected sidebar menu — lighter, highly visible on dark drawer */
.wasd-admin-drawer {
  --bs-nav-link-color: #CBD5E1;
  --bs-nav-link-hover-color: #FFFFFF;
  --bs-nav-link-disabled-color: #64748B;
}
.wasd-admin-drawer .nav-link {
  border-radius: 10px;
  margin: 4px 8px;
  padding: 0.7rem 1rem;
  color: #E2E8F0 !important;
  font-weight: 600;
  transition: background 200ms ease, color 200ms ease;
}
.wasd-admin-drawer .nav-link i {
  color: #94A3B8;
  width: 1.25rem;
}
.wasd-admin-drawer .nav-link:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #FFFFFF !important;
}
.wasd-admin-drawer .nav-link.wasd-nav-active,
.wasd-admin-drawer .nav-link.active {
  background: rgba(100, 181, 246, 0.35) !important;
  color: #FFFFFF !important;
  box-shadow: inset 3px 0 0 #64B5F6;
}
.wasd-admin-drawer .nav-link.wasd-nav-active i,
.wasd-admin-drawer .nav-link.active i {
  color: #BBDEFB;
}
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: #fff; border: 1px solid var(--wasd-border); border-radius: 16px;
  padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.06);
  transition: transform var(--anim), box-shadow var(--anim);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--wasd-shadow-sm); }
.kpi-card .label { color: var(--wasd-text-secondary); font-size: .875rem; font-weight: 600; }
.kpi-card .value { font-size: 1.75rem; font-weight: 800; color: var(--wasd-primary); margin-top: 4px; line-height: 1.2; }

/* Admin dark theme */
.admin-shell.theme-dark,
.admin-body.theme-dark .admin-shell {
  color: #E2E8F0;
}
.admin-shell.theme-dark .admin-content,
.admin-body.theme-dark .admin-content {
  background: #0B1220;
}
.admin-shell.theme-dark .kpi-card,
.admin-shell.theme-dark .card,
.admin-body.theme-dark .admin-shell .kpi-card,
.admin-body.theme-dark .admin-shell .card {
  background: #111827;
  border-color: #1F2937;
  color: #E2E8F0;
}
.admin-shell.theme-dark .table,
.admin-body.theme-dark .admin-shell .table {
  --bs-table-color: #E2E8F0;
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(30, 136, 229, 0.08);
  --bs-table-border-color: #334155;
}
.admin-shell.theme-dark .table-light,
.admin-body.theme-dark .admin-shell .table-light {
  --bs-table-bg: #1E293B;
  --bs-table-color: #CBD5E1;
}
.admin-shell.theme-dark .form-control,
.admin-shell.theme-dark .form-select,
.admin-body.theme-dark .admin-shell .form-control,
.admin-body.theme-dark .admin-shell .form-select {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}
.admin-shell.theme-dark .text-secondary,
.admin-body.theme-dark .admin-shell .text-secondary {
  color: #94A3B8 !important;
}
.admin-shell.theme-dark h1.h3,
.admin-body.theme-dark .admin-shell h1.h3 {
  color: #90CAF9;
}
.admin-shell.theme-dark .modal-content,
.admin-body.theme-dark .admin-shell .modal-content {
  background: #111827;
  color: #E2E8F0;
  border-color: #334155;
}
.admin-shell.theme-dark .modal-header,
.admin-shell.theme-dark .modal-footer,
.admin-body.theme-dark .admin-shell .modal-header,
.admin-body.theme-dark .admin-shell .modal-footer {
  border-color: #334155;
}
.admin-body.theme-dark {
  background: #0B1220;
  color: #E2E8F0;
}
.theme-dark.login-body {
  background: #0B1220;
}
.theme-dark.login-body .login-page {
  background:
    radial-gradient(circle at top right, rgba(30,136,229,.18), transparent 40%),
    radial-gradient(circle at bottom left, rgba(0,200,83,.08), transparent 35%),
    #0B1220;
}
.theme-dark.login-body .login-card {
  background: #111827;
  border-color: #1F2937;
  color: #E2E8F0;
}
.theme-dark.login-body .login-form .field-label { color: #E2E8F0; }
.theme-dark.login-body .login-form .field-input {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}

/* Info & success notifications — green */
.alert-info,
.alert-success {
  --bs-alert-color: #065f2a;
  --bs-alert-bg: rgba(0, 200, 83, 0.12);
  --bs-alert-border-color: rgba(0, 200, 83, 0.35);
  color: #065f2a;
  background-color: rgba(0, 200, 83, 0.12);
  border-color: rgba(0, 200, 83, 0.35);
}
.alert-info a,
.alert-success a {
  color: #047857;
  font-weight: 600;
}
.toast.wasd-toast-success {
  --bs-toast-bg: var(--wasd-accent);
  background-color: var(--wasd-accent) !important;
  color: #fff !important;
}
.toast.wasd-toast-success .btn-close {
  filter: brightness(0) invert(1);
}
.admin-shell.theme-dark .alert-info,
.admin-shell.theme-dark .alert-success,
.admin-body.theme-dark .alert-info,
.admin-body.theme-dark .alert-success {
  --bs-alert-color: #bbf7d0;
  --bs-alert-bg: rgba(0, 200, 83, 0.16);
  --bs-alert-border-color: rgba(0, 200, 83, 0.4);
  color: #bbf7d0;
  background-color: rgba(0, 200, 83, 0.16);
  border-color: rgba(0, 200, 83, 0.4);
}
.admin-shell.theme-dark .alert-info a,
.admin-shell.theme-dark .alert-success a,
.admin-body.theme-dark .alert-info a,
.admin-body.theme-dark .alert-success a {
  color: #86efac;
}

/* Classic WASD invoice layout (matches WADI AL SADAQA paper style) */
.wasd-invoice {
  --inv-red: #B22222;
  --inv-ink: #111111;
  --inv-line: #222222;
  --inv-stamp-size: 110px;
  background: #fff;
  color: var(--inv-ink);
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 32px 24px;
  border: 1px solid var(--wasd-border);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 283mm;
  box-sizing: border-box;
  position: relative;
}
.wasd-invoice-body {
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
}
.wasd-invoice-stamp {
  position: absolute;
  right: 36px;
  bottom: 82px;
  z-index: 2;
  pointer-events: none;
}
.wasd-invoice-stamp img {
  width: var(--inv-stamp-size);
  height: auto;
  max-height: var(--inv-stamp-size);
  object-fit: contain;
  display: block;
  opacity: 0.95;
}
.wasd-invoice-footer {
  margin-top: auto;
  flex-shrink: 0;
  margin-left: -32px;
  margin-right: -32px;
  margin-bottom: -24px;
  width: calc(100% + 64px);
  background: #f3f3f3;
  color: var(--inv-red);
  padding: 18px 20px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  display: block;
}
.wasd-invoice-band-fill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 0.25em;
  flex-wrap: nowrap;
  text-transform: uppercase;
  box-sizing: border-box;
}
.wasd-invoice-band-word {
  flex: 0 1 auto;
  white-space: nowrap;
  letter-spacing: 0.1em;
  font-weight: 800;
}
.wasd-invoice-band-fill--header {
  font-size: clamp(1.15rem, 2.1vw + 0.55rem, 2.15rem);
  color: var(--inv-red);
  line-height: 1.15;
}
.wasd-invoice-band-fill--footer {
  font-size: clamp(0.88rem, 1.45vw + 0.38rem, 1.2rem);
  color: var(--inv-red);
  line-height: 1.15;
}
.wasd-invoice-band-fill--footer .wasd-invoice-band-word {
  font-weight: 700;
  letter-spacing: 0.09em;
}
.wasd-invoice-logo {
  text-align: center;
  margin-bottom: 12px;
}
.wasd-invoice-logo img {
  max-height: 72px;
  max-width: 220px;
  object-fit: contain;
}
.settings-logo-preview {
  min-height: 120px;
  border: 1px dashed var(--wasd-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #F8FAFC;
}
.settings-logo-preview img {
  max-height: 96px;
  max-width: 240px;
  object-fit: contain;
}
.admin-shell.theme-dark .settings-logo-preview,
.admin-body.theme-dark .settings-logo-preview {
  background: #0F172A;
  border-color: #334155;
}
.chart-wrap {
  position: relative;
  height: 300px;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
}
.reports-page {
  max-width: 100%;
  overflow-x: hidden;
}
.reports-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.reports-page .reports-chart-card {
  overflow: hidden;
  max-width: 100%;
}
.reports-page .chart-wrap--bar {
  height: 300px;
}
.reports-page .chart-wrap--status {
  height: 300px;
}
.reports-kpi-grid .kpi-card .value {
  font-size: clamp(1.15rem, 4.5vw, 1.75rem);
  word-break: break-word;
}
.wasd-invoice-title {
  background: #f3f3f3;
  padding: 18px 20px;
  margin-left: -32px;
  margin-right: -32px;
  margin-top: -28px;
  margin-bottom: 18px;
  width: calc(100% + 64px);
  box-sizing: border-box;
}
.wasd-invoice-preview-band {
  border-radius: 0 !important;
  border: 1px solid #ddd;
  box-sizing: border-box;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  width: calc(100% + 3rem);
}
.wasd-letterhead-preview {
  background: #f3f3f3 !important;
  color: #B22222 !important;
  padding: 16px 18px;
  margin-bottom: 1rem !important;
}
.wasd-footer-preview {
  background: #f3f3f3 !important;
  color: #B22222 !important;
  padding: 16px 18px;
}
.wasd-invoice-band-fill--preview-header {
  font-size: clamp(0.85rem, 1.35vw + 0.42rem, 1.35rem);
}
.wasd-invoice-band-fill--preview-footer {
  font-size: clamp(0.72rem, 1.1vw + 0.34rem, 1.05rem);
}
.wasd-letterhead-preview .wasd-invoice-band-word,
.wasd-footer-preview .wasd-invoice-band-word {
  color: #B22222;
}
.invoice-type-card {
  width: 100%;
  border: 2px solid var(--wasd-border);
  border-radius: 16px;
  background: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color var(--anim), box-shadow var(--anim), transform var(--anim);
  cursor: pointer;
}
.invoice-type-card:hover,
.invoice-type-card:focus {
  border-color: #B22222;
  box-shadow: 0 8px 24px rgba(178, 34, 34, 0.12);
  transform: translateY(-2px);
  outline: none;
}
.invoice-type-card i {
  display: block;
  font-size: 2rem;
  color: #B22222;
  margin-bottom: 0.75rem;
}
.invoice-type-card-title {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--wasd-ink, #111);
}
.invoice-type-card-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #64748b;
}
.admin-shell.theme-dark .invoice-type-card,
.admin-body.theme-dark .invoice-type-card {
  background: #1E293B;
  border-color: #334155;
}
.admin-shell.theme-dark .invoice-type-card-title,
.admin-body.theme-dark .invoice-type-card-title {
  color: #F8FAFC;
}
.wasd-invoice-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 700;
}
.wasd-invoice-meta .label { color: var(--inv-red); margin-right: 6px; text-transform: uppercase; }
.wasd-invoice-meta .value { color: var(--inv-ink); text-transform: uppercase; }
.wasd-invoice-meta .meta-center { text-align: center; }
.wasd-invoice-meta .meta-center .label { font-size: 1.05rem; }
.wasd-invoice-meta .meta-right { text-align: right; }
.wasd-invoice-customer {
  margin-bottom: 18px;
  line-height: 1.7;
}
.wasd-invoice-customer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 4px;
}
.wasd-invoice-customer-address {
  margin-top: 14px;
}
.wasd-invoice-customer-name {
  flex: 1 1 auto;
  min-width: 0;
}
.wasd-invoice-customer-vat {
  flex: 0 0 auto;
  text-align: right;
}
.wasd-invoice-customer .label {
  color: var(--inv-red);
  font-weight: 700;
  margin-right: 6px;
  text-transform: uppercase;
}
.wasd-invoice-customer .value {
  color: var(--inv-ink);
  font-weight: 700;
  text-transform: uppercase;
}
.wasd-invoice-customer .value-lg {
  font-size: 1.35rem;
  letter-spacing: .01em;
}
.wasd-invoice-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 8px;
}
.wasd-invoice-table th,
.wasd-invoice-table td {
  border: 1px solid var(--inv-line);
  padding: 8px 6px;
  vertical-align: middle;
  font-size: .95rem;
}
.wasd-invoice-table th {
  background: #fff;
  color: var(--inv-ink);
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}
.wasd-invoice-table .col-sno { width: 8%; text-align: center; }
.wasd-invoice-table .col-desc { width: 42%; text-align: left; }
.wasd-invoice-table .col-qty { width: 10%; text-align: center; }
.wasd-invoice-table .col-price,
.wasd-invoice-table .col-vat,
.wasd-invoice-table .col-amount { width: 13.3%; text-align: right; }
.wasd-invoice-table .empty-row td { height: 34px; }
.wasd-invoice-table .total-row td {
  font-weight: 800;
  font-style: italic;
  border-top: 2px solid var(--inv-line);
}
.wasd-invoice-table .total-label {
  text-align: center;
  text-transform: uppercase;
}
.wasd-invoice-table .total-value { text-align: right; }
.wasd-invoice-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.wasd-invoice-notes {
  margin-top: 16px;
  font-size: .9rem;
}
.wasd-invoice-notes .label {
  color: var(--inv-red);
  font-weight: 700;
  margin-right: 6px;
}
.invoice-line-items .btn-add-line-grid {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.invoice-lines-add-row {
  display: flex;
  justify-content: flex-start;
  padding: 8px 4px 0;
}
.invoice-line-items .line-vat-cell,
.invoice-line-items .line-price-cell,
.invoice-line-items .line-amount-cell { text-align: right; }
.invoice-line-items .line-desc {
  min-height: 72px;
  resize: vertical;
}
.invoice-line-items .line-vat {
  display: inline-block;
  min-width: 72px;
  padding: 0.25rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.invoice-line-items .line-amount {
  display: inline-block;
  min-width: 72px;
  padding: 0.25rem 0.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform var(--anim);
  }
  .admin-sidebar.show { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,.25); }
  .admin-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 1025;
    opacity: 0; visibility: hidden; transition: opacity var(--anim), visibility var(--anim);
  }
  .admin-sidebar-backdrop.show { opacity: 1; visibility: visible; }
  body.sidebar-open { overflow: hidden; }
  .admin-page { padding: 20px 16px 32px; }
  .reports-kpi-grid { grid-template-columns: 1fr; }
  .reports-page .chart-wrap--bar { height: 260px; }
  .reports-page .chart-wrap--status { height: 320px; }
  .reports-page .reports-chart-card { padding: 16px !important; }
  .reports-filter-actions .btn { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .wasd-invoice {
    min-height: auto;
    padding: 16px 12px;
    max-width: 100%;
  }
  .wasd-invoice-title {
    padding: 14px 12px;
    margin-left: -12px;
    margin-right: -12px;
    margin-top: -16px;
    width: calc(100% + 24px);
  }
  .wasd-invoice-band-fill--header {
    font-size: clamp(0.85rem, 2.2vw + 0.35rem, 1.2rem);
  }
  .wasd-invoice-band-fill--footer {
    font-size: clamp(0.72rem, 1.8vw + 0.28rem, 0.95rem);
  }
  .wasd-invoice-band-fill,
  .wasd-invoice-preview-band.wasd-invoice-band-fill {
    display: block;
    text-align: center;
    white-space: normal;
    line-height: 1.4;
  }
  .wasd-invoice-band-word {
    display: inline;
    white-space: normal;
    flex: none;
  }
  .wasd-invoice-band-word::after {
    content: '\00a0';
  }
  .wasd-invoice-band-fill .wasd-invoice-band-word:last-child::after {
    content: none;
  }
  .wasd-invoice-preview-band {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    padding: 12px 10px;
  }
  .wasd-invoice-band-fill--preview-header {
    font-size: clamp(0.78rem, 2.4vw + 0.3rem, 1.05rem);
  }
  .wasd-invoice-band-fill--preview-footer {
    font-size: clamp(0.7rem, 2vw + 0.26rem, 0.92rem);
  }
  .wasd-invoice-preview-band .wasd-invoice-band-word {
    letter-spacing: 0.06em;
  }
  .wasd-invoice-footer {
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -16px;
    width: calc(100% + 24px);
    padding: 14px 12px;
  }
  .wasd-invoice-stamp {
    position: static;
    align-self: flex-end;
    margin: 14px 4px 6px;
    z-index: 1;
  }
  .wasd-invoice-stamp img {
    width: 96px;
    max-height: 96px;
  }
  .wasd-invoice-customer-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .wasd-invoice-customer-vat {
    text-align: left;
  }
  .wasd-invoice-customer-address {
    margin-top: 12px;
  }
  .wasd-invoice-customer .value-lg {
    font-size: 1.15rem;
  }
  .wasd-invoice-meta {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: left;
  }
  .wasd-invoice-meta .meta-center,
  .wasd-invoice-meta .meta-right {
    text-align: left;
  }
  .wasd-invoice-meta .value,
  .wasd-invoice-customer .value {
    word-break: break-word;
  }
  .wasd-invoice .money-currency,
  .wasd-invoice .hdr-currency {
    display: none;
  }
  .wasd-invoice-table thead {
    display: none;
  }
  .wasd-invoice-table,
  .wasd-invoice-table tbody {
    display: block;
    width: 100%;
  }
  .wasd-invoice-table tbody tr {
    display: block;
    border: 1px solid var(--inv-line);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
  }
  .wasd-invoice-table tbody tr.empty-row {
    display: none;
  }
  .wasd-invoice-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100% !important;
    border: 0 !important;
    padding: 6px 0 !important;
    font-size: 0.875rem;
    text-align: right !important;
  }
  .wasd-invoice-table tbody td::before {
    content: attr(data-label);
    font-weight: 800;
    color: var(--inv-red);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-align: left;
    flex: 0 0 auto;
    max-width: 42%;
  }
  .wasd-invoice-table tbody td.col-desc {
    flex-direction: column;
    align-items: flex-start;
    text-align: left !important;
  }
  .wasd-invoice-table tbody td.col-desc::before {
    margin-bottom: 4px;
    max-width: none;
  }
  .wasd-invoice-table .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-top: 4px;
    border: 2px solid var(--inv-line);
    border-radius: 8px;
  }
  .wasd-invoice-table .total-row td {
    display: none;
    border: 0 !important;
    padding: 0 !important;
  }
  .wasd-invoice-table .total-row .total-label,
  .wasd-invoice-table .total-row .total-value {
    display: block !important;
    font-size: 1rem;
  }
  .wasd-invoice-table .total-row .total-label {
    text-align: left;
  }
  .reports-page .kpi-card .label .kpi-currency {
    display: none;
  }
  .page-actions-buttons { width: 100%; }
  .page-actions-buttons .btn { flex: 1 1 calc(50% - 8px); min-width: 140px; }
  .table-actions .btn { padding: 0.25rem 0.45rem; }
  .admin-topbar .badge { display: none; }
  #lineItemsTable thead { display: none; }
  #lineItemsTable,
  #lineItemsTable tbody { display: block; width: 100%; }
  #lineItemsTable tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid var(--wasd-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  #lineItemsTable tbody td {
    display: block;
    width: 100%;
    border: 0 !important;
    padding: 0 !important;
    margin-bottom: 10px;
    text-align: left !important;
  }
  #lineItemsTable tbody td:last-child { margin-bottom: 0; }
  #lineItemsTable .line-sno {
    order: 1;
    width: auto;
    flex: 1 1 auto;
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--wasd-primary);
  }
  #lineItemsTable .line-sno::before {
    content: 'Sr. ';
    display: inline;
  }
  #lineItemsTable .line-actions-cell {
    order: 2;
    width: auto;
    flex: 0 0 auto;
    margin: 0 0 8px;
    margin-left: auto;
  }
  #lineItemsTable .line-actions-cell::before { display: none; }
  #lineItemsTable .line-desc-cell { order: 3; flex: 0 0 100%; width: 100%; }
  #lineItemsTable .line-qty-cell { order: 4; flex: 0 0 100%; width: 100%; }
  #lineItemsTable .line-price-cell { order: 5; flex: 0 0 100%; width: 100%; }
  #lineItemsTable .line-vat-cell { order: 6; flex: 0 0 100%; width: 100%; }
  #lineItemsTable .line-amount-cell { order: 7; flex: 0 0 100%; width: 100%; margin-bottom: 0; }
  #lineItemsTable tbody td:not(.line-sno):not(.line-actions-cell)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
  }
  #lineItemsTable .line-vat-cell .line-vat,
  #lineItemsTable .line-amount-cell .line-amount {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    text-align: right;
    min-height: 31px;
  }
  #lineItemsTable .line-desc-cell .form-control,
  #lineItemsTable .line-qty-cell .form-control,
  #lineItemsTable .line-price-cell .form-control { width: 100%; }
  .invoice-lines-wrap { overflow: visible; }
  .invoice-notes-section { display: none; }
  .invoice-totals-col { flex: 0 0 100%; max-width: 100%; }
  .invoice-totals-box { margin-top: 0; }
  .admin-grid-wrap {
    overflow: visible;
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .admin-grid-table thead { display: none; }
  .admin-grid-table,
  .admin-grid-table tbody { display: block; width: 100%; }
  .admin-grid-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid var(--wasd-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  .admin-grid-table tbody td {
    display: block;
    width: 100%;
    border: 0 !important;
    padding: 0 !important;
    margin-bottom: 8px;
    text-align: left !important;
    white-space: normal !important;
  }
  .admin-grid-table .grid-sr {
    order: 1;
    width: auto;
    flex: 1 1 auto;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--wasd-primary);
  }
  .admin-grid-table .grid-sr::before { content: 'Sr. '; }
  .admin-grid-table .grid-status,
  .admin-grid-table .grid-active {
    order: 2;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
    margin-bottom: 8px;
  }
  .admin-grid-table .grid-status::before,
  .admin-grid-table .grid-active::before { display: none; }
  .admin-grid-table .grid-ref,
  .admin-grid-table .grid-name {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1rem;
  }
  .admin-grid-table .grid-date { order: 4; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-customer { order: 5; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-desc { order: 6; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-total { order: 7; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-email { order: 4; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-phone { order: 5; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-address { order: 6; flex: 0 0 100%; width: 100%; }
  .admin-grid-table .grid-ref::before,
  .admin-grid-table .grid-name::before { display: none; }
  .admin-grid-table .grid-ref a { text-decoration: none; font-weight: 700; }
  .admin-grid-table tbody td:not(.grid-sr):not(.grid-status):not(.grid-active):not(.grid-ref):not(.grid-name):not(.grid-actions)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
  }
  .admin-grid-table .grid-total {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .admin-grid-table .grid-actions {
    order: 99;
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 0;
    padding-top: 10px !important;
    margin-top: 4px;
    border-top: 1px solid var(--wasd-border) !important;
  }
  .admin-grid-table .grid-actions::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
  }
  .admin-grid-table .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-grid-table .table-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 44px;
    margin: 0 !important;
  }
  .admin-shell.theme-dark .admin-grid-table tbody tr,
  .admin-body.theme-dark .admin-grid-table tbody tr {
    background: #1E293B;
    border-color: #334155;
  }
  .admin-shell.theme-dark .admin-grid-table .grid-actions,
  .admin-body.theme-dark .admin-grid-table .grid-actions {
    border-top-color: #334155 !important;
  }
  .modal-dialog { margin: 0.75rem; }
}
@media (max-width: 575px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-actions-buttons .btn { flex: 1 1 100%; width: 100%; }
  .container { width: min(100% - 24px, var(--wasd-container)); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand span { display: none; }
  .header-actions .btn-glow { padding: 10px 14px !important; }
  .toast-container { left: 12px; right: 12px; top: 12px; }
  #invoiceForm.card {
    padding: 1rem !important;
  }
  .wasd-invoice-preview-band {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    padding: 10px 8px;
  }
  .wasd-invoice-band-fill--preview-header {
    font-size: clamp(0.72rem, 3vw + 0.22rem, 0.98rem);
  }
  .wasd-invoice-band-fill--preview-footer {
    font-size: clamp(0.66rem, 2.6vw + 0.18rem, 0.88rem);
  }
}
@media print {
  .admin-topbar, .admin-sidebar, .no-print { display: none !important; }
  .admin-main, .admin-content, .admin-page { margin: 0 !important; padding: 0 !important; }
  .wasd-invoice, .invoice-print {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 12mm !important;
    min-height: calc(297mm - 24mm);
    display: flex !important;
    flex-direction: column !important;
  }
  .wasd-invoice-footer {
    margin-top: auto !important;
  }
  .wasd-invoice-stamp {
    right: 12mm !important;
    bottom: 22mm !important;
  }
  .wasd-invoice-stamp img {
    width: 28mm !important;
    max-height: 28mm !important;
  }
  .wasd-invoice-title,
  .wasd-invoice-band-fill {
    white-space: nowrap !important;
  }
  .wasd-invoice .money-currency,
  .wasd-invoice .hdr-currency {
    display: inline !important;
  }
  .wasd-invoice-table thead {
    display: table-header-group !important;
  }
  .wasd-invoice-table,
  .wasd-invoice-table tbody {
    display: table-row-group !important;
  }
  .wasd-invoice-table tbody tr {
    display: table-row !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .wasd-invoice-table tbody tr.empty-row {
    display: table-row !important;
  }
  .wasd-invoice-table tbody td {
    display: table-cell !important;
    width: auto !important;
    border: 1px solid var(--inv-line) !important;
    padding: 8px 6px !important;
    text-align: inherit !important;
  }
  .wasd-invoice-table tbody td::before {
    content: none !important;
  }
  .wasd-invoice-table .total-row {
    display: table-row !important;
  }
  .wasd-invoice-table .total-row td {
    display: table-cell !important;
  }
  body { background: #fff; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 1100px) {
  .grid-4, .stat-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav-toggle { margin-left: auto; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--wasd-border); padding: 12px 0; z-index: 99;
    box-shadow: var(--wasd-shadow-md);
  }
  .theme-dark .site-nav { background: rgba(15,23,42,.98); border-color: #1f2937; }
  .site-nav.show { display: flex; }
  .site-nav a { padding: 12px 24px; border-bottom: 1px solid var(--wasd-border); }
  .site-nav a:last-child { border-bottom: 0; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .header-actions { width: auto; margin-left: auto; }
  .hero-inner-wide { grid-template-columns: 1fr; padding-top: 100px; }
  .hero-preview-strip { grid-template-columns: repeat(3, 1fr); }
  .hero-preview-card { grid-template-columns: 1fr; text-align: center; }
  .hero-preview-card img { width: 100%; height: 120px; margin-inline: auto; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item, .gallery-item-featured { grid-column: span 6; }
}
@media (max-width: 720px) {
  .grid-4, .grid-3, .grid-2, .stat-grid, .kpi-grid, .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; padding: 32px; }
  .hero { min-height: 80vh; }
  .hero-preview-strip { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .video-grid { grid-template-columns: 1fr; }
  .gallery-item, .gallery-item-featured { grid-column: span 12; }
}
