:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --border: #2d3a4d;
  --text: #e6edf3;
  --text-muted: #8b9cb3;
  --accent: #3dd68c;
  --accent-hover: #2ec77a;
  --accent-soft: rgba(61, 214, 140, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: 'Outfit', -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.clock {
  margin-top: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.select-user {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b9cb3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 44px;
}

.select-user:hover,
.select-user:focus {
  border-color: var(--accent);
  outline: none;
}

.card-punch {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
}

.btn-punch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 18px 24px;
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f1419;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(61, 214, 140, 0.35);
}

.btn-punch:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(61, 214, 140, 0.4);
}

.btn-punch:active:not(:disabled) {
  transform: translateY(0);
}

.btn-punch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-punch-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.punch-hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pointages-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pointages-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.pointages-list li:last-child {
  margin-bottom: 0;
}

.pointages-list .label {
  font-weight: 500;
}

.pointages-list .time {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pointages-empty {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center;
}

.next-punch {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.next-punch strong {
  color: var(--accent);
}

.footer {
  margin-top: 24px;
  text-align: center;
}

.link-admin {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-admin:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 100;
  max-width: 90vw;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--accent);
  color: #0f1419;
}

.toast.error {
  background: var(--danger);
  color: #0f1419;
}
