:root {
  --primary-100: #e8f5f2;
  --primary-200: #c7ede3;
  --primary-300: #9fdacc;
  --primary-500: #0f766e;
  --primary-600: #0d5b54;
  --primary-700: #0b423c;
  --accent-500: #1d4ed8;
  --accent-600: #1e3a8a;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-500: #64748b;
  --neutral-700: #334155;
  --neutral-900: #0f172a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 15px 35px rgba(15, 118, 110, 0.08);
  --shadow-card: 0 25px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--neutral-50), var(--primary-100));
  color: var(--neutral-900);
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
  box-shadow: var(--shadow-soft);
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #ffffff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12), inset 0 0 0 2px rgba(13, 91, 84, 0.22);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.brand-text h1 {
  margin: 0;
  color: var(--primary-700);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-text p {
  margin: 4px 0 0;
  color: var(--neutral-500);
  font-size: 0.9rem;
}

.app-header .meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--neutral-500);
  font-size: 0.9rem;
}

.app-header .meta i {
  color: var(--primary-500);
}

.app-main,
.app-content {
  flex: 1;
  width: min(1200px, 96%);
  margin: 32px auto;
}

.app-content--full {
  width: min(1380px, 98%);
}

.app-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 48px;
}

.app-content {
  width: min(1280px, 97%);
}

.content-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.content-card--wide {
  padding: 40px;
}

.content-card--transparent {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.page-content-wrapper {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}

.page-content-wrapper--airy {
  padding: 40px;
}

.app-footer {
  background: var(--primary-700);
  color: #fff;
  padding: 24px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.app-footer .footer-brand strong {
  font-weight: 700;
}

.app-footer .footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
}

.app-footer .footer-links i {
  color: var(--primary-300);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: var(--primary-200);
  color: var(--primary-600);
  font-weight: 600;
}

.badge i {
  font-size: 0.8rem;
}

.section-title {
  font-size: 1.8rem;
  color: var(--primary-700);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary-500);
}

.button-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--primary-500);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.18);
}

.button-outline {
  background: transparent;
  border: 1px solid rgba(13, 91, 84, 0.35);
  color: var(--primary-600);
}

.grid-responsive {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card .label {
  color: var(--neutral-500);
  font-size: 0.9rem;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-600);
}

.portal-header {
  position: sticky;
  top: 0;
  inset-inline: 0;
  z-index: 1200;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  animation: portalHeaderDrop 0.6s ease;
}

.portal-topbar {
  background: #1f2933;
  color: #d9e3f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 36px;
}

.portal-topbar__left,
.portal-topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-topbar__lang {
  color: #d9e3f0;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding-inline-end: 14px;
}

.portal-topbar__lang::after {
  content: '';
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #0bb4c5;
  border-radius: 50%;
  transform: translateY(-50%);
}

.portal-topbar__login {
  background: linear-gradient(135deg, #f9b74a, #d6871f);
  color: #1f2933;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(217, 140, 9, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-topbar__login:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(217, 140, 9, 0.45);
}

.portal-topbar__contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #e2ecf7;
}

.portal-topbar__social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.portal-topbar__social a {
  color: #a7c5ff;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.portal-topbar__social a:hover {
  color: #fff;
  transform: translateY(-2px);
}

.portal-mainbar {
  background: linear-gradient(135deg, #0c9fb6 0%, #046d82 100%);
  padding: 0 36px;
  position: relative;
  overflow: hidden;
}

.portal-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.portal-nav::-webkit-scrollbar {
  height: 6px;
}

.portal-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.portal-nav__item {
  position: relative;
  margin-inline-end: -26px;
  transform: skewX(-16deg);
  opacity: 0;
  animation: navReveal 0.5s ease forwards;
}

.portal-nav__item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 34px;
  text-decoration: none;
  color: #f8fbff;
  font-weight: 600;
  letter-spacing: 0.2px;
  transform: skewX(16deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
  position: relative;
}

.portal-nav__item a::after {
  content: '';
  position: absolute;
  inset-inline: 18px;
  bottom: 6px;
  height: 2px;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.portal-nav__item:hover a {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
}

.portal-nav__item:hover a::after {
  opacity: 1;
}

.portal-nav__item--active a {
  background: linear-gradient(135deg, #39d2ff, #0ca8c6);
  color: #032b33;
}

.portal-nav__item--alert a {
  background: linear-gradient(135deg, #f85757, #d12c2c);
  color: #fff7f7;
}

.portal-nav__item--home a {
  background: linear-gradient(135deg, #0b7a8b, #095b67);
}

.portal-nav__item--search a {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55));
}

.portal-nav__item--alert .portal-nav__badge,
.portal-nav__item--active .portal-nav__badge {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.portal-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.35);
}

@keyframes navReveal {
  from {
    opacity: 0;
    transform: translateY(-12px) skewX(-16deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewX(-16deg);
  }
}

@keyframes portalHeaderDrop {
  from {
    transform: translateY(-80px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .portal-topbar {
    padding: 10px 20px;
  }

  .portal-mainbar {
    padding: 0 20px;
  }

  .portal-nav__item a {
    padding: 14px 24px;
  }
}

@media (max-width: 768px) {
  .portal-topbar__left,
  .portal-topbar__right {
    gap: 10px;
  }

  .portal-topbar__login {
    padding: 7px 16px;
    font-size: 0.85rem;
  }

  .portal-nav__item {
    margin-inline-end: -16px;
  }

  .portal-nav__item a {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .app-header .meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .app-main,
  .app-content {
    width: 92%;
    margin: 24px auto;
  }

  .content-card {
    padding: 24px;
  }

  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

