:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #111827;
  --primary-soft: #f3f4f6;
  --danger: #dc2626;
  --success: #16a34a;
  --blue: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-brand {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.25), transparent 30%),
    linear-gradient(135deg, #111827 0%, #1f2937 55%, #374151 100%);
  color: white;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: white;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-brand h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.95;
  margin: 32px 0 18px;
  letter-spacing: -0.06em;
}

.login-brand p {
  max-width: 560px;
  color: rgba(255,255,255,0.74);
  font-size: 17px;
  line-height: 1.65;
}

.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.brand-pills span {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.card {
  width: 100%;
  max-width: 430px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15,23,42,0.08);
  padding: 32px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.card .sub {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: white;
}

input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17,24,39,0.08);
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  height: 46px;
  padding: 0 16px;
  font-weight: 800;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert {
  display: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.alert.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert.success {
  display: block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #111827;
  color: white;
  padding: 24px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sidebar .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.sidebar-title {
  font-weight: 900;
  letter-spacing: -0.04em;
}

.sidebar-subtitle {
  color: rgba(255,255,255,0.56);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  color: rgba(255,255,255,0.72);
  background: transparent;
  cursor: pointer;
}

.nav button.active,
.nav button:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.main {
  padding: 28px;
}

.topbar {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #111827;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-value {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-top: 8px;
}

.section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin-top: 16px;
}

.section h2 {
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

.section p {
  color: var(--muted);
  line-height: 1.6;
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 360px;
    padding: 32px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .main,
  .login-panel {
    padding: 18px;
  }

  .card {
    padding: 24px;
  }
}

/* Brand logo update: THE / ICONIC */
.brand-logo {
  width: auto;
  min-width: 96px;
  height: auto;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-align: left;
}

.brand-logo span {
  display: block;
}

.sidebar .brand-logo {
  width: auto;
  min-width: 82px;
  height: auto;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.login-brand .brand-logo {
  min-width: 110px;
  min-height: 58px;
  font-size: 16px;
}

/* THE ICONIC square logo refinement */
.brand-logo {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 0 10px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #061126 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 0.9 !important;
  letter-spacing: -0.06em !important;
  box-shadow: none !important;
}

.brand-logo span {
  display: block !important;
}

.sidebar .brand-logo {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 0 10px !important;
  border-radius: 16px !important;
  font-size: 13px !important;
}

.login-brand .brand-logo {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 0 12px !important;
  border-radius: 20px !important;
  font-size: 15px !important;
}

/* Admin Users / Vendors pages */
.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0 0 6px;
}

.section-header p {
  margin: 0;
}

.module-section {
  overflow: hidden;
}

.admin-form {
  margin: 18px 0 22px;
  padding: 18px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.admin-form h3 {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: white;
  font: inherit;
}

select {
  height: 46px;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

select:focus,
textarea:focus {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17,24,39,0.08);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.form-actions .btn-primary {
  width: auto;
  min-width: 140px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

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

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.data-table th {
  background: #f9fafb;
  color: #374151;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center !important;
  padding: 28px !important;
}

.badge-muted {
  background: #f3f4f6;
  color: #4b5563;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-header {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .btn-primary {
    width: 100%;
  }
}


/* LOGIN_UI_V2_POLISH_START */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  height: 30px;
  min-width: 54px;
  border: 0;
  border-radius: 10px;
  background: #eef4fb;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover {
  background: #dbeafe;
}

.login-help {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.alert:empty {
  display: none;
}

.btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
/* LOGIN_UI_V2_POLISH_END */
