/**
 * Faradadeh UI polish + responsive (v1.2)
 */

/* Softer type scale */
body.faradadeh-body {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400 !important;
  font-variation-settings: "wght" 400 !important;
}

body.faradadeh-body .card,
body.faradadeh-body .panel,
body.faradadeh-body .list-group-item,
body.faradadeh-body .form-control,
body.faradadeh-body .btn,
body.faradadeh-body label,
body.faradadeh-body .sidebar .card-title,
body.faradadeh-body .sidebar .card-header {
  font-weight: 400 !important;
  font-variation-settings: "wght" 400 !important;
}

body.faradadeh-body .fd-page-heading,
body.faradadeh-body .fd-dash-intro h2,
body.faradadeh-body .card-title,
body.faradadeh-body h1,
body.faradadeh-body h2,
body.faradadeh-body h3 {
  font-weight: 600 !important;
  font-variation-settings: "wght" 600 !important;
}

/* Content width */
.fd-content {
  max-width: 1280px;
}

.fd-topbar {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.fd-content {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.fd-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fd-topbar-actions .fd-btn {
  white-space: nowrap;
  gap: 8px;
  padding: 10px 14px;
}

.fd-btn-label {
  display: inline;
}

body.faradadeh-body .sidebar .card,
body.faradadeh-body .sidebar .panel {
  margin-bottom: 12px;
}

body.faradadeh-body .sidebar .list-group-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.faradadeh-body .sidebar .list-group-item i,
body.faradadeh-body .sidebar .card-header i,
body.faradadeh-body .card-title i,
body.faradadeh-body .btn i {
  width: 1.15em;
  text-align: center;
  flex-shrink: 0;
}

/* Forms denser */
body.faradadeh-body .form-group,
body.faradadeh-body .row .form-group {
  margin-bottom: 12px;
}

body.faradadeh-body label {
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--fd-muted);
}

body.faradadeh-body .form-control {
  min-height: 42px;
  font-size: 14px;
}

/* Dashboard */
.fd-dash-intro {
  align-items: flex-start;
}

.fd-dash-intro h2 {
  font-size: 22px;
}

.fd-dash-cta {
  flex-shrink: 0;
}

.fd-stat-card strong {
  font-weight: 600 !important;
  font-variation-settings: "wght" 600 !important;
  font-size: 28px;
}

.fd-quick-list a {
  flex-direction: row-reverse;
  justify-content: space-between;
}

.fd-quick-list a .fd-plus {
  margin: 0;
}

/* Mobile */
@media (max-width: 900px) {
  .fd-app {
    display: block;
  }

  .fd-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: min(84vw, 300px);
    transform: translateX(110%);
    transition: transform 0.22s ease;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
    border-left: 0;
    z-index: 1050;
    background: #fff;
  }

  body.fd-sidebar-open .fd-sidebar {
    transform: translateX(0);
  }

  body.fd-sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 1040;
  }

  .fd-menu-toggle {
    display: inline-flex !important;
  }

  .fd-topbar {
    padding: 12px 14px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(245, 246, 248, 0.92);
    backdrop-filter: blur(8px);
  }

  .fd-topbar-title {
    flex: 1;
    min-width: 0;
  }

  .fd-topbar-title h1 {
    font-size: 15px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fd-btn-label {
    display: none;
  }

  .fd-topbar-actions .fd-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
  }

  .fd-content {
    padding: 12px 14px 28px !important;
  }

  .fd-dash-intro {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .fd-dash-cta {
    width: 100%;
  }

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

  .fd-stat-card {
    padding: 14px;
  }

  .fd-stat-card strong {
    font-size: 24px;
  }

  .fd-dash-grid {
    grid-template-columns: 1fr !important;
  }

  body.faradadeh-body .col-lg-4,
  body.faradadeh-body .col-xl-3,
  body.faradadeh-body .col-lg-8,
  body.faradadeh-body .col-xl-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.faradadeh-body .sidebar {
    margin-bottom: 12px;
  }

  body.faradadeh-body .row > [class*="col-"] {
    margin-bottom: 8px;
  }
}

@media (max-width: 560px) {
  .fd-stat-grid {
    grid-template-columns: 1fr !important;
  }

  .fd-home-hero,
  .fd-home-grid {
    grid-template-columns: 1fr !important;
  }

  .fd-login-shell {
    border-radius: 18px;
  }
}

