:root {
  --bg: #050607;
  --bg-card: #111218;
  --accent: #ff8800;
  --accent-soft: #ffb347;
  --text: #f5f5f5;
  --muted: #9ea0aa;
  --danger: #ff5252;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #1d1f2b 0, #050607 55%);
  color: var(--text);
}

.screen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-screen {
  padding: 16px;
}

.desktop-screen {
  display:flex;
  justify-content:center;
  align-items:center;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.logo-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:#000;
}

.app-title {
  margin:0;
  font-size: 22px;
  letter-spacing: 1px;
}
.app-subtitle {
  margin:0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  background: rgba(5,6,10,0.92);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

.centered {
  margin-top:40px;
}

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

label {
  font-size: 13px;
  color: var(--muted);
}

input, textarea, select {
  background:#181924;
  border-radius:10px;
  border:1px solid #252736;
  color:var(--text);
  padding:10px 12px;
  font-size:15px;
}

input:focus, textarea:focus, select:focus {
  outline:none;
  border-color: var(--accent);
}

.btn {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:none;
  background:#26283a;
  color:var(--text);
  text-decoration:none;
  font-size:14px;
  font-weight:500;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color:#000;
}

.btn.secondary {
  background:#34364a;
}

.btn.small {
  padding:6px 10px;
  font-size:12px;
}

.btn.full {
  width:100%;
  margin-bottom:10px;
}

.hint {
  margin-top:12px;
  font-size:12px;
  color:var(--muted);
}

/* topbar */
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  background:rgba(5,6,12,0.9);
  border-bottom:1px solid #1e2030;
}

.topbar-title {
  margin:0;
  font-size:17px;
}
.topbar-subtitle {
  margin:0;
  font-size:12px;
  color:var(--muted);
}

.content {
  padding:12px;
  flex:1;
  overflow-y:auto;
}

/* events list */
.list {
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.item {
  background:#101119;
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  justify-content:space-between;
  gap:8px;
}

.item-main h2 {
  margin:0;
  font-size:15px;
}
.item-main p {
  margin:2px 0;
  font-size:12px;
  color:var(--muted);
}

.item-actions {
  display:flex;
  flex-direction:column;
  gap:4px;
}

.tag {
  display:inline-flex;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
}
.tag.pendiente { background:#33364b; color:#f1f1f1; }
.tag.corriendo { background:#1b8f3c; color:#fff; }
.tag.finalizado { background:#444; color:#ccc; }

/* tables */
.table-wrapper {
  background:#101119;
  border-radius:14px;
  padding:8px;
  overflow-x:auto;
}

.table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.table th, .table td {
  padding:6px 8px;
  text-align:left;
}
.table thead {
  background:#191b28;
}
.table tbody tr:nth-child(even){
  background:#141520;
}

/* chrono screen */
.chronoscreen {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.times-list {
  background:#101119;
  border-radius:14px;
  padding:10px;
  max-height:40vh;
  overflow-y:auto;
}

.times-list h2 {
  margin:0 0 6px 0;
  font-size:14px;
}

#listaTiempos {
  list-style:none;
  padding:0;
  margin:0;
  font-size:13px;
}

#listaTiempos li {
  padding:4px 0;
  border-bottom:1px solid #1b1d2a;
}

.chrono-keypad {
  background:#050609;
  border-radius:18px 18px 0 0;
  padding:10px 10px 18px;
}

.chrono-display {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.chrono-display input {
  width:110px;
  font-size:22px;
  text-align:center;
}

.live-clock {
  font-variant-numeric:tabular-nums;
  font-size:16px;
  color:var(--accent-soft);
}

.keypad-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:8px;
}

.keypad-grid .key {
  border-radius:10px;
  border:none;
  padding:14px 0;
  font-size:18px;
  font-weight:600;
  background:#26283a;
  color:var(--text);
}

.keypad-grid .key.primary {
  background:linear-gradient(135deg, var(--accent), var(--accent-soft));
  color:#000;
}

.keypad-grid .key.secondary {
  background:#3a3d54;
}

.public-screen .topbar {
  justify-content:center;
}


.tiempo-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.row-main {
  flex:1;
}

.row-actions {
  display:flex;
  gap:4px;
}

.mini-btn {
  border:none;
  border-radius:8px;
  padding:4px 6px;
  font-size:11px;
  background:#26283a;
  color:#f5f5f5;
}

.mini-btn.danger {
  background:#ff5252;
  color:#000;
}
