/* ---------------------------------------------------------------------------
   dream-team.uz — boshqaruv paneli
   Recreated from "Admin.dc.html". Colours, sizes and spacing come from that file.
   --------------------------------------------------------------------------- */

:root {
  --ink: #0a1220;
  --accent: #1b6fe0;
  --accent-dark: #0a4fae;
  --text-muted: #4a5566;
  --text-soft: #7a8494;
  --line: #e2e6ec;
  --surface: #f5f7fa;
  --field-line: #c7ceda;
  --selection: #cfe1fb;
  --danger: #a32d2d;

  --badge-new-line: #9fc2f0;
  --badge-new-text: #0a4fae;
  --badge-seen-line: #bfe3cb;
  --badge-seen-text: #1e5a32;
  --badge-answered-line: #e7d4ae;
  --badge-answered-text: #7a5306;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

::selection {
  background: var(--selection);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ shell */

.admin-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.sidebar {
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--ink);
  padding: 22px 18px;
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--ink);
  display: block;
}

.sidebar-brand span {
  color: var(--accent);
}

.sidebar-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  margin-bottom: 4px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
  transition: background 0.15s;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text-muted);
}

.nav-item.active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.nav-item.active:hover {
  background: var(--ink);
  color: #fff;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-main {
  flex: 1;
  padding: 28px 32px 40px;
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 26px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.page-user .initials {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: -0.02em;
}

.page-user .name {
  color: var(--text-muted);
}

/* ------------------------------------------------------------- dashboard */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 28px;
}

.stat-grid > * {
  background: #fff;
  padding: 22px;
}

.stat-grid > *:first-child {
  padding-left: 0;
}

.stat-grid > *:last-child {
  padding-right: 0;
}

.stat-grid b {
  display: block;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat-grid > *:last-child b {
  color: var(--accent);
}

.stat-grid span {
  font-size: 12px;
  color: var(--text-soft);
}

.stat-grid small {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 8px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- blocks */

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.block-head h2,
.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.block-head-ruled {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 22px;
}

.hint {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 16px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn-lg {
  font-size: 14px;
  padding: 13px 26px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link-danger {
  color: var(--danger);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid var(--field-line);
  background: transparent;
  color: var(--text-muted);
}

.tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ---------------------------------------------------------------- tables */

.table-scroll {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

table.data th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  font-weight: 600;
  text-align: left;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

table.data th:first-child {
  padding-left: 0;
}

table.data th:last-child {
  padding-right: 0;
}

table.data td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text-muted);
}

table.data td:first-child {
  padding-left: 0;
  color: var(--ink);
}

table.data td:last-child {
  padding-right: 0;
}

table.data tbody tr {
  transition: background 0.12s;
}

table.data tbody tr:hover {
  background: var(--surface);
}

table.data .primary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  display: block;
  color: var(--ink);
}

table.data .secondary {
  color: var(--text-soft);
  font-size: 12px;
}

table.data .project-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.025em;
  color: var(--ink);
}

table.data .domain {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-cell .avatar {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--line);
}

.member-cell .avatar-photo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.member-cell .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.025em;
  display: block;
  color: var(--ink);
}

.actions {
  white-space: nowrap;
  display: flex;
  gap: 16px;
}

/* --------------------------------------------------------------- badges */

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--text-muted);
  white-space: nowrap;
}

.badge-new {
  border-color: var(--badge-new-line);
  color: var(--badge-new-text);
}

.badge-seen,
.badge-active {
  border-color: var(--badge-seen-line);
  color: var(--badge-seen-text);
}

.badge-answered {
  border-color: var(--badge-answered-line);
  color: var(--badge-answered-text);
}

/* ---------------------------------------------------------------- forms */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
  margin-bottom: 24px;
}

.form-grid.narrow {
  max-width: 900px;
  margin-bottom: 26px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  font-size: 15px;
  padding: 11px 0;
  border: none;
  border-bottom: 1px solid var(--field-line);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
}

.input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.input-sm {
  font-size: 13px;
  padding: 9px 0;
}

.input-order {
  width: 52px;
  font-size: 13px;
  padding: 5px 0;
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--field-line);
  background: transparent;
}

.input-order:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.search {
  width: 200px;
}

textarea.input {
  resize: vertical;
}

.dropzone {
  border: 1px dashed var(--field-line);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  background: var(--surface);
}

.dropzone b {
  color: var(--accent);
  font-weight: 600;
}

.dropzone input[type="file"] {
  display: block;
  margin: 12px auto 0;
  font-size: 12px;
}

.photo-preview {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  object-fit: cover;
  margin: 0 auto 12px;
}

/* --------------------------------------------------------------- toggle */

.toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
  background: var(--field-line);
}

.toggle.on {
  background: var(--accent);
}

.toggle .knob {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.15s;
}

.toggle.on .knob {
  left: 21px;
}

/* -------------------------------------------------------------- notices */

.notice {
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.notice-ok {
  background: #eaf6ee;
  border: 1px solid var(--badge-seen-line);
  color: var(--badge-seen-text);
}

.notice-error {
  background: #fdecec;
  border: 1px solid #f0c2c2;
  color: var(--danger);
}

.empty {
  color: var(--text-soft);
  font-size: 13px;
  padding: 24px 0;
}

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

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card .sidebar-brand {
  font-size: 22px;
  margin-bottom: 6px;
}

.login-card .sidebar-kicker {
  border-bottom: 1px solid var(--ink);
  margin-bottom: 28px;
}

.login-card .form-field {
  margin-bottom: 22px;
}

.login-card .btn-primary {
  width: 100%;
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--ink);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
  }

  .sidebar-brand {
    margin: 0 12px 0 0;
  }

  .sidebar-kicker,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
  }

  .admin-main {
    padding: 22px 20px 40px;
  }

  .page-head h1 {
    font-size: 30px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-grid > *:nth-child(odd) {
    padding-left: 0;
  }

  .stat-grid > *:nth-child(even) {
    padding-right: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
