* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6fb;
  color: #1f2937;

  /* Space for floating horizontal scrollbar */
  padding-bottom: 32px;
}


/* =========================
   TOP HEADER
========================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 18px 28px;

  background: #ffffff;

  border-bottom: 1px solid #dbe2ea;

  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.04);
}


.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}


.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}


.company-info h1,
.topbar h1 {
  font-size: 24px;
  font-weight: 700;
  color: #3737d8;
  margin-bottom: 4px;
}


.company-info p,
.topbar p {
  font-size: 14px;
  color: #64748b;
}


/* =========================
   LIVE STATUS
========================= */

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 13px;

  border-radius: 20px;

  background: #ecfdf3;
  color: #15803d;

  font-weight: 700;
  font-size: 13px;
}


.live-dot {
  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: #22c55e;

  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.15);
}


/* =========================
   MAIN CONTAINER
========================= */

.container {
  width: 100%;
  padding: 24px 28px;
}


/* =========================
   DASHBOARD
========================= */

.dashboard {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(160px, 1fr));

  gap: 16px;

  margin-bottom: 22px;
}


.card {
  background: #ffffff;

  border-radius: 12px;

  padding: 18px;

  border: 1px solid #e2e8f0;

  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.05);
}


.card h3 {
  font-size: 13px;
  color: #64748b;

  margin-bottom: 12px;

  font-weight: 600;
}


.card-number {
  font-size: 30px;
  font-weight: 700;

  color: #3737d8;
}


/* =========================
   SEARCH + FILTER
========================= */

.controls {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 16px;
}


.controls input,
.controls select {
  height: 42px;

  border: 1px solid #cbd5e1;

  border-radius: 8px;

  background: #ffffff;

  padding: 0 12px;

  font-size: 14px;

  outline: none;
}


.controls input {
  width: min(480px, 100%);
}


.controls input:focus,
.controls select:focus {
  border-color: #3737d8;

  box-shadow:
    0 0 0 3px rgba(55, 55, 216, 0.1);
}


/* =========================
   TABLE SECTION
========================= */

.table-section {
  width: 100%;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 12px;

  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.05);

  position: relative;
}


/* =====================================================
   FLOATING HORIZONTAL SCROLLBAR
   ONLY VISIBLE HORIZONTAL SCROLLBAR
===================================================== */

.top-scroll {
  display: block;

  position: fixed;

  left: 28px;
  right: 28px;
  bottom: 0;

  width: auto;

  height: 24px;

  overflow-x: scroll;
  overflow-y: hidden;

  background: #ffffff;

  border-top: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;

  border-radius: 8px 8px 0 0;

  box-shadow:
    0 -4px 14px rgba(15, 23, 42, 0.16);

  z-index: 99999;

  white-space: nowrap;

  scrollbar-width: auto;
  scrollbar-color: #64748b #e5e7eb;
}


.top-scroll-inner {
  display: block;

  height: 1px;

  width: 100%;
  min-width: 100%;

  pointer-events: none;
}


/* Chrome / Edge / Safari */

.top-scroll::-webkit-scrollbar {
  display: block;
  height: 16px;
}


.top-scroll::-webkit-scrollbar-track {
  background: #e5e7eb;
}


.top-scroll::-webkit-scrollbar-thumb {
  background: #64748b;

  border-radius: 10px;

  border: 3px solid #e5e7eb;

  min-width: 40px;
}


.top-scroll::-webkit-scrollbar-thumb:hover {
  background: #475569;
}


/* =====================================================
   MAIN TABLE SCROLL CONTAINER
   NATIVE SCROLLBAR HIDDEN
===================================================== */

.table-container {
  width: 100%;

  overflow-x: auto;
  overflow-y: visible;

  background: #ffffff;

  border-radius: 12px;

  position: relative;

  scrollbar-width: none;

  -ms-overflow-style: none;
}


.table-container::-webkit-scrollbar {
  display: none;

  width: 0;
  height: 0;
}


/* =========================
   TABLE
========================= */

table {
  width: max-content;

  min-width: 100%;

  border-collapse: separate;
  border-spacing: 0;
}


/* =========================
   NORMAL TABLE HEADER
========================= */

thead {
  background: #3737d8;
  color: #ffffff;
}


th {
  text-align: left;

  padding: 13px 12px;

  font-size: 13px;

  font-weight: 600;

  white-space: nowrap;

  background: #3737d8;
  color: #ffffff;

  border-right:
    1px solid rgba(255, 255, 255, 0.10);
}


/* =====================================================
   FLOATING / FROZEN BLUE HEADER

   JavaScript will show this header only after
   the original header scrolls above the screen.
===================================================== */

.floating-table-header {
  position: fixed;

  top: 0;
  left: 28px;
  right: 28px;

  z-index: 9000;

  display: none;

  overflow: hidden;

  background: #3737d8;

  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.20);

  border-radius: 0 0 8px 8px;
}


/* JS adds this class when header must freeze */

.floating-table-header.is-visible {
  display: block;
}


/* Internal horizontal moving area */

.floating-header-inner {
  position: relative;

  width: max-content;

  min-width: 100%;

  will-change: transform;
}


/* Floating header table */

.floating-header-table {
  width: max-content;

  min-width: 100%;

  border-collapse: separate;
  border-spacing: 0;

  table-layout: fixed;
}


.floating-header-table th {
  background: #3737d8;
  color: #ffffff;

  padding: 13px 12px;

  font-size: 13px;

  font-weight: 600;

  white-space: nowrap;

  border-right:
    1px solid rgba(255, 255, 255, 0.10);

  position: relative;

  z-index: 10;
}


/* =====================================================
   FLOATING HEADER
   FREEZE FIRST 4 COLUMNS
===================================================== */

.floating-header-table th:nth-child(1) {
  position: sticky;
  left: 0;

  z-index: 50;

  background: #3737d8;
}


.floating-header-table th:nth-child(2) {
  position: sticky;
  left: 90px;

  z-index: 50;

  background: #3737d8;
}


.floating-header-table th:nth-child(3) {
  position: sticky;
  left: 225px;

  z-index: 50;

  background: #3737d8;
}


.floating-header-table th:nth-child(4) {
  position: sticky;
  left: 365px;

  z-index: 50;

  background: #3737d8;

  box-shadow:
    5px 0 8px rgba(15, 23, 42, 0.18);
}


/* =========================
   TABLE DATA
========================= */

td {
  padding: 12px;

  border-bottom: 1px solid #edf2f7;
  border-right: 1px solid #f1f5f9;

  font-size: 13px;

  vertical-align: middle;

  background: #ffffff;

  white-space: normal;

  overflow-wrap: anywhere;

  word-break: normal;

  line-height: 1.35;
}


tbody tr:hover td {
  background: #f8f9ff;
}


/* =========================
   COLUMN WIDTHS
========================= */


/* A - Rev */

th:nth-child(1),
td:nth-child(1) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}


/* B - Latest Rev Date */

th:nth-child(2),
td:nth-child(2) {
  width: 135px;
  min-width: 135px;
  max-width: 135px;
}


/* C - Date-No. */

th:nth-child(3),
td:nth-child(3) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}


/* D - Job Order No. */

th:nth-child(4),
td:nth-child(4) {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}


/* E - Reference PO */

th:nth-child(5),
td:nth-child(5) {
  min-width: 175px;
  max-width: 210px;
}


/* F - Customer */

th:nth-child(6),
td:nth-child(6) {
  min-width: 220px;
  max-width: 280px;
}


/* G - Project / Product */

th:nth-child(7),
td:nth-child(7) {
  width: 380px;
  min-width: 320px;
  max-width: 420px;
}


/* H - Qty */

th:nth-child(8),
td:nth-child(8) {
  min-width: 80px;
  text-align: center;
}


/* I - Qty Finished */

th:nth-child(9),
td:nth-child(9) {
  min-width: 110px;
  text-align: center;
}


/* J - Due Date */

th:nth-child(10),
td:nth-child(10) {
  min-width: 135px;
}


/* K - Priority */

th:nth-child(11),
td:nth-child(11) {
  min-width: 100px;
}


/* L - Current Status */

th:nth-child(12),
td:nth-child(12) {
  min-width: 180px;
  max-width: 220px;
}


/* M - Assigned Fabricator */

th:nth-child(13),
td:nth-child(13) {
  min-width: 220px;
  max-width: 280px;
}


/* N - Assigned Busbaring */

th:nth-child(14),
td:nth-child(14) {
  min-width: 220px;
  max-width: 280px;
}


/* O - Progress */

th:nth-child(15),
td:nth-child(15) {
  min-width: 150px;
}


/* P - Schedule Status */

th:nth-child(16),
td:nth-child(16) {
  min-width: 190px;
}


/* Q - Delay Reason */

th:nth-child(17),
td:nth-child(17) {
  min-width: 220px;
  max-width: 280px;
}


/* R - Remarks */

th:nth-child(18),
td:nth-child(18) {
  min-width: 260px;
  max-width: 340px;
}


/* S - Last Update */

th:nth-child(19),
td:nth-child(19) {
  min-width: 140px;
}


/* =====================================================
   FREEZE COLUMNS A TO D
===================================================== */

th:nth-child(1),
td:nth-child(1) {
  position: sticky;
  left: 0;
}


th:nth-child(2),
td:nth-child(2) {
  position: sticky;
  left: 90px;
}


th:nth-child(3),
td:nth-child(3) {
  position: sticky;
  left: 225px;
}


th:nth-child(4),
td:nth-child(4) {
  position: sticky;
  left: 365px;
}


/* Frozen body cells */

tbody td:nth-child(1),
tbody td:nth-child(2),
tbody td:nth-child(3),
tbody td:nth-child(4) {
  background: #ffffff;

  z-index: 20;
}


/* Hover */

tbody tr:hover td:nth-child(1),
tbody tr:hover td:nth-child(2),
tbody tr:hover td:nth-child(3),
tbody tr:hover td:nth-child(4) {
  background: #f8f9ff;
}


/* Frozen original header */

thead th:nth-child(1),
thead th:nth-child(2),
thead th:nth-child(3),
thead th:nth-child(4) {
  background: #3737d8;
  color: #ffffff;

  z-index: 40;
}


/* Divider after Job Order */

th:nth-child(4),
td:nth-child(4) {
  box-shadow:
    5px 0 8px rgba(15, 23, 42, 0.15);
}


/* =========================
   LOADING MESSAGE
========================= */

.loading {
  text-align: center;

  padding: 30px;

  color: #64748b;
}


td.loading {
  position: static !important;

  width: auto !important;

  min-width: 0 !important;

  max-width: none !important;
}


/* =========================
   STATUS BADGES
========================= */

.status-badge {
  display: inline-block;

  padding: 5px 9px;

  border-radius: 20px;

  font-size: 12px;

  font-weight: 700;

  white-space: nowrap;
}


.status-completed {
  background: #dcfce7;
  color: #166534;
}


.status-delayed {
  background: #fee2e2;
  color: #991b1b;
}


.status-due-soon {
  background: #fef3c7;
  color: #92400e;
}


.status-on-going {
  background: #dbeafe;
  color: #1d4ed8;
}


.status-not-started {
  background: #e5e7eb;
  color: #374151;
}


.status-delivery {
  background: #f3e8ff;
  color: #7e22ce;
}


.status-lacking {
  background: #ffedd5;
  color: #c2410c;
}


/* =========================
   PROGRESS BAR
========================= */

.progress-wrap {
  width: 120px;
}


.progress-bar {
  width: 100%;

  height: 8px;

  background: #e5e7eb;

  border-radius: 20px;

  overflow: hidden;
}


.progress-fill {
  height: 100%;

  background: #3737d8;

  border-radius: 20px;
}


.progress-text {
  margin-top: 4px;

  font-size: 11px;

  color: #64748b;
}


/* =========================
   FOOTER
========================= */

footer {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  margin-top: 18px;

  padding: 14px 2px 32px;

  color: #64748b;

  font-size: 12px;
}


/* =====================================================
   MOBILE JOB ORDER CARDS
   Hidden on desktop/tablet
===================================================== */

.mobile-card-section {
  display: none;
}

.mobile-card-list {
  display: grid;
  gap: 12px;
}

.mobile-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mobile-section-heading h2 {
  font-size: 18px;
  color: #1f2937;
  margin-bottom: 3px;
}

.mobile-section-heading p {
  font-size: 12px;
  color: #64748b;
}

.mobile-job-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.mobile-job-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mobile-job-label,
.mobile-info-label {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 700;
}

.mobile-job-number {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #3737d8;
  overflow-wrap: anywhere;
}

.mobile-job-customer {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.mobile-job-project {
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}

.mobile-primary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.mobile-info-block {
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  padding: 9px 10px;
}

.mobile-info-block strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  overflow-wrap: anywhere;
}

.mobile-progress-row {
  margin-bottom: 10px;
}

.mobile-progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.mobile-progress-heading strong {
  color: #3737d8;
}

.mobile-progress-bar {
  height: 9px;
}

.mobile-details {
  border-top: 1px solid #eef2f7;
  padding-top: 9px;
}

.mobile-details summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  color: #3737d8;
  padding: 4px 0;
}

.mobile-details summary::-webkit-details-marker {
  display: none;
}

.mobile-details summary::after {
  content: "+";
  float: right;
  font-size: 17px;
  line-height: 12px;
}

.mobile-details[open] summary::after {
  content: "−";
}

.mobile-details-grid {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.mobile-detail-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
}

.mobile-detail-row span {
  font-size: 11px;
  color: #64748b;
}

.mobile-detail-row strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #334155;
  text-align: right;
  overflow-wrap: anywhere;
}

.mobile-empty {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1400px) {

  .dashboard {
    grid-template-columns:
      repeat(3, 1fr);
  }

}


@media (max-width: 800px) {

  body {
    padding-bottom: 0;
  }

  .topbar {
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
  }

  .logo-area {
    gap: 10px;
    min-width: 0;
  }

  .logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
  }

  .company-info {
    min-width: 0;
  }

  .company-info h1,
  .topbar h1 {
    font-size: 16px;
    line-height: 1.15;
    margin-bottom: 2px;
  }

  .company-info p,
  .topbar p {
    font-size: 11px;
  }

  .live-status {
    padding: 6px 9px;
    font-size: 10px;
    flex: 0 0 auto;
  }

  .live-dot {
    width: 7px;
    height: 7px;
  }

  .container {
    padding: 12px;
  }

  .dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .card {
    min-width: 0;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .card h3 {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .card-number {
    font-size: 23px;
  }

  /* Search and filter stay accessible while browsing cards */
  .controls {
    position: sticky;
    top: 0;
    z-index: 500;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 0 -12px 12px;
    padding: 9px 12px;
    background: rgba(244, 246, 251, 0.97);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(6px);
  }

  .controls input,
  .controls select {
    width: 100%;
    height: 40px;
    font-size: 13px;
  }

  /* Mobile uses cards instead of the 19-column table */
  .table-section,
  .floating-table-header,
  .top-scroll {
    display: none !important;
  }

  .mobile-card-section {
    display: block;
  }

  footer {
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    padding: 10px 2px 16px;
    font-size: 10px;
  }

}


@media (max-width: 420px) {

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

  .company-info h1,
  .topbar h1 {
    font-size: 14px;
  }

  .company-info p,
  .topbar p {
    font-size: 10px;
  }

  .live-status {
    padding: 5px 7px;
  }

  .mobile-job-card {
    padding: 12px;
  }

  .mobile-job-topline {
    gap: 7px;
  }

  .status-badge {
    font-size: 10px;
    padding: 4px 7px;
  }

  .mobile-primary-grid {
    gap: 6px;
  }

  .mobile-info-block {
    padding: 8px;
  }

}

/* =====================================================
   VERSION 15 - SUPABASE AUTHENTICATION
===================================================== */

[hidden] {
  display: none !important;
}


/* =========================
   AUTH LOADING
========================= */

.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 200000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background:
    radial-gradient(
      circle at top,
      rgba(55, 55, 216, 0.10),
      transparent 38%
    ),
    #f4f6fb;
}


.auth-loading-card {
  width: min(420px, 100%);

  padding: 34px 28px;

  text-align: center;

  background: #ffffff;

  border: 1px solid #e2e8f0;
  border-radius: 18px;

  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.12);
}


.auth-logo {
  width: 78px;
  height: 78px;

  object-fit: contain;

  margin-bottom: 14px;
}


.auth-loading-card h2 {
  color: #3737d8;

  font-size: 20px;
  line-height: 1.25;

  margin-bottom: 8px;
}


.auth-loading-card p {
  color: #64748b;
  font-size: 14px;
}


/* =========================
   LOGIN SCREEN
========================= */

.login-screen {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 32px 20px;

  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(55, 55, 216, 0.13),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 90%,
      rgba(34, 197, 94, 0.08),
      transparent 26%
    ),
    #f4f6fb;
}


.login-card {
  width: min(900px, 100%);

  display: grid;
  grid-template-columns:
    minmax(0, 0.9fr)
    1px
    minmax(0, 1.1fr);

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e2e8f0;
  border-radius: 20px;

  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.14);
}


.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 48px 42px;

  background:
    linear-gradient(
      145deg,
      rgba(55, 55, 216, 0.08),
      rgba(55, 55, 216, 0.02)
    );
}


.login-logo {
  width: 104px;
  height: 104px;

  object-fit: contain;

  margin-bottom: 20px;
}


.login-brand h1 {
  color: #3737d8;

  font-size: 27px;
  line-height: 1.18;

  margin-bottom: 8px;
}


.login-brand p {
  color: #64748b;

  font-size: 14px;
  line-height: 1.5;
}


.login-divider {
  width: 1px;

  background: #e2e8f0;
}


.login-form-area {
  padding: 48px 44px;
}


.login-form-area h2 {
  color: #1f2937;

  font-size: 24px;

  margin-bottom: 8px;
}


.login-description {
  color: #64748b;

  font-size: 14px;
  line-height: 1.5;

  margin-bottom: 26px;
}


.login-field {
  margin-bottom: 18px;
}


.login-field label {
  display: block;

  margin-bottom: 7px;

  color: #334155;

  font-size: 13px;
  font-weight: 700;
}


.login-field input {
  width: 100%;
  height: 46px;

  padding: 0 13px;

  border: 1px solid #cbd5e1;
  border-radius: 9px;

  outline: none;

  background: #ffffff;
  color: #1f2937;

  font-size: 14px;
}


.login-field input:focus {
  border-color: #3737d8;

  box-shadow:
    0 0 0 3px rgba(55, 55, 216, 0.10);
}


.password-field {
  position: relative;
}


.password-field input {
  padding-right: 72px;
}


.password-toggle {
  position: absolute;

  top: 50%;
  right: 8px;

  transform: translateY(-50%);

  padding: 7px 9px;

  border: 0;
  border-radius: 7px;

  background: transparent;

  color: #3737d8;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}


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


.login-message {
  min-height: 20px;

  margin: -2px 0 10px;

  color: #b91c1c;

  font-size: 12px;
  line-height: 1.4;
}


.login-message.success {
  color: #15803d;
}


.login-button {
  width: 100%;
  height: 46px;

  border: 0;
  border-radius: 9px;

  background: #3737d8;
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}


.login-button:hover {
  box-shadow:
    0 8px 20px rgba(55, 55, 216, 0.22);

  transform: translateY(-1px);
}


.login-button:disabled {
  cursor: wait;

  opacity: 0.65;

  transform: none;
  box-shadow: none;
}


.login-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  margin-top: 20px;

  padding: 11px 12px;

  border-radius: 9px;

  background: #f8fafc;

  color: #64748b;

  font-size: 11px;
  line-height: 1.45;
}


/* =========================
   AUTHENTICATED HEADER
========================= */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;

  min-width: 0;
}


.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  min-width: 0;
}


.user-label {
  color: #94a3b8;

  font-size: 10px;
  line-height: 1.2;
}


.user-email {
  max-width: 250px;

  overflow: hidden;

  color: #334155;

  font-size: 12px;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.logout-button {
  min-height: 34px;

  padding: 7px 11px;

  border: 1px solid #cbd5e1;
  border-radius: 8px;

  background: #ffffff;

  color: #475569;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}


.logout-button:hover {
  border-color: #94a3b8;

  background: #f8fafc;
}


/* =========================
   AUTH RESPONSIVE
========================= */

@media (max-width: 800px) {

  .login-screen {
    align-items: flex-start;

    padding:
      max(20px, env(safe-area-inset-top))
      14px
      max(20px, env(safe-area-inset-bottom));
  }


  .login-card {
    grid-template-columns: 1fr;

    margin-top: 20px;
  }


  .login-divider {
    width: 100%;
    height: 1px;
  }


  .login-brand {
    align-items: center;

    padding: 28px 22px 24px;

    text-align: center;
  }


  .login-logo {
    width: 76px;
    height: 76px;

    margin-bottom: 12px;
  }


  .login-brand h1 {
    font-size: 20px;
  }


  .login-brand p {
    font-size: 12px;
  }


  .login-form-area {
    padding: 26px 20px 28px;
  }


  .login-form-area h2 {
    font-size: 21px;
  }


  .header-actions {
    gap: 7px;
  }


  .user-info {
    display: none;
  }


  .logout-button {
    min-height: 30px;

    padding: 5px 8px;

    font-size: 10px;
  }

}


@media (max-width: 420px) {

  .login-screen {
    padding-left: 10px;
    padding-right: 10px;
  }


  .login-card {
    border-radius: 14px;
  }


  .login-brand {
    padding: 24px 16px 20px;
  }


  .login-form-area {
    padding: 22px 16px 24px;
  }


  .header-actions {
    flex-wrap: wrap;
  }


  .logout-button {
    order: 2;
  }


  .live-status {
    order: 1;
  }

}
