:root {
  --sf-bg: #f4f6fb;
  --sf-panel: #ffffff;
  --sf-primary: #0d6e6e;
  --sf-primary-strong: #1f6feb;
  --sf-accent: #f1c84b;
  --sf-sidebar: #11243d;
  --sf-sidebar-muted: #9bb4d3;
  --sf-sidebar-hover: rgba(255, 255, 255, 0.14);
  --sf-sidebar-active: rgba(31, 111, 235, 0.18);
  --sf-text: #1e2a39;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--sf-text);
  font-family: "Segoe UI", "Inter", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at top right, #d9f0f0 0%, #f4f6fb 35%, #f4f6fb 100%);
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 56px);
}

.app-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0f1f35 0%, var(--sf-sidebar) 100%);
  color: #fff;
  padding: 1rem 0.8rem;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.24s ease;
}

.brand-wrap {
  margin-bottom: 1rem;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.brand-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.08rem;
  font-weight: 700;
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

.brand-name {
  white-space: nowrap;
}

.sidebar-collapse-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.35);
}

.sidebar-nav {
  padding: 0.25rem 0.25rem 1rem;
  gap: 0.24rem;
}

.sidebar-section-title {
  margin: 1rem 0.6rem 0.45rem;
  color: #adc2dd;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-group {
  margin-top: 0.75rem;
}

.sidebar-section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #adc2dd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 8px;
}

.sidebar-section-toggle:hover {
  color: #c6d6eb;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-section-toggle i {
  font-size: 0.72rem;
  transition: transform 0.16s ease;
}

.sidebar-group.is-collapsed .sidebar-section-toggle i {
  transform: rotate(-90deg);
}

.sidebar-section-links {
  display: grid;
  gap: 0.24rem;
}

.sidebar-group.is-collapsed .sidebar-section-links {
  display: none;
}

.sidebar-nav .nav-link {
  color: var(--sf-sidebar-muted);
  border-radius: 10px;
  margin-bottom: 0.12rem;
  padding: 0.7rem 0.75rem;
  min-height: 42px;
  position: relative;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i {
  width: 1.15rem;
  text-align: center;
  font-size: 1rem;
}

.sidebar-nav .nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.sidebar-nav .nav-link:hover {
  color: #f2f7ff;
  background: var(--sf-sidebar-hover);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background: var(--sf-sidebar-active);
}

.sidebar-nav .nav-link.active::before {
  background: var(--sf-primary-strong);
}

.app-shell.sidebar-collapsed .app-sidebar {
  width: 84px;
}

.app-shell.sidebar-collapsed .brand-wrap {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-name,
.app-shell.sidebar-collapsed .sidebar-section-title,
.app-shell.sidebar-collapsed .sidebar-section-toggle,
.app-shell.sidebar-collapsed .sidebar-nav .nav-label,
.app-shell.sidebar-collapsed .sidebar-collapse-btn {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-link {
  justify-content: center;
  padding: 0.7rem 0.45rem;
}

.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #dbe2ea;
  backdrop-filter: blur(6px);
}

.page-title {
  font-size: 1.28rem;
  font-weight: 700;
}

.content-wrap {
  padding: 1.6rem;
}

.sf-card {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(13, 30, 53, 0.1);
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-kpi-row {
  margin-bottom: 0;
}

.dashboard-kpi-card .card-body {
  padding: 1rem 1.1rem;
}

.dashboard-kpi-label {
  color: #5f6f83;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-kpi-value {
  margin-bottom: 0;
  margin-top: 0.35rem;
  color: #1a2a3d;
  font-size: 1.42rem;
  font-weight: 700;
}

.dashboard-kpi-card.featured {
  background: linear-gradient(160deg, #ffffff 0%, #eff8ff 100%);
  border: 1px solid #dbe8ff;
}

.dashboard-kpi-card.featured .dashboard-kpi-value {
  font-size: 2.2rem;
  line-height: 1;
}

.dashboard-kpi-note {
  margin: 0.4rem 0 0;
  color: #4f6580;
  font-size: 0.85rem;
  font-weight: 600;
}

.dashboard-section-card {
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-section-header {
  padding: 0.9rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid #e8edf4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-action-link {
  color: var(--sf-primary-strong);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-action-link:hover {
  text-decoration: underline;
}

.dashboard-jobs-table,
.dashboard-payments-table {
  margin-bottom: 0;
}

.dashboard-jobs-table tbody tr,
.dashboard-payments-table tbody tr {
  transition: background-color 0.16s ease;
}

.dashboard-jobs-table tbody tr:hover,
.dashboard-payments-table tbody tr:hover {
  background: #f4f8fe;
}

.dashboard-jobs-table td,
.dashboard-payments-table td {
  vertical-align: middle;
}

.job-title-link {
  color: #1f4f84;
  font-weight: 700;
  text-decoration: none;
}

.job-title-link:hover {
  text-decoration: underline;
}

.job-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.job-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.status-pending {
  color: #8f5e12;
  background: #fff3d8;
}

.status-ready {
  color: #15653d;
  background: #dcf9ea;
}

.status-completed {
  color: #1759ad;
  background: #e4f0ff;
}

.status-default {
  color: #495e77;
  background: #edf2f8;
}

.job-date {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.job-date .date {
  font-weight: 600;
}

.job-date .time {
  font-size: 0.79rem;
  color: #6f8196;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  gap: 1.5rem;
  align-items: stretch;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 2rem;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(241, 200, 75, 0.3), transparent 28%),
    linear-gradient(145deg, #0d2d4f 0%, #11243d 55%, #0d6e6e 100%);
  box-shadow: 0 18px 40px rgba(17, 36, 61, 0.18);
}

.login-showcase::after {
  content: "";
  position: absolute;
  inset: auto -60px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.login-showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-showcase__content {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin-top: 1.75rem;
}

.login-eyebrow {
  margin-bottom: 0.6rem;
  color: var(--sf-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-showcase__content h2,
.login-panel__header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  margin-bottom: 0.9rem;
}

.login-panel__header h2 {
  font-size: 2.1rem;
}

.login-showcase__lead,
.login-panel__header p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.login-metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.login-metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.login-metric-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.login-metric-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.login-metric-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.login-panel {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
}

.login-panel__header {
  margin-bottom: 1.5rem;
}

.login-form__input {
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid #cfdae5;
  box-shadow: none;
}

.login-form__input:focus {
  border-color: var(--sf-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 110, 0.16);
}

.login-form__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.login-inline-link,
.login-links a {
  color: var(--sf-primary);
  font-weight: 600;
  text-decoration: none;
}

.login-inline-link:hover,
.login-links a:hover {
  text-decoration: underline;
}

.login-submit-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sf-primary) 0%, #0f5d87 100%);
  box-shadow: 0 14px 26px rgba(13, 110, 110, 0.18);
}

.login-submit-btn:hover,
.login-submit-btn:focus {
  background: linear-gradient(135deg, #0b5f5f 0%, #114b78 100%);
}

.login-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.login-external {
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid #dbe2ea;
}

.login-external__title {
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.login-external__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.login-support-note {
  margin-top: 1.6rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f5f7fb;
  color: #516273;
}

.sf-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.sf-primary-bg {
  background: var(--sf-primary);
}

.sf-warning-bg {
  background: #e99a21;
}

.sf-danger-bg {
  background: #c6524b;
}

.sf-info-bg {
  background: #226fce;
}

.sf-success-bg {
  background: #0f8a58;
}

.table thead th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.app-footer {
  background: transparent;
  padding: 0.7rem 1.4rem 1.2rem;
}

.print-only {
  display: none;
}

@media (max-width: 768px) {
  .app-shell.sidebar-collapsed .app-sidebar {
    width: 260px;
  }

  .app-shell.sidebar-collapsed .brand-name,
  .app-shell.sidebar-collapsed .sidebar-section-title,
  .app-shell.sidebar-collapsed .sidebar-section-toggle,
  .app-shell.sidebar-collapsed .sidebar-nav .nav-label {
    display: initial !important;
  }

  .app-shell.sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: flex-start;
    padding: 0.7rem 0.75rem;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-showcase,
  .login-panel {
    padding: 1.4rem;
  }

  .login-form__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-sidebar {
    position: fixed;
    z-index: 1040;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .content-wrap {
    padding: 1rem;
  }

  .dashboard-shell {
    gap: 1rem;
  }

  .dashboard-kpi-row {
    --bs-gutter-y: 0.8rem;
  }

  .dashboard-section-header {
    flex-wrap: wrap;
    gap: 0.45rem;
  }
}

@media print {
  .app-sidebar,
  .topbar,
  .app-footer,
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .content-wrap {
    padding: 0;
  }

  .sf-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}