@import url('/assets/css/fonts.css');

:root {
  --primary-color: #0f4c81;
  --primary-light: #2575fc;
  --primary-gradient: linear-gradient(135deg, #0d3b66 0%, #0077b6 50%, #0096c7 100%);
  --accent-gold: #f59e0b;
  --accent-gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --accent-emerald: #10b981;
  --dark-bg: #0a192f;
  --dark-card: rgba(16, 37, 66, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.25s ease-in-out;
}

/* Base Typography - Apply Yekan Bakh cleanly without breaking icon fonts */
html, body, button, input, select, textarea, p, h1, h2, h3, h4, h5, h6, a, label, div, table, th, td, blockquote, small, b, strong {
  font-family: 'Yekan Bakh', 'YekanBakh', 'YekanBakhFaNum', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Explicitly preserve FontAwesome and Themify Icon Fonts */
i, 
.fa, .fas, .far, .fab, .fad, .fat, .fal, .fass, .fasr,
.fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-thin, .fa-duotone,
[class^="fa-"], [class*=" fa-"],
[class^="ti-"], [class*=" ti-"] {
  font-family: "Font Awesome 7 Pro", "Font Awesome 6 Free", "FontAwesome", "themify" !important;
  font-style: normal !important;
  font-weight: 900;
  display: inline-block;
  line-height: 1;
}

body {
  direction: rtl;
  text-align: right;
  background-color: #f8fafc;
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Modern Sticky Navbar */
.modern-navbar {
  background: rgba(13, 59, 102, 0.97) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 0 !important;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1030;
}

.modern-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}

.modern-navbar .navbar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.modern-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 12px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modern-navbar .nav-link:hover,
.modern-navbar .nav-link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15);
}

.modern-navbar .btn-nav-action {
  background: var(--accent-gold-gradient);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.modern-navbar .btn-nav-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
  color: #fff !important;
}

/* Modern Hero Section */
.modern-hero {
  position: relative;
  min-height: 85vh;
  padding: 120px 0 70px 0;
  background: radial-gradient(circle at 80% 20%, rgba(37, 117, 252, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.2) 0%, transparent 50%),
              linear-gradient(135deg, #091e3a 0%, #0d3b66 60%, #17426c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.modern-hero::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='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'%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/svg%3E");
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd166;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.hero-title span {
  background: linear-gradient(120deg, #ffd166 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.02rem;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 28px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.hero-pill-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
}

.hero-pill-item i {
  color: #38bdf8;
}

/* Glassmorphism Login Card */
.glass-login-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  color: var(--text-main);
  transition: var(--transition);
}

.glass-login-card:hover {
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.45);
}

.glass-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0f4c81, #0096c7, #f59e0b);
}

.login-card-header {
  text-align: center;
  margin-bottom: 20px;
}

.login-card-header .card-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(0, 150, 199, 0.15));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 1.5rem;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.1);
}

.login-card-header h4 {
  font-weight: 800;
  color: #0f172a;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.login-card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Custom Form Controls */
.modern-form-group {
  margin-bottom: 16px;
}

.modern-form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 6px;
}

.custom-input-wrapper {
  position: relative;
}

.custom-input-wrapper .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
  z-index: 5;
}

.custom-input-wrapper .form-control,
.custom-input-wrapper select.form-control {
  height: 48px;
  padding: 8px 42px 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.custom-input-wrapper .form-control:focus,
.custom-input-wrapper select.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.15);
  outline: none;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.3);
  transition: var(--transition);
  cursor: pointer;
  margin-top: 8px;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15, 76, 129, 0.45);
  color: #fff;
}

/* Stats Counter Section */
.stats-section {
  position: relative;
  margin-top: -40px;
  z-index: 10;
  margin-bottom: 45px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border: 1px solid #edf2f7;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-card.stat-blue .stat-icon { background: rgba(15, 76, 129, 0.1); color: #0f4c81; }
.stat-card.stat-gold .stat-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-card.stat-green .stat-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-card.stat-purple .stat-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.stat-number {
  font-size: 1.75rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 2px;
}

.stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Section Common Styling */
.section-title-wrap {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px auto;
}

.section-title-wrap.text-right {
  text-align: right !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  max-width: 100% !important;
}

.section-tag {
  display: inline-block;
  background: rgba(15, 76, 129, 0.08);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.section-heading {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.4;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* Feature & Service Cards */
.feature-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  height: 100%;
}

.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(15, 76, 129, 0.1);
  border-color: #93c5fd;
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: #ffffff;
  margin-bottom: 18px;
  box-shadow: 0 8px 16px rgba(15, 76, 129, 0.2);
}

.feature-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.75;
  margin-bottom: 0;
}

/* About Highlight Card */
.about-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  border: 1px solid #dcfce7;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.07);
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.about-feature-item .check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  font-size: 0.82rem;
}

/* e-Namad & Trust Badges Section */
.enamad-showcase-section {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 50px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}

.trust-badge-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  border: 2px dashed #cbd5e1;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 190px;
}

.trust-badge-card:hover {
  border-color: var(--primary-color);
  border-style: solid;
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(15, 76, 129, 0.1);
}

.trust-badge-card .badge-placeholder-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.trust-badge-card:hover .badge-placeholder-box {
  background: rgba(15, 76, 129, 0.08);
}

.trust-badge-card h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}

.trust-badge-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Modern Footer */
.modern-footer {
  background: #091e3a;
  color: #e2e8f0;
  padding: 50px 0 20px 0;
}

.footer-brand h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.85;
}

.footer-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: #38bdf8;
  transform: translateX(-3px);
}

.enamad-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: inline-block;
  transition: var(--transition);
}

.enamad-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.footer-bottom {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
  .modern-navbar .nav-link {
    padding: 6px 8px !important;
    font-size: 0.84rem;
  }
}

@media (max-width: 991.98px) {
  .modern-hero {
    padding: 85px 0 35px 0;
    min-height: auto;
    text-align: right;
  }
  .hero-badge {
    font-size: 0.78rem;
    padding: 4px 14px;
    margin-bottom: 12px;
  }
  .hero-title {
    font-size: 1.55rem;
    line-height: 1.4;
    margin-bottom: 12px;
    text-align: right;
  }
  .hero-desc {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: right;
  }
  .hero-pills {
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 14px;
  }
  .hero-pill-item {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .glass-login-card {
    margin-top: 15px;
    padding: 22px 18px;
    border-radius: 20px;
  }
  .login-card-header {
    margin-bottom: 14px;
  }
  .login-card-header .card-icon-wrap {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
    margin-bottom: 8px;
  }
  .login-card-header h4 {
    font-size: 1.15rem;
    margin-bottom: 4px;
  }
  .login-card-header p {
    font-size: 0.8rem;
  }
  .modern-form-group {
    margin-bottom: 12px;
  }
  .modern-form-group label {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }
  .custom-input-wrapper input,
  .custom-input-wrapper select {
    height: 44px !important;
    font-size: 0.88rem !important;
    padding-right: 38px !important;
  }
  .btn-login-submit {
    height: 46px;
    font-size: 0.95rem;
    border-radius: 12px;
    margin-top: 8px;
  }
  .stats-section {
    margin-top: 10px;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 14px 10px;
    border-radius: 14px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    margin-bottom: 6px;
  }
  .stat-number {
    font-size: 1.25rem;
    margin-bottom: 2px;
  }
  .stat-title {
    font-size: 0.74rem;
  }
  .section-heading {
    font-size: 1.45rem;
  }
  .section-desc {
    font-size: 0.88rem;
    margin-bottom: 25px;
  }
  .feature-box {
    padding: 20px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
  .rule-card {
    padding: 18px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
  .enamad-card {
    padding: 16px 14px;
    border-radius: 16px;
  }
  .modern-navbar .navbar-collapse {
    background: rgba(9, 30, 58, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }
  .modern-navbar .nav-link {
    padding: 8px 12px !important;
    font-size: 0.88rem;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.35rem;
  }
  .glass-login-card {
    padding: 18px 14px;
    border-radius: 18px;
  }
  .section-heading {
    font-size: 1.3rem;
  }
  .about-card {
    padding: 20px 14px;
    border-radius: 18px;
  }
  .footer-widget h5 {
    font-size: 0.95rem;
  }
}


/* =========================================================
   PANEL MODERN STYLES (User & Admin Dashboards)
   ========================================================= */

.panel-body-wrapper {
  background-color: #f1f5f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.panel-top-nav {
  background: linear-gradient(135deg, #0d3b66 0%, #0077b6 100%);
  color: #ffffff;
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.panel-container {
  max-width: 1050px;
  margin: 30px auto;
  padding: 0 16px;
  flex: 1;
}

.panel-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-card-header {
  background: linear-gradient(135deg, #0f4c81 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-card-header h3, 
.panel-card-header h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-card-body {
  padding: 28px 24px;
}

/* Panel Stat Cards Grid - 3 columns on desktop (2 rows of 3) */
.panel-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 991.98px) {
  .panel-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .panel-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.panel-stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.panel-stat-item:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 10px 20px rgba(15, 76, 129, 0.08);
}

.panel-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.panel-stat-item.blue .panel-stat-icon { background: rgba(15, 76, 129, 0.1); color: #0f4c81; }
.panel-stat-item.gold .panel-stat-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.panel-stat-item.green .panel-stat-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.panel-stat-item.purple .panel-stat-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.panel-stat-item.red .panel-stat-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.panel-stat-info .stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 600;
}

.panel-stat-info .stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}

.panel-stat-info .stat-value small {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

/* Panel Menu Grid (Action Buttons) - 4 columns on desktop */
.panel-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1280px) {
  .panel-menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.98px) {
  .panel-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .panel-menu-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.panel-menu-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 16px;
  text-decoration: none !important;
  color: #1e293b !important;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.panel-menu-btn:hover {
  border-color: #0077b6;
  background: #f0f9ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 119, 182, 0.12);
}

.panel-menu-btn .btn-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d3b66, #0077b6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(13, 59, 102, 0.2);
}

.panel-menu-btn.red-btn .btn-icon-wrap {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.panel-menu-btn.green-btn .btn-icon-wrap {
  background: linear-gradient(135deg, #059669, #10b981);
}

.panel-menu-btn.gold-btn .btn-icon-wrap {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.panel-menu-btn .btn-text-wrap {
  display: flex;
  flex-direction: column;
}

.panel-menu-btn .btn-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}

.panel-menu-btn .btn-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* Modern Panel Data Tables */
.panel-table-responsive {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  margin-bottom: 20px;
}

.table-panel-custom {
  width: 100%;
  margin-bottom: 0;
  background-color: #ffffff;
  border-collapse: collapse;
}

.table-panel-custom th {
  background: #0f4c81;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 14px 16px;
  text-align: center;
  border: none;
}

.table-panel-custom td {
  padding: 13px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table-panel-custom th.text-right,
.table-panel-custom td.text-right,
.table-panel-custom th.text-start,
.table-panel-custom td.text-start {
  text-align: right !important;
}

.table-panel-custom tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table-panel-custom tbody tr:hover {
  background-color: #eff6ff;
}

.panel-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  color: #334155 !important;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 50px;
  text-decoration: none !important;
  transition: var(--transition);
}

.panel-back-btn:hover {
  background: #0f4c81;
  color: #ffffff !important;
  border-color: #0f4c81;
  transform: translateX(4px);
}

/* Panel Form Styles & Tabs */
.panel-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.panel-tab-link {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}

.panel-tab-link:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.panel-tab-link.active {
  background: var(--primary-gradient);
  color: #ffffff !important;
  border-color: #0077b6;
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
}

.panel-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  margin-bottom: 24px;
}

.panel-form-card .card-title-custom {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f4c81;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 10px;
}

.panel-search-bar {
  position: relative;
  margin-bottom: 18px;
}

.panel-search-bar input {
  padding-right: 42px !important;
  border-radius: 12px !important;
  border: 1.5px solid #cbd5e1 !important;
  font-size: 0.9rem !important;
  background-color: #ffffff;
}

.panel-search-bar input:focus {
  border-color: #0f4c81 !important;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.15) !important;
}

.panel-search-bar .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}

/* Quick Fill Buttons */
.quick-fill-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-fill-btn:hover {
  background: #0f4c81;
  color: #ffffff;
  border-color: #0f4c81;
}

/* Printable Sheet Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .panel-sidebar, .panel-topbar, footer, .panel-back-btn, .no-print, .sidebar-backdrop {
    display: none !important;
  }
  .panel-main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  .panel-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .print-page-wrapper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .table-panel-custom th {
    background: #e2e8f0 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  .table-panel-custom td {
    border: 1px solid #cbd5e1 !important;
  }
}

/* ==========================================================================
   Modern Panel Sidebar & Layout Structure
   ========================================================================== */
.panel-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
  position: relative;
}

/* Sidebar Component */
.panel-sidebar {
  width: 275px;
  background: linear-gradient(180deg, #091f36 0%, #0d2e50 50%, #0b223c 100%);
  color: #ffffff;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar Custom Scrollbar */
.panel-sidebar::-webkit-scrollbar {
  width: 5px;
}
.panel-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Sidebar Brand / Header */
.sidebar-brand {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
  color: #ffffff !important;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transition: var(--transition);
}

.sidebar-brand:hover img {
  transform: scale(1.06);
}

.sidebar-brand-text h6 {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 2px;
  color: #ffffff;
  line-height: 1.3;
}

.sidebar-brand-text small {
  font-size: 0.75rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Sidebar User Profile Card */
.sidebar-user-card {
  padding: 16px 18px;
  margin: 14px 14px 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 2px;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 10px 14px;
  flex: 1;
}

.sidebar-heading {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45);
  margin: 16px 8px 8px 8px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition);
  position: relative;
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: #94a3b8;
  transition: var(--transition);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  transform: translateX(-4px);
}

.sidebar-link:hover i {
  color: #38bdf8;
}

.sidebar-link.active {
  background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 150, 199, 0.35);
}

.sidebar-link.active i {
  color: #ffffff;
}

.sidebar-link.text-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

.sidebar-link.text-danger:hover i {
  color: #ef4444;
}

/* Main Area Wrapper */
.panel-main-wrapper {
  margin-right: 275px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: calc(100% - 275px);
}

/* Topbar Component - Styled to Match Dark Sidebar */
.panel-topbar {
  height: 70px;
  background: linear-gradient(90deg, #091f36 0%, #0d2e50 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(9, 31, 54, 0.3);
  color: #ffffff;
}

.topbar-right, .topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.15rem;
}

.sidebar-toggle-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: scale(1.05);
}

.topbar-page-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.2px;
}

.btn-visit-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: var(--transition);
}

.btn-visit-site:hover {
  background: #0284c7;
  color: #ffffff !important;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 7px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: var(--transition);
}

.btn-topbar-logout:hover {
  background: #dc2626;
  color: #ffffff !important;
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-topbar-logout:hover {
  background: #dc2626;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Panel Content Area */
.panel-content-area {
  padding: 24px 28px;
  flex: 1;
}

/* Backdrop on mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 991.98px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .panel-sidebar {
    transform: translateX(100%);
  }

  .panel-sidebar.show {
    transform: translateX(0);
  }

  .panel-main-wrapper {
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .panel-topbar {
    padding: 0 14px;
    height: 60px;
  }

  .panel-content-area {
    padding: 12px 8px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .panel-container {
    padding: 0 6px !important;
    margin: 10px auto !important;
    max-width: 100% !important;
  }

  .panel-card {
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    border: 1px solid #e2e8f0;
  }

  .panel-card-header {
    padding: 14px 12px !important;
  }

  .panel-card-header h4, .panel-card-header h3 {
    font-size: 1.05rem !important;
  }

  .panel-card-body {
    padding: 12px 10px !important;
  }

  .panel-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .panel-stat-item {
    padding: 10px 8px !important;
    border-radius: 12px !important;
    gap: 8px !important;
  }

  .panel-stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.1rem !important;
    border-radius: 10px !important;
  }

  .panel-stat-info .stat-label {
    font-size: 0.72rem !important;
  }

  .panel-stat-info .stat-value {
    font-size: 0.95rem !important;
  }

  .panel-stat-info .stat-value small {
    font-size: 0.68rem !important;
  }

  .panel-menu-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .panel-menu-btn {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }

  .panel-tab-nav {
    gap: 6px !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
  }

  .panel-tab-link {
    padding: 7px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  .panel-form-card {
    padding: 14px 10px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .table-panel-custom {
    table-layout: fixed !important;
    width: 100% !important;
  }

  .table-panel-custom th, .table-panel-custom td {
    padding: 8px 4px !important;
    font-size: 0.78rem !important;
    word-break: break-word;
  }

  .topbar-page-title {
    font-size: 0.9rem;
  }
}

/* Desktop Collapsed Sidebar State */
@media (min-width: 992px) {
  body.sidebar-collapsed .panel-sidebar {
    width: 78px;
  }
  body.sidebar-collapsed .panel-sidebar .sidebar-brand-text,
  body.sidebar-collapsed .panel-sidebar .sidebar-user-info,
  body.sidebar-collapsed .panel-sidebar .sidebar-heading,
  body.sidebar-collapsed .panel-sidebar .sidebar-link span {
    display: none;
  }
  body.sidebar-collapsed .panel-sidebar .sidebar-user-card {
    padding: 8px;
    justify-content: center;
    margin: 10px 8px;
  }
  body.sidebar-collapsed .panel-sidebar .sidebar-link {
    justify-content: center;
    padding: 12px 0;
  }
  body.sidebar-collapsed .panel-sidebar .sidebar-link i {
    font-size: 1.25rem;
    margin: 0;
  }
  body.sidebar-collapsed .panel-main-wrapper {
    margin-right: 78px;
    width: calc(100% - 78px);
  }
}





