/* ==========================================================================
   Smart VLE - DigitalMsg SaaS UI Style
   Matching Exact Design Aesthetic from Screenshots and shivahost.in
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-accent: #bbf451;
  --primary-hover: #a3e635;
  --primary-text: #1a2e05;
  --forest-ink: #07130e;
  --forest: #0b2a1e;
  --forest-2: #14452f;
  --dark-bg: #091712;
  --dark-card: #0d221a;
  --dark-surface: #122c22;
  --body-bg: #f6f8fb;
  --card-bg: #ffffff;
  --text-main: #0b1220;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e6ebf2;
  --border-soft: #f1f5f9;
  --sidebar-width: 252px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .03);
  --shadow-card: 0 4px 16px -4px rgba(15, 23, 42, .08), 0 2px 6px -2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 18px 44px -14px rgba(15, 23, 42, .18), 0 6px 18px -8px rgba(15, 23, 42, .08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(187, 244, 81, .16), transparent 60%),
    radial-gradient(700px 380px at -6% 4%, rgba(14, 165, 233, .07), transparent 62%),
    var(--body-bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #cdf86a, var(--primary-accent) 55%, #a3e635);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px -6px rgba(187, 244, 81, 0.55);
}

.btn-main:hover {
  background: linear-gradient(135deg, #cdf86a, var(--primary-accent) 45%, #a3e635);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -6px rgba(187, 244, 81, 0.7);
}

.btn-main:active { transform: translateY(1px) scale(0.99); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s, transform 0.16s ease;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  line-height: 1.2;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-blue {
  background: #e0f2fe;
  color: #0369a1;
}

/* ==========================================================================
   APP SHELL / LAYOUT (Screenshots 2, 3, 4)
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar — Clean modern white sidebar with soft green accents (ShivaHost style) */
.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.02);
}

.sidebar-brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 800;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  padding: 12px 10px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: 0.865rem;
  font-weight: 600;
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-link-content {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav-link svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  color: #64748b;
  transition: color 0.15s;
}

.nav-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.nav-link:hover svg {
  color: #16a34a;
}

.nav-link.active {
  background: #f0fdf4 !important;
  color: #15803d !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.nav-link.active svg {
  color: #16a34a !important;
}

.nav-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e !important;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6) !important;
}

.nav-tag-main {
  font-size: 0.62rem;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.sidebar-promo-card {
  margin: 14px 10px 16px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.sidebar-promo-card h5 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-promo-card p {
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.45;
}

/* Header / Topbar — sticky frosted glass */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar-welcome {
  font-size: 0.925rem;
  color: var(--text-muted);
}

.topbar-welcome strong {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-site-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-site-link:hover {
  color: var(--text-main);
}

.topbar-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.topbar-user-chip:hover {
  background: #f8fafc;
  border-color: var(--border-color);
}

.user-avatar-circle {
  width: 33px;
  height: 33px;
  border-radius: 11px;
  background: linear-gradient(140deg, #334155, #0f172a);
  color: #bbf451;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.35);
}

.user-name-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Workspace Content Area */
.app-content {
  padding: 26px 28px 56px;
  flex-grow: 1;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.page-header-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.page-header-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Base Card Style — adm panel */
.dash-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 18px;
}

/* Filter Pills */
.filter-pills {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.filter-pill {
  padding: 6px 14px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
}

.filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Table Style — adm-table look */
.table-responsive {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.855rem;
}

.custom-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.665rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #8296ab;
  letter-spacing: 0.1em;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 16px;
  color: #1e293b;
  border-bottom: 1px solid #f4f7fa;
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: background 0.14s ease;
}

.custom-table tbody tr:hover td {
  background: #fbfdf6;
}

.custom-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #a3e635;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table .num {
  font-variant-numeric: tabular-nums;
}

/* Instance Card (Screenshot 4) */
.instance-card {
  background: #ffffff;
  border: 1.5px solid #d9f3b5;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.instance-card:hover {
  box-shadow: var(--shadow-card);
}

.instance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.instance-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instance-badge-active {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
}

.instance-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.instance-detail-box {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.instance-detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.instance-detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.instance-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

/* Profile Details Grid (Screenshot 3) */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.profile-field-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.profile-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.profile-field-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.full-col {
  grid-column: span 2;
}

/* ==========================================================================
   LOGIN SPLIT SCREEN (Screenshot 1)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(220, 252, 231, 0.6) 0%, rgba(240, 253, 244, 0.3) 90%), #ffffff;
  padding: 24px;
}

.auth-split-card {
  display: flex;
  width: 100%;
  max-width: 980px;
  min-height: 540px;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

.auth-left {
  flex: 1;
  background: linear-gradient(145deg, #091a13 0%, #0d2c20 50%, #123829 100%);
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #bbf451;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.auth-pill-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 18px;
}

.auth-headline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.auth-headline span {
  color: #bbf451;
}

.auth-description {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.auth-check-icon {
  width: 18px;
  height: 18px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  flex-shrink: 0;
}

.auth-left-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 32px;
}

.auth-right {
  flex: 1.1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-label a {
  color: #10b981;
  font-weight: 500;
  font-size: 0.775rem;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid #dce4ec;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.15s ease;
  background: #fbfdff;
  color: #0f172a;
}

.form-control:hover { border-color: #c9d4e0; }

.form-control:focus {
  border-color: #a3e635;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(187, 244, 81, 0.3);
}

textarea.form-control {
  line-height: 1.6;
  resize: vertical;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

.form-group .form-control:not(.has-icon),
.modal-body .form-control:not(.has-icon) {
  padding-left: 14px;
}

/* Inputs that carry a leading icon (login, modals) need the room back —
   otherwise the icon overlaps the typed text (login icon fix, B5). */
.form-group .input-icon-wrap .form-control,
.modal-body .input-icon-wrap .form-control {
  padding-left: 40px;
}

.recaptcha-widget {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
}

.recaptcha-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
}

.recaptcha-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #10b981;
  cursor: pointer;
}

.auth-bottom-banner {
  margin-top: 18px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #f8fafc;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.auth-bottom-banner a {
  color: #0f172a;
  font-weight: 600;
}

.auth-bottom-banner a:hover {
  text-decoration: underline;
}

/* Alert messages — adm-note look */
.alert-danger {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.alert-info {
  background: #f6f9fd;
  border: 1px solid #dfe9f5;
  color: #0369a1;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .auth-split-card {
    flex-direction: column;
    max-width: 480px;
  }
  .auth-left {
    padding: 32px;
  }
  .auth-right {
    padding: 32px;
  }
  .app-sidebar {
    display: none;
  }
  .instance-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .full-col {
    grid-column: span 1;
  }
}

/* ==========================================================================
   MODAL / POPUP SYSTEM
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
  animation: modalFade 0.18s ease both;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  margin: auto 0;
  box-shadow: 0 30px 70px -18px rgba(15, 23, 42, 0.45);
  animation: modalPop 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  overflow: hidden;
}

.modal-box.modal-sm { max-width: 440px; }
.modal-box.modal-lg { max-width: 860px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 9px;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.modal-close {
  flex-shrink: 0;
  border: none;
  background: var(--border-soft);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.modal-body {
  padding: 22px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-grid .full-width { grid-column: 1 / -1; }

.modal-section-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .modal-overlay { padding: 16px 10px; }
  .modal-body { padding: 16px; max-height: calc(100vh - 210px); }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-foot { padding: 14px 16px; flex-wrap: wrap; }
}

