﻿:root {
  --bg: #f6f2eb;
  --surface: #ffffff;
  --surface-muted: #f7f3ec;
  --text: #1f2b27;
  --muted: #65706b;
  --primary: #1a7f72;
  --primary-strong: #116156;
  --accent: #f2b358;
  --accent-strong: #de9231;
  --border: rgba(20, 36, 32, 0.12);
  --shadow-sm: 0 10px 24px rgba(16, 36, 32, 0.08);
  --shadow-md: 0 18px 40px rgba(16, 36, 32, 0.12);
  --shadow-lg: 0 28px 70px rgba(16, 36, 32, 0.18);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Vazirmatn', 'Readex Pro', 'Tahoma', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  margin: 0;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
}

a {
  color: inherit;
}

a:hover {
  color: inherit;
}

.app-navbar {
  background: linear-gradient(120deg, #1a7f72, #125f54);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(12, 30, 26, 0.25);
  position: relative;
  z-index: 2;
}

.app-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #f9fbf7;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, #f7d7a6, #f2b358 55%, #d7852a);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.35);
}

.brand-text {
  white-space: nowrap;
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.app-navbar .nav-link.nav-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.app-navbar .nav-link.nav-pill:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.app-navbar .btn-link {
  text-decoration: none;
}

.app-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.4);
}

.app-navbar .navbar-toggler-icon {
  filter: invert(1);
}

.app-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.page-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 236, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: visible;
  animation: rise 0.6s ease both;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.page-header::after {
  content: "";
  position: absolute;
  top: -60px;
  left: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(242, 179, 88, 0.35), rgba(242, 179, 88, 0));
  z-index: 0;
}

.page-header__text {
  max-width: 70%;
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: 'Readex Pro', 'Vazirmatn', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.action-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 127, 114, 0.2);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.action-pill {
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  box-shadow: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.action-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 36, 32, 0.12);
}

.action-pill--warning {
  background: rgba(242, 179, 88, 0.2);
  border-color: rgba(242, 179, 88, 0.45);
  color: #a15b08;
}

.action-pill--info {
  background: rgba(26, 127, 114, 0.14);
  border-color: rgba(26, 127, 114, 0.35);
  color: var(--primary-strong);
}

.action-pill--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border: none;
}

.action-toolbar .dropdown-menu {
  margin-top: 0.6rem;
  min-width: 11rem;
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
}

.hero {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(240, 236, 227, 0.9));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: rise 0.7s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(26, 127, 114, 0.25), rgba(26, 127, 114, 0));
}

.hero-title {
  font-family: 'Readex Pro', 'Vazirmatn', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

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

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-card {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-chip {
  width: 60px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(26, 127, 114, 0.65), rgba(242, 179, 88, 0.7));
}

.hero-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(26, 127, 114, 0.18);
  margin-bottom: 0.5rem;
}

.hero-lines span:nth-child(2) {
  width: 80%;
}

.hero-lines span:nth-child(3) {
  width: 60%;
  margin-bottom: 0;
}

.hero-bars {
  display: flex;
  gap: 0.5rem;
}

.hero-bars span {
  flex: 1;
  height: 50px;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(242, 179, 88, 0.6), rgba(26, 127, 114, 0.15));
}

.feature-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26, 127, 114, 0.2), rgba(242, 179, 88, 0.35));
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.feature-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-text {
  color: var(--muted);
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.95);
}

.card-header {
  background: transparent;
  border-bottom: 1px dashed rgba(20, 36, 32, 0.15);
}

.card-header h4,
.card-header h5,
.card-header h6 {
  margin-bottom: 0;
}

.card-body {
  color: var(--text);
}

.stat-card {
  background: linear-gradient(150deg, rgba(26, 127, 114, 0.12), rgba(255, 255, 255, 0.95));
}

.stat-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
}

.table-responsive {
  border-radius: var(--radius-md);
}

.table {
  border-collapse: separate;
  border-spacing: 0 0.6rem;
  margin-bottom: 0;
  text-align: right;
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
}

.table thead th {
  color: var(--muted);
  font-weight: 600;
  border-bottom: none;
  background: transparent;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.table tbody tr td {
  border-top: none;
}

.table tbody tr td:first-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.table tbody tr td:last-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  --bs-table-accent-bg: transparent;
}

.badge {
  border-radius: 999px;
  padding: 0.35em 0.75em;
  font-weight: 600;
}

.bg-primary {
  background-color: var(--primary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  box-shadow: 0 12px 20px rgba(16, 36, 32, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(16, 36, 32, 0.16);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: none;
}

.btn-outline-primary {
  border-color: rgba(26, 127, 114, 0.45);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: rgba(26, 127, 114, 0.12);
  color: var(--primary-strong);
}

.btn-secondary {
  background: #223630;
  border: none;
}

.btn-info {
  background: rgba(26, 127, 114, 0.18);
  color: var(--primary-strong);
  border: 1px solid rgba(26, 127, 114, 0.25);
}

.btn-warning {
  background: rgba(242, 179, 88, 0.28);
  color: #a15b08;
  border: 1px solid rgba(242, 179, 88, 0.45);
}

.btn-success {
  background: rgba(45, 145, 94, 0.2);
  color: #1e6a44;
  border: 1px solid rgba(45, 145, 94, 0.3);
}

.btn-danger {
  background: rgba(196, 59, 59, 0.18);
  color: #a63c3c;
  border: 1px solid rgba(196, 59, 59, 0.25);
}

.btn-link {
  box-shadow: none;
  padding: 0.35rem 0.9rem;
  color: inherit;
}

.btn-lg {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  box-shadow: 0 8px 16px rgba(16, 36, 32, 0.12);
}

.form-label {
  font-weight: 600;
  color: var(--muted);
}

.form-control,
.form-select,
textarea,
select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
  border-radius: 0.85rem;
  border: 1px solid rgba(20, 36, 32, 0.2);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem 0.85rem;
  text-align: right;
  width: 100%;
  display: block;
  min-height: 48px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

form .row {
  row-gap: 0.75rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
  border-color: rgba(26, 127, 114, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(26, 127, 114, 0.15);
}

.alert {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 36, 32, 0.12);
  box-shadow: var(--shadow-sm);
}

.dropdown-menu {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20, 36, 32, 0.12);
  z-index: 1050;
}

.dropdown-item {
  font-weight: 500;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
  border-top: 1px solid rgba(20, 36, 32, 0.12);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.text-muted {
  color: var(--muted) !important;
}

.stagger > * {
  animation: rise 0.7s ease both;
}

.stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger > *:nth-child(2) {
  animation-delay: 0.12s;
}

.stagger > *:nth-child(3) {
  animation-delay: 0.19s;
}

.stagger > *:nth-child(4) {
  animation-delay: 0.26s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

body::before {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(242, 179, 88, 0.35), rgba(242, 179, 88, 0));
  filter: blur(6px);
  z-index: 0;
  animation: float 9s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  bottom: -200px;
  left: -180px;
  background: radial-gradient(circle, rgba(26, 127, 114, 0.28), rgba(26, 127, 114, 0));
  filter: blur(6px);
  z-index: 0;
  animation: float 11s ease-in-out infinite;
}

@media (max-width: 992px) {
  .page-header::after {
    left: 0;
  }

  .page-header__text {
    max-width: 100%;
  }

  .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .action-toolbar {
    width: 100%;
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .app-navbar .navbar-collapse {
    background: rgba(18, 35, 30, 0.92);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
