/* ================================
   Global Reset
================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background: #f4f6f8;
    color: #222;
    padding: 30px;
}

/* ================================
   Layout
================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
}

h1 {
    font-size: 32px;
    margin-bottom: 4px;
}

.subtitle {
    color: #666;
    margin-bottom: 24px;
}

/* Logo + text header */
.logo-header {
    display: flex;
    align-items: center;
	justify-content: center;
    gap: 12px;
	
}

.logo-img {
    height: 128px; /* adjust to taste */
    width: auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}

.logo-header h1 {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Cantarell', sans-serif;
    font-size: 42px; /* larger than before */
    font-weight: 700;
	justify-content: center;
    color: #222;
    margin: 0;
}


/* ================================
   Cards
================================ */
.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 14px;
    color: #333;
}

/* ================================
   Inputs
================================ */
.pill-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    outline: none;
    font-size: 14px;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.pill-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

/* extra spacing above custom column input */
.spaced-top {
    margin-top: 14px;
}

.textarea-input {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #d0d7de;
    font-size: 14px;
    resize: vertical;
}

body.dark .textarea-input {
    background: #0d1117;
    color: #e6edf3;
    border-color: #30363d;
}


/* ================================
   Rows
================================ */
.row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.row label {
    width: 160px;
    font-size: 14px;
    color: #444;
}

.row input[type="date"],
.row input[type="number"] {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    font-size: 14px;
}

/* ================================
   Checkbox Grids
================================ */
.checkbox-grid {
    margin-top: 8px;
}

/* Responsive multi-column grid */
.checkbox-grid.responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

/* Telegram stays stacked */
.checkbox-grid.telegram {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ================================
   Checkbox Pills (STRICT interaction)
================================ */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fb;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid #e3e6eb;
    pointer-events: none;
}

.checkbox-row.custom {
    background: #fff4f4;
    border-color: #f2c2c2;
}

/* Checkbox only */
.checkbox-row input[type="checkbox"] {
    pointer-events: auto;
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
}

.checkbox-row input[type="checkbox"]:checked {
  accent-color: #d32f2f;
}

/* Remove button */
.checkbox-row .remove {
    pointer-events: auto;
    cursor: pointer;
}

/* Text never clickable */
.checkbox-row span {
    user-select: none;
    pointer-events: none;
}

/* ================================
   Remove Button
================================ */
.remove {
    color: #d32f2f;
    font-weight: bold;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
}

.remove:hover {
    background: rgba(211, 47, 47, 0.15);
    color: #b71c1c;
}

/* ================================
   Subtext
================================ */
.sub {
    margin-left: 22px;
    font-size: 12px;
    color: #777;
}

/* ================================
   Buttons
================================ */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn {
    padding: 12px 26px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.05s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    color: #ffffff;
}

.btn-secondary {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: #ffffff;
}

/* ================================
   Console
================================ */
.console {
    background: #0e1117;
    color: #e6edf3;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12.5px;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 16px;
    height: 260px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.4;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}


/* ================================
   Footer Disclaimer
================================ */
.footer-disclaimer {
    margin-top: 28px;
    text-align: center;
    font-size: 11px;
    color: #8a8a8a;
    opacity: 0.8;
}

/* ================================
   Dark Mode Toggle Button
================================ */
#darkToggle {
    position: fixed;
    top: 22px;
    right: 26px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 18px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    z-index: 1000;
	touch-action: manipulation;
}

#darkToggle:hover {
    transform: scale(1.05);
}

.back-btn {
  position: fixed;
  top: 22px;
  left: 26px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  z-index: 1000;
  touch-action: manipulation;
}

.back-btn:hover {
  transform: translateY(-1px);
}

body.dark .back-btn {
  background: #161b22;
  color: #e6edf3;
}


/* ================================
   Dark Mode Overrides
   (NO layout changes)
================================ */
body.dark {
    background: #0d1117;
    color: #e6edf3;
}

body.dark .subtitle {
    color: #9da7b3;
}

body.dark .card {
    background: #161b22;
    box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

body.dark h1,
body.dark h2 {
    color: #e6edf3;
}

body.dark .pill-input,
body.dark .row input[type="date"],
body.dark .row input[type="number"] {
    background: #0d1117;
    color: #e6edf3;
    border-color: #30363d;
}

body.dark .pill-input::placeholder {
    color: #8b949e;
}

body.dark .checkbox-row {
    background: #21262d;
    border-color: #30363d;
}

body.dark .checkbox-row.custom {
    background: #2a1e1e;
    border-color: #5a2a2a;
}

body.dark .sub {
    color: #8b949e;
}

body.dark .btn-secondary {
    background: linear-gradient(135deg, #555, #444);
}

body.dark .console {
    background: #010409;
    color: #e6edf3;
}

body.dark .logo-header h1 {
    color: #e6edf3;
}

body.dark .footer-disclaimer {
    color: #8b949e;
}


/* ================================
   Mobile Optimizations
================================ */
@media (max-width: 768px) {

    body {
        padding: 16px;
    }

    .container {
        max-width: 100%;
    }

    .logo-img {
        height: 88px;
        margin-bottom: 8px;
    }

    .card {
        padding: 16px;
    }

    .row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .row label {
        width: 100%;
        font-size: 13px;
    }

    .button-row {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .console {
        height: 220px;
        font-size: 12px;
    }
}


/* ================================
   Log out button
================================ */
/* Wrapper */
.account-info {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

/* Validity text */
.valid-until {
  font-size: 13px;
  opacity: 0.85;
  white-space: nowrap;
  color: #444;
}
body.dark .valid-until {
  color: #c9d1d9;
}
}

/* Mobile behavior */
@media (max-width: 768px) {
  .account-info {
    position: static;
    margin-top: 48px;
    padding-bottom: 12px;
    justify-content: center;
  }
}



/* ================================
   Checkbox vertical align fix
================================ */
.row.checkbox input[type="checkbox"] {
    vertical-align: middle;
    margin-top: 0;
}

/* ================================ Category Toggle ================================ */
.category-toggle {
  display: flex;
  gap: 14px;
}

.category-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 0;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #f8f9fb;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.category-btn.active {
  background: linear-gradient(135deg, #d32f2f, #c62828);
  color: #ffffff;
  border-color: transparent;
}

.category-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}


.category-btn span {
  display: flex;
  align-items: center;
  font-size: 19px; /* + ~3pt */
  font-weight: 600;
  line-height: 1;
}


/* Dark mode */
body.dark .category-btn {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}

body.dark .category-btn.active {
  background: linear-gradient(135deg, #d32f2f, #c62828);
  color: #ffffff;
}

.logout-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: #ffffff;
  transition: transform 0.05s ease, box-shadow 0.15s ease;
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}


.help-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #1976d2;
  background: transparent;
  color: #1976d2;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.help-btn:hover {
  background: rgba(25, 118, 210, 0.08);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

body.dark .help-btn {
  border-color: #90caf9;
  color: #90caf9;
}

body.dark .help-btn:hover {
  background: rgba(144, 202, 249, 0.08);
}


/* ================================
   User Status Display
================================ */
.status-text {
  font-size: 15px;
  font-weight: 500;
  color: #1976d2;
}

:root {
  --status-green: #22c55e; /* same green everywhere */
}

/* Add breathing room above Status */
.status-card {
  margin-top: 24px;
}


body.dark .status-text {
  color: #90caf9;
}

/* ================================
   Status Card Progress Background
================================ */

/* Unified green used everywhere */
:root {
  --status-green: #22c55e;
}

/* Base card setup */
.status-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

/* Dark mode base */
body.dark .status-card {
  background: #161b22;
}

/* Progress / scan overlay */
.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease, background-color 0.35s ease;
  z-index: 0;
  pointer-events: none;
}

/* Keep content above overlay */
.status-card > * {
  position: relative;
  z-index: 1;
}

/* 🔵 Scan started (soft blue wash, full width) */
.status-card.scanning::before {
  background: rgba(25, 118, 210, 0.15);
  transform: scaleX(1);
}

/* Dark mode scan */
body.dark .status-card.scanning::before {
  background: rgba(144, 202, 249, 0.18);
}

/* 🟢 Progress (green grows left → right) */
.status-card.progress::before {
  background: var(--status-green);
  transform: scaleX(var(--progress, 0));
}

/* ✅ Done (solid green) */
.status-card.done::before {
  background: var(--status-green);
  transform: scaleX(1);
}

/* Text color while on green */
.status-card.progress h2,
.status-card.progress .status-text,
.status-card.done h2,
.status-card.done .status-text {
  color: #ffffff;
}


/* ================================
   Login Layout
================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  position: relative;
  z-index: 5;
}

/* Logo shadow */
.login-logo {
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
}

.login-tagline {
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 14px 0 28px;
  
  font-size: 26px; /* slightly smaller */
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;

  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.75);
}

@media (max-width: 768px) {
  .login-tagline {
    white-space: normal;
    font-size: 22px;
    padding: 0 14px;
  }
}


/* Login card spacing */
.login-card {
  width: 100%;
  max-width: 420px;
}


.video-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔑 this fixes black bars */
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

/* Prevent background layers from blocking taps */
.video-bg,
.bg-video,
.video-overlay {
  pointer-events: none;
}


.date-hint {
  font-size: 12px;
  color: #d32f2f;
  margin-top: 4px;
}

body.dark .date-hint {
  color: #ff8a80;
}

