* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --success: #059669;
  --danger: #dc2626;
  --sidebar: #111827;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 28rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 26px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.18), transparent 32%),
    var(--sidebar);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.08rem;
}

.brand p {
  margin: 4px 0 0;
  color: #9ca3af;
  font-size: 0.78rem;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.nav-btn {
  width: 100%;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-btn:hover,
.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(6, 182, 212, 0.78));
}

.nav-btn span {
  width: 24px;
  text-align: center;
  font-size: 1.05rem;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-note strong {
  font-size: 0.82rem;
}

.sidebar-note span {
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.4;
}

.main-area {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  min-height: 84px;
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 1.45rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.76);
}

.top-actions,
.record-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.icon-btn,
.primary-small,
.soft-btn,
.danger-btn,
.primary-btn {
  border: 0;
  border-radius: 11px;
  font-weight: 800;
}

.icon-btn,
.primary-small,
.soft-btn,
.danger-btn {
  padding: 10px 14px;
}

.icon-btn,
.soft-btn {
  color: #374151;
  background: #eef2ff;
}

.primary-small,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.content {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 26px 30px 44px;
}

.filter-panel {
  margin-bottom: 22px;
  padding: 16px 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-row {
  display: flex;
  gap: 8px;
}

.filter-status {
  min-width: 180px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

.filter-status span {
  color: var(--muted);
  font-size: 0.74rem;
}

.filter-status strong {
  font-size: 0.92rem;
}

input,
select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(79, 70, 229, 0.75);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hero-card {
  min-height: 190px;
  padding: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.24), transparent 9rem),
    linear-gradient(135deg, #312e81, #4f46e5 55%, #0891b2);
  box-shadow: 0 24px 60px rgba(49, 46, 129, 0.25);
  overflow: hidden;
}

.hero-card h3 {
  margin: 10px 0 6px;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}

.hero-card p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.hero-badge {
  min-width: 150px;
  padding: 17px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-badge span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.74rem;
}

.hero-badge strong {
  font-size: 1.45rem;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.panel-card {
  border: 1px solid rgba(229, 231, 235, 0.96);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 135px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-card strong {
  margin: 8px 0 5px;
  font-size: 1.45rem;
}

.stat-card small {
  color: #9ca3af;
}

.dashboard-lower {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.panel-card {
  padding: 22px;
  border-radius: 20px;
}

.form-card {
  max-width: 980px;
  margin: 0 auto;
}

.section-title {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-title h3 {
  margin: 5px 0 0;
  font-size: 1.18rem;
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eef2ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.account-list {
  display: grid;
  gap: 11px;
}

.account-row {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.account-row div {
  display: grid;
  gap: 3px;
}

.account-row span {
  font-size: 0.84rem;
  font-weight: 800;
}

.account-row small {
  color: var(--muted);
}

.account-row strong {
  align-self: center;
}

.empty-state {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-grid div {
  padding: 16px;
  display: grid;
  gap: 7px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.quick-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.quick-grid strong {
  font-size: 1.18rem;
}

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

.form-grid label {
  color: #374151;
  font-size: 0.8rem;
  font-weight: 800;
}

.full-width {
  grid-column: 1 / -1;
}

.primary-btn {
  min-height: 48px;
  padding: 13px 18px;
}

.calculation-strip {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  color: #312e81;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.record-title {
  margin-bottom: 10px;
}

.record-block {
  margin-top: 26px;
}

.record-block h4 {
  margin: 0 0 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.78rem;
  vertical-align: middle;
}

th {
  color: #4b5563;
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td small {
  color: var(--muted);
}

.delete-btn {
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--danger);
  background: #fee2e2;
  font-weight: 800;
}

.empty-row {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120px);
  z-index: 100;
  min-width: 230px;
  max-width: calc(100% - 34px);
  padding: 13px 17px;
  border-radius: 12px;
  color: #fff;
  background: #111827;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.28);
  text-align: center;
  opacity: 0;
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobile-nav {
  display: none;
}

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

  .dashboard-lower {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    display: none;
  }

  .main-area {
    grid-column: 1;
    padding-bottom: 78px;
  }

  .topbar {
    min-height: 72px;
    padding: 13px 16px;
  }

  .topbar h2 {
    font-size: 1.12rem;
  }

  .topbar .eyebrow {
    font-size: 0.58rem;
  }

  .top-actions {
    gap: 6px;
  }

  .icon-btn,
  .primary-small {
    padding: 9px 10px;
    font-size: 0.76rem;
  }

  .content {
    padding: 16px 14px 28px;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .filter-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .filter-status {
    min-width: 0;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-card {
    min-height: 210px;
    padding: 23px;
    align-items: stretch;
    flex-direction: column;
    justify-content: space-between;
  }

  .hero-badge {
    min-width: 0;
  }

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

  .stat-card {
    min-height: 122px;
    padding: 14px;
  }

  .stat-card strong {
    font-size: 1.18rem;
  }

  .panel-card {
    padding: 16px;
  }

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

  .full-width {
    grid-column: 1;
  }

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

  .record-actions {
    width: 100%;
  }

  .record-actions button {
    flex: 1;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    height: 70px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-btn {
    border: 0;
    border-radius: 11px;
    color: #6b7280;
    background: transparent;
    display: grid;
    place-items: center;
    gap: 2px;
  }

  .mobile-nav-btn span {
    font-size: 1rem;
  }

  .mobile-nav-btn small {
    font-size: 0.62rem;
    font-weight: 800;
  }

  .mobile-nav-btn.active {
    color: var(--primary);
    background: #eef2ff;
  }
}

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

  .filter-row input {
    grid-column: 1 / -1;
  }

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

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


.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions .primary-btn,
.form-actions .cancel-edit-btn {
  flex: 1;
}

.cancel-edit-btn {
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  color: #374151;
  background: #f8fafc;
  font-weight: 800;
}

.cancel-edit-btn:hover {
  background: #eef2f7;
}

.hidden {
  display: none !important;
}

.action-group {
  display: flex;
  gap: 7px;
  align-items: center;
}

.edit-btn {
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  color: #3730a3;
  background: #e0e7ff;
  font-weight: 800;
}

.edit-btn:hover {
  background: #c7d2fe;
}

@media (max-width: 560px) {
  .form-actions {
    flex-direction: column;
  }
}


/* Version 4: month, platform, search and Excel reporting */
.advanced-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.filter-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 10px;
}

.filter-controls label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.filter-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.excel-btn {
  padding: 10px 14px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.18);
  font-weight: 800;
}

.excel-btn:hover {
  background: linear-gradient(135deg, #166534, #14532d);
}

.platform-panel {
  margin-top: 18px;
}

.platform-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(125px, 1fr));
  gap: 11px;
}

.platform-summary-card {
  min-height: 118px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(79, 70, 229, 0.06), transparent 62%),
    var(--surface-2);
}

.platform-summary-card span {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 850;
}

.platform-summary-card strong {
  margin-top: 10px;
  font-size: 1.45rem;
}

.platform-summary-card small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.platform-summary-card.active-platform {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #0891b2);
  box-shadow: 0 15px 32px rgba(79, 70, 229, 0.2);
}

.platform-summary-card.active-platform span,
.platform-summary-card.active-platform small {
  color: rgba(255, 255, 255, 0.84);
}

@media (max-width: 1180px) {
  .advanced-filter-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .filter-status {
    min-width: 0;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .platform-summary-grid {
    grid-template-columns: repeat(3, minmax(125px, 1fr));
  }
}

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

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

  .filter-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-actions-row button {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 0.72rem;
  }

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


/* Version 5 fix: filter layout overlap */
.advanced-filter-panel {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 14px;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-status {
  min-width: 0;
  padding: 12px 0 0;
  border-left: 0;
  border-top: 1px solid var(--line);
}

.platform-summary-card {
  border: 0;
  text-align: left;
  cursor: pointer;
}

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

  .filter-actions-row button {
    width: 100%;
  }
}


/* Version 6: date range controls */
.filter-status small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.filter-controls {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  background: #f3f4f6;
}


/* =========================================================
   VERSION 7 — ONLINE AUTHENTICATION & SUPABASE
   ========================================================= */

.app-hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.25), transparent 24rem),
    radial-gradient(circle at 85% 80%, rgba(79, 70, 229, 0.32), transparent 28rem),
    linear-gradient(135deg, #0f172a, #111827 48%, #312e81);
}

.auth-screen.hidden {
  display: none !important;
}

.auth-decoration {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-decoration-one {
  width: 260px;
  height: 260px;
  top: -90px;
  right: -60px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-decoration-two {
  width: 190px;
  height: 190px;
  bottom: -70px;
  left: -40px;
  background: rgba(6, 182, 212, 0.12);
}

.auth-card {
  width: min(455px, 100%);
  padding: 30px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand h1 {
  margin: 3px 0 0;
  font-size: 1.55rem;
}

.auth-intro {
  margin: 20px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.auth-tabs {
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border-radius: 13px;
  background: #eef2ff;
}

.auth-tab {
  padding: 11px;
  border: 0;
  border-radius: 10px;
  color: #6b7280;
  background: transparent;
  font-weight: 850;
}

.auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 9px 20px rgba(79, 70, 229, 0.2);
}

.auth-form {
  margin-top: 20px;
  display: grid;
  gap: 15px;
}

.auth-form label {
  color: #374151;
  font-size: 0.8rem;
  font-weight: 800;
}

.password-field {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  top: 14px;
  right: 8px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #eef2ff;
  font-size: 0.72rem;
  font-weight: 850;
}

.auth-submit {
  width: 100%;
  margin-top: 3px;
}

.auth-message {
  min-height: 21px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.auth-message.error {
  color: #b91c1c;
}

.auth-message.success {
  color: #047857;
}

.online-note strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.online-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-user-box {
  min-width: 150px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.sync-status {
  color: #047857;
  font-size: 0.68rem;
  font-weight: 850;
}

.sync-status.error {
  color: #b91c1c;
}

.sync-status.syncing {
  color: #b45309;
}

.user-email {
  max-width: 230px;
  overflow: hidden;
  color: #374151;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  padding: 10px 13px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  color: #b91c1c;
  background: #fff1f2;
  font-weight: 850;
}

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
}

.loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.24);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (max-width: 900px) {
  .online-actions {
    gap: 5px;
  }

  .sync-user-box {
    width: 100%;
    min-width: 0;
    order: -1;
    text-align: right;
  }

  .online-actions button {
    padding: 8px 9px;
    font-size: 0.68rem;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar > div:first-child {
    min-width: 100px;
  }

  .online-actions {
    max-width: 62%;
  }

  #uploadLocalBtn {
    display: none;
  }

  .user-email {
    max-width: 190px;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .online-actions {
    max-width: 68%;
  }

  .online-actions #restoreBtn {
    display: none;
  }
}
