:root {
  --strada-primary: #0d6efd;
  --strada-dark: #0b1f3a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ----- Auth pages ----- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef4ff 0%, #e4efff 45%, #d9e9ff 100%);
  padding: 2rem 1rem;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #dbe7ff;
  box-shadow: 0 12px 30px rgba(16, 60, 120, .12) !important;
}
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-logo {
  max-width: 240px;
  width: 100%;
  height: auto;
  margin-bottom: .5rem;
}

/* ----- Navbar ----- */
.brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.navbar .nav-link.active { color: #fff !important; font-weight: 600; }
.navbar .nav-link i { margin-right: .25rem; }

/* ----- Dashboard cards ----- */
.stat-card {
  border: 0;
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); }
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }

/* ----- Module Picker ----- */
.module-picker { position: relative; }
.module-picker .accordion-button {
  font-weight: 600;
  background-color: #f8f9fa;
}
.module-picker .accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: var(--strada-primary);
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .5rem;
}
.module-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: .6rem .75rem;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.module-item:hover { border-color: var(--strada-primary); background: #f8fbff; }
.module-item.selected { border-color: var(--strada-primary); background: #e7f1ff; box-shadow: inset 0 0 0 1px var(--strada-primary); }
.module-item label { cursor: pointer; margin: 0; display: flex; align-items: center; gap: .5rem; font-weight: 500; width: 100%; }
.module-item .module-meta { display: none; margin-top: .5rem; gap: .5rem; }
.module-item.selected .module-meta { display: flex; flex-wrap: wrap; }
.module-item .module-meta input { font-size: .85rem; }
.module-item.hidden-by-search { display: none; }

.category-badge { font-size: .75rem; font-weight: 500; }

.preset-chip {
  cursor: pointer;
  user-select: none;
}
.preset-chip.preset-selected {
  background-color: var(--strada-primary) !important;
  color: #fff !important;
  border-color: var(--strada-primary) !important;
}

/* Sticky summary */
.module-summary {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.module-summary .summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.module-summary .summary-chip {
  background: #e7f1ff;
  color: var(--strada-primary);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.module-summary .summary-chip button {
  background: transparent;
  border: 0;
  color: var(--strada-primary);
  font-size: .9rem;
  line-height: 1;
  padding: 0;
}

/* Mobile bottom-sheet özet */
@media (max-width: 991.98px) {
  .module-summary {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    max-height: 50vh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.12);
    z-index: 1030;
    transform: translateY(calc(100% - 56px));
    transition: transform .25s ease;
  }
  .module-summary.open { transform: translateY(0); }
  .module-summary .summary-toggle { display: flex !important; }
}
.module-summary .summary-toggle { display: none; }

/* Form sections */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
}
.form-section h5 {
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #e7f1ff;
  color: var(--strada-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-section h5 i { color: var(--strada-primary); margin-right: .5rem; }

/* Tables */
.table-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #e9ecef;
}
