:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --border-subtle: #111827;
  --border-soft: #1f2937;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #2563eb;
  --accent-soft: #1d4ed8;
  --danger: #ef4444;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

body {
  background: #000;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tablet frame */

.tablet-frame {
  width: 100%;
  max-width: 1024px;
  height: 100vh;
  max-height: 768px;
  background: radial-gradient(circle at top, #020617 0, #000 55%);
  border-radius: 24px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  padding: 20px 32px 28px;
  display: flex;
  flex-direction: column;
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 80px;
  width: auto;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-right {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Main content */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Time / date */

.time-display {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f9fafb;
  margin-bottom: 20px;
}

/* Center card */

.center-card {
  width: 100%;
  max-width: 720px;
  background: var(--bg-elevated);
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}

.tap-icon-circle img {
  width: 80px;
  height: 80px;
}
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.tap-icon-circle img {
  width: 60px;
  height: 60px;
}

.center-card h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card-subtitle.small {
  font-size: 0.85rem;
}

/* NFC status / buttons */

.nfc-status {
  margin-top: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Buttons */

.primary-btn,
.secondary-btn,
.text-btn {
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.05s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.primary-btn {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #f9fafb;
  font-size: 1rem;
}

.primary-btn:hover {
  background: var(--accent-soft);
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled {
  background: #4b5563;
  cursor: not-allowed;
}

.secondary-btn {
  margin-top: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-size: 0.95rem;
}

.secondary-btn:hover {
  background: rgba(148, 163, 184, 0.12);
}

.text-btn {
  margin-top: 6px;
  background: none;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.text-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-main);
}

/* Last punch card */

.punch-status-card {
  width: 100%;
  max-width: 720px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #020617;
  border: 1px solid var(--border-subtle);
}

.punch-status-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.punch-status-card h2 {
  font-size: 1rem;
}

.punch-result {
  font-size: 0.95rem;
}

/* Pills / sync indicator */

.pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
}

.pill-sync {
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
}

/* Alert */

.alert {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  margin-top: 10px;
  width: 100%;
  max-width: 720px;
}

.alert-hidden {
  display: none;
}

.alert-info {
  display: block;
  background: #0f172a;
  border: 1px solid #1d4ed8;
  color: #bfdbfe;
}

.alert-success {
  display: block;
  background: #022c22;
  border: 1px solid #15803d;
  color: #bbf7d0;
}

.alert-error {
  display: block;
  background: #450a0a;
  border: 1px solid #b91c1c;
  color: #fecaca;
}

/* Responsive */

@media (max-width: 900px) {
  .tablet-frame {
    border-radius: 0;
    max-height: none;
    height: 100vh;
    padding: 16px 16px 20px;
  }

  .time-display {
    font-size: 3rem;
  }

  .center-card {
    padding: 22px 16px;
  }
}
