:root {
  --bg-dark: #0f1012;
  --surface: rgba(28, 30, 34, 0.95);
  --input: #25282d;
  --text: #ffffff;
  --muted: #8a8c92;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --success: #3ba55c;
  --error: #ed4245;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  position: relative;
}

/* Fondo fijo - COBERTURA TOTAL */
.fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('hcr2lgds.jpg');
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

.screen { 
  display: none; 
  width: 100%; 
  max-width: 400px; 
  animation: fadeIn 0.3s ease;
  position: relative;
  z-index: 1;
}
.screen.active { display: block; }

@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(12px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.main-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    letter-spacing: 0.5px;
    font-variant: petite-caps;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

h2 {
    font-size: 1.45rem;
    margin-bottom: 10px;
    text-align: center;
}
.subtitle { text-align: center; color: var(--muted); font-size: 1rem; margin-bottom: 15px; }

label { display: block; margin: 8px 0 3px; font-weight: 500; font-size: 0.82rem; color: var(--muted); }
input, select {
  width: 100%; padding: 9px 10px; background: var(--input); border: 1px solid #3a3d42;
  border-radius: 8px; color: var(--text); font-size: 0.92rem; transition: 0.2s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(88,101,242,0.25); }

button {
    width: 100%;
    padding: 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 9px;
    font-variant: petite-caps;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.secondary { background: var(--input); border: 1px solid #4a4d52; }
.secondary:hover { background: #35383d; }

.status { text-align: center; margin: 7px 0 0; font-size: 0.78rem; min-height: 16px; }
.success { color: var(--success); } .error { color: var(--error); }

/* Header Bar */
.header-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #3a3d42;
}
.welcome-text { font-weight: 600; font-size: 0.9rem; }
.sheets-btn {
  text-decoration: none; background: #2d7d46; color: white; padding: 6px 10px;
  border-radius: 6px; font-size: 0.78rem; font-weight: 500; display: inline-flex; align-items: center; gap: 4px;
  transition: background 0.2s;
}
.sheets-btn:hover { background: #236b38; }

/* 50/50 Row */
.row-50 { display: flex; gap: 8px; }
.row-50 > div { flex: 1; }

/* OCR & Queue */
.ocr-section { margin-top: 10px; padding-top: 8px; border-top: 1px solid #3a3d42; }
.queue-info {
  margin-top: 12px; padding-top: 8px; border-top: 1px solid #3a3d42;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--muted);
}
#queueCount { color: var(--text); font-weight: 700; }
#syncBtn { 
  width: auto; padding: 8px 16px; margin: 0; font-size: 0.85rem; 
  background: #4752c4; border-radius: 7px; 
}
#syncBtn:hover { background: #3a42b0; }

/* Login specific */
#loginBtn { background: var(--success); margin-top: 14px; }
#loginBtn:hover { background: #2f914b; }

@media (max-width: 380px) {
  .card { padding: 12px; }
  .main-title { font-size: 1.15rem; }
}
