/* ------------------------------------------------------------------
   DMS — Department of Women and Child Development, Uttar Pradesh
   Overrides layered on top of the admin theme. The theme is entirely
   CSS-variable driven, so re-pointing the primary scale re-skins it.
   ------------------------------------------------------------------ */

:root {
  --primary-50: #FFF3E8;
  --primary-100: #FFE0C7;
  --primary-200: #FFC79A;
  --primary-300: #FBA968;
  --primary-400: #F28C3E;
  --primary-500: #E4761F;
  --primary-600: #D2691E;
  --primary-700: #B3541A;
  --primary-800: #8F4216;
  --primary-900: #6E3211;
  --primary-light: rgba(210, 105, 30, 0.15);
  --primary-light-white: rgba(210, 105, 30, 0.25);

  --dms-maroon: #B01C1C;
  --dms-green-band: #D9F0E1;
  --dms-header-tint: #FDF3F5;

  /* Data-entry screens carry many fields per row, so inputs sit tighter than the theme default. */
  --input-height: 38px;
  --input-fs: 14px;
  --py: 6px;
  --px: 12px;
}

.form-control,
.form-select,
textarea.form-control {
  min-height: 38px;
  padding-block: 6px;
  font-size: 14px;
}

.form-select {
  padding-inline: 12px 28px;
}

textarea.form-control {
  min-height: 84px;
}

/* Native file pickers otherwise wrap "No file chosen" onto a second line. */
.form-control[type="file"],
form .form-control[type="file"] {
  line-height: 24px;
  padding-block: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select.form-control[multiple],
select.form-select[multiple] {
  min-height: 150px;
}

.form-label {
  margin-bottom: 4px;
}

/* The theme's auth screens use fixed 56px fields; bring them in line with the rest. */
.dms-login-card .h-56-px {
  height: 42px !important;
  min-height: 42px !important;
}

/* ---------------------------------------------------------- branding */

.dms-sidebar-logo {
  display: flex !important;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding-inline: 4px;
}

.dms-logo-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-600), var(--dms-maroon));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dms-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.dms-logo-hi {
  font-size: 14px;
  font-weight: 700;
  color: var(--dms-maroon);
  white-space: nowrap;
}

.dms-logo-en {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--neutral-500);
  white-space: nowrap;
}

.sidebar.active .dms-logo-text {
  display: none;
}

.dms-brand-banner {
  height: 42px;
  width: auto;
  max-width: 460px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .dms-brand-banner {
  background: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  mix-blend-mode: normal;
}

.dms-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--dms-maroon));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  border: 0;
}

/* ---------------------------------------------------------- page furniture */

.dms-page-title {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--dms-maroon);
}

.dms-headline {
  color: var(--dms-maroon);
  font-weight: 700;
}

[data-theme="dark"] .dms-headline {
  color: var(--primary-300);
}

/* The theme's toggle writes the words "light"/"dark" into the button; show an icon instead. */
[data-theme-toggle] {
  font-size: 0 !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

[data-theme="dark"] [data-theme-toggle] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E5E7EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E");
}

.dms-form-section {
  border-bottom: 1px dashed var(--neutral-200, #E5E7EB);
  padding-block: 20px;
}

.dms-form-section:last-of-type {
  border-bottom: 0;
}

.dms-required::after {
  content: " *";
  color: var(--danger-main, #EF4A00);
  font-weight: 700;
}

.dms-kpi-band {
  background: linear-gradient(120deg, var(--dms-header-tint), var(--dms-green-band));
  border-radius: 16px;
}

[data-theme="dark"] .dms-kpi-band {
  background: linear-gradient(120deg, rgba(210, 105, 30, 0.14), rgba(22, 163, 74, 0.14));
}

.dms-kpi-figure {
  font-size: 28px;
  font-weight: 700;
  color: var(--dms-maroon);
  line-height: 1.1;
}

[data-theme="dark"] .dms-kpi-figure {
  color: var(--primary-300);
}

.dms-scheme-strip img {
  height: 120px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.dms-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.dms-multi-select {
  min-height: 150px;
}

.dms-log-action {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
}

table.dataTable tbody td,
table.dataTable thead th {
  vertical-align: middle;
}

/* ---------------------------------------------------------- login */

.dms-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 520px at 15% -10%, rgba(210, 105, 30, 0.18), transparent 60%),
    radial-gradient(900px 480px at 110% 110%, rgba(22, 163, 74, 0.18), transparent 55%),
    var(--neutral-50);
}

.dms-login-card {
  width: 100%;
  max-width: 940px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-color, #fff);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.dms-login-aside {
  background: linear-gradient(150deg, var(--primary-700), var(--dms-maroon));
  color: #fff;
  padding: 40px 34px;
}

.dms-login-aside h4,
.dms-login-aside p,
.dms-login-aside li {
  color: #fff;
}

.dms-login-aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dms-login-aside li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 0.95;
}

.dms-login-banner {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.dms-captcha-box {
  border: 1px solid var(--neutral-300, #D1D5DB);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
  line-height: 0;
}

.dms-captcha-box svg {
  border-radius: 6px;
}

/* ---------------------------------------------------------- print */

@media print {
  .sidebar,
  .navbar-header,
  .d-footer,
  .dms-no-print {
    display: none !important;
  }

  .dashboard-main {
    margin-inline-start: 0 !important;
  }

  .dashboard-main-body {
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}
