/* ============================================================
   Freelancer CRM — Design System v2
   Style: LimeDock Dark + Lime Accent
   Responsive: mobile-first, breakpoints at 768px / 1024px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  --bg: #080D13;
  --surface: #0E1621;
  --surface-2: #141F2E;
  --surface-3: #1A2740;
  --accent: #C6FF3B;
  --accent-hover: #B0F020;
  --accent-dim: rgba(198, 255, 59, 0.12);
  --text: #FFFFFF;
  --text-muted: #6E7D8F;
  --text-subtle: #3D4F62;
  --border: #1E2D3D;
  --border-focus: rgba(198, 255, 59, 0.5);
  --danger: #FF4D6A;
  --danger-dim: rgba(255, 77, 106, 0.12);
  --success: #3BFF9A;
  --success-dim: rgba(59, 255, 154, 0.12);
  --warning: #FFB224;
  --warning-dim: rgba(255, 178, 36, 0.12);
  --info: #38BDF8;
  --info-dim: rgba(56, 189, 248, 0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 32px rgba(198, 255, 59, 0.2);
  --sidebar-w: 232px;
  --header-h: 56px;
  --transition: 0.2s ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
}

/* ============================================================
   Layout
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__logo-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar__logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.sidebar__collapse {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar__collapse:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar__section {
  padding: 20px 12px 4px;
}

.sidebar__section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px;
  position: relative;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item.active .nav-dot {
  opacity: 1;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 16px;
}

.sidebar__footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* ---- Sidebar: collapsed state ---- */
:root {
  --sidebar-collapsed-w: 56px;
}

/* Transition for width */
.sidebar {
  transition: width 0.22s ease, transform var(--transition);
}

.main {
  transition: margin-left 0.22s ease;
}

.sidebar.is-collapsed {
  width: var(--sidebar-collapsed-w);
  overflow: visible;
  /* allow tooltips */
}

.main.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed-w);
}

/* Hide text/label when collapsed */
.sidebar.is-collapsed .sidebar__logo-text,
.sidebar.is-collapsed .sidebar__section-label,
.sidebar.is-collapsed .nav-item>span:not(.nav-icon),
.sidebar.is-collapsed .nav-badge {
  display: none;
}

/* Collapse button: icon rotates 180deg when sidebar collapsed */
.sidebar__collapse svg {
  transition: transform 0.22s ease;
}

.sidebar.is-collapsed .sidebar__collapse svg {
  transform: rotate(180deg);
}

/* Center logo icon when collapsed */
.sidebar.is-collapsed .sidebar__top {
  justify-content: center;
  padding: 16px 0;
}

/* Keep collapse button visible when collapsed, center it */
.sidebar.is-collapsed .sidebar__collapse {
  margin: 0 auto;
}

.sidebar.is-collapsed .sidebar__section {
  padding: 16px 8px 4px;
}

.sidebar.is-collapsed .sidebar__footer {
  padding: 8px;
}

.sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  position: relative;
}

/* Tooltip on hover when collapsed */
.sidebar.is-collapsed .nav-item::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 999;
  transition: opacity var(--transition);
  box-shadow: var(--shadow);
}

.sidebar.is-collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Pulse button on header to expand sidebar (desktop only) */
.header__sidebar-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.header__sidebar-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Show header toggle when sidebar collapsed */
.main.sidebar-collapsed .header__sidebar-toggle {
  display: flex;
}

/* ---- Account dropdown ---- */
.account-dropdown {
  position: relative;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}

.account-btn:focus {
  outline: none;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  z-index: 400;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: all var(--transition);
}

.account-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

.account-menu__header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.account-menu__name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.account-menu__email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-menu__body {
  padding: 6px;
}

/* ---- Main ---- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ---- Header ---- */
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.header__search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header__search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 12px 7px 36px;
  outline: none;
  transition: border-color var(--transition);
}

.header__search-input::placeholder {
  color: var(--text-subtle);
}

.header__search-input:focus {
  border-color: var(--border-focus);
}

.header__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  display: flex;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-subtle);
}

.icon-btn__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}

/* ---- Content ---- */
.content {
  padding: 28px 32px;
  flex: 1;
}

/* ============================================================
   Components
   ============================================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--text-subtle);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 106, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: var(--radius);
  width: 100%;
}

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
}

/* --- Forms --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid .form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

.form-label .req {
  color: var(--accent);
  margin-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  display: flex;
  pointer-events: none;
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-control.has-icon {
  padding-left: 38px;
}

.form-control::placeholder {
  color: var(--text-subtle);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(198, 255, 59, 0.07);
}

textarea.form-control {
  resize: vertical;
  min-height: 96px;
  padding-top: 10px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-subtle);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card>*:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card>*:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* --- Table --- */
.table-check-col {
  width: 44px;
}

.table-action-col {
  width: 48px;
}

.table-wrapper {
  /* overflow-x: auto; */
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead tr {
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-2);
}

tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

.td-muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* --- User cell (avatar + name + sub) --- */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  color: var(--bg);
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.user-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Avatar palette — on nth-child so each gets a different color */
.user-avatar:nth-child(3n+1) {
  background: var(--accent);
}

.user-avatar:nth-child(3n+2) {
  background: #FF6B9D;
}

.user-avatar:nth-child(3n) {
  background: var(--info);
}

/* Force colours via data-color attr alternatively; use CSS classes on server */
.av-lime {
  background: var(--accent);
}

.av-pink {
  background: #FF6B9D;
}

.av-blue {
  background: var(--info);
}

.av-purple {
  background: #A78BFA;
}

.av-orange {
  background: var(--warning);
}

.av-green {
  background: var(--success);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-accent::before {
  background: var(--accent);
}

.badge-success {
  background: var(--success-dim);
  color: var(--success);
}

.badge-success::before {
  background: var(--success);
}

.badge-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.badge-danger::before {
  background: var(--danger);
}

.badge-warning {
  background: var(--warning-dim);
  color: var(--warning);
}

.badge-warning::before {
  background: var(--warning);
}

.badge-info {
  background: var(--info-dim);
  color: var(--info);
}

.badge-info::before {
  background: var(--info);
}

.badge-muted {
  background: var(--surface-3);
  color: var(--text-muted);
}

.badge-muted::before {
  background: var(--text-subtle);
}

/* --- Dropdown menu --- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 160px;
  z-index: 300;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: all var(--transition);
}

.dropdown-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
}

.dropdown-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: var(--danger-dim);
}

.dropdown-item svg {
  flex-shrink: 0;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* --- Page header --- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* --- Toolbar (search + filters) --- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.toolbar .input-wrap {
  flex: 1;
  max-width: 320px;
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state__text {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Detail view --- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.detail-field__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.detail-field__value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.detail-field__value.empty {
  color: var(--text-subtle);
  font-style: italic;
}

/* --- Alerts --- */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: var(--success-dim);
  border: 1px solid rgba(59, 255, 154, 0.25);
  color: var(--success);
}

.alert-danger {
  background: var(--danger-dim);
  border: 1px solid rgba(255, 77, 106, 0.25);
  color: var(--danger);
}

.alert-warning {
  background: var(--warning-dim);
  border: 1px solid rgba(255, 178, 36, 0.25);
  color: var(--warning);
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 19, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  transform: translateY(12px) scale(0.97);
  transition: transform var(--transition);
  box-shadow: var(--shadow);
}

.modal-overlay.is-open .modal {
  transform: none;
}

.modal__icon {
  width: 44px;
  height: 44px;
  background: var(--danger-dim);
  border: 1px solid rgba(255, 77, 106, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--danger);
}

.modal__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal__text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal__text strong {
  color: var(--text);
}

.modal__actions {
  display: flex;
  gap: 10px;
}

.modal__actions .btn {
  flex: 1;
  justify-content: center;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-logo__icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 16px;
}

.login-logo__text {
  font-size: 18px;
  font-weight: 700;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

/* ============================================================
   Sidebar overlay (mobile)
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 19, 0.6);
  backdrop-filter: blur(2px);
  z-index: 150;
}

.sidebar-overlay.is-open {
  display: block;
}

/* ============================================================
   Utilities
   ============================================================ */
.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.mt-auto {
  margin-top: auto;
}

.ml-auto {
  margin-left: auto;
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.text-danger {
  color: var(--danger);
}

.fw-600 {
  font-weight: 600;
}

.fs-13 {
  font-size: 13px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .content {
    padding: 24px 20px;
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {

  /* Sidebar — slide in from left */
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  /* Main takes full width */
  .main {
    margin-left: 0;
  }

  /* Header */
  .header {
    padding: 0 16px;
  }

  .header__burger {
    display: flex;
  }

  .header__search {
    max-width: none;
    flex: 1;
  }

  /* Content */
  .content {
    padding: 20px 16px;
  }

  /* Page header stack */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header>.d-flex,
  .page-header>.btn,
  .page-header>a {
    width: 100%;
    justify-content: center;
  }

  /* Form grid → single column */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .form-full {
    grid-column: 1;
  }

  /* Table → card list */
  .table-wrapper table {
    display: none;
  }

  .mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .mobile-card {
    background: var(--surface);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background var(--transition);
  }

  .mobile-card:hover {
    background: var(--surface-2);
  }

  .mobile-card__info {
    flex: 1;
    min-width: 0;
  }

  .mobile-card__name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Toolbar */
  .toolbar {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .toolbar .input-wrap {
    max-width: none;
    width: 100%;
    flex: none;
  }

  /* Detail grid */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Form actions */
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Card body */
  .card-body {
    padding: 16px;
  }

  .card-header {
    padding: 14px 16px;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .login-title {
    font-size: 20px;
  }

  .page-title {
    font-size: 18px;
  }
}