* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(56, 189, 248, 0.2), transparent 60%),
    radial-gradient(900px 550px at 100% 0%, rgba(168, 85, 247, 0.18), transparent 50%),
    radial-gradient(circle at top, #1e293b, #0b1220 55%);
  color: #e5e7eb;
  min-height: 100vh;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 90px;
}

.container h2 {
  margin-top: 4px;
}

h1,
h2 {
  margin: 0 0 12px;
}

.subtitle {
  margin-top: 8px;
  opacity: 0.9;
}

.card {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.72));
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #475569;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 65%);
}

.grid {
  display: grid;
  gap: 10px;
}

input,
textarea,
button {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background: #111827;
  color: #f9fafb;
  padding: 10px;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #1d4ed8;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

#refreshBtn {
  width: auto;
  padding: 10px 16px;
}

.sort-controls {
  display: flex;
  gap: 6px;
}

.sort-btn {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.8);
  border-color: #475569;
}

.sort-btn.active {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #1d4ed8;
}

.refresh-btn {
  width: auto;
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

.pro-badge-svg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  margin-bottom: 2px;
  width: 18px;
  height: 18px;
}

.task {
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.95);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.task:hover {
  border-color: #3b82f6;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #6b7280;
}

.amount {
  font-weight: 700;
  color: #86efac;
  letter-spacing: 0.2px;
}

.actions {
  display: flex;
  gap: 8px;
}

.empty {
  opacity: 0.85;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 6px 8px 6px 8px;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid #334155;
  z-index: 100;
}

.nav-btn {
  flex: 1 1 0;
  min-width: 0;
  margin: 0 2px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0 6px 0;
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  border: 1px solid #334155;
  transition: all 0.2s ease;
}

.nav-btn.active, .nav-btn:focus {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.nav-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #cbd5e1;
}

.task-info {
  display: grid;
  gap: 12px;
}

.info-line {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric-box {
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.45);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.metric-box:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.metric-label {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 23px;
  font-weight: 700;
  color: #93c5fd;
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #334155;
  transition: background 0.2s ease;
}

.table tbody tr:hover td {
  background: rgba(30, 41, 59, 0.45);
}

.table thead th {
  color: #93c5fd;
}

.timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}

.timer-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#22c55e 0deg, #1e293b 0deg);
  border: 6px solid #334155;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.timer-circle::before {
  content: "";
  position: absolute;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 50%;
  background: linear-gradient(145deg, #0b1220, #1e293b);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.timer-inner {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.timer-text {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}

.timer-label {
  font-size: 12px;
  opacity: 0.7;
  color: #94a3b8;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.primary-btn {
  margin-top: 10px;
}

.back-link {
  color: #93c5fd;
  text-decoration: none;
}

.auth-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.auth-box {
  width: min(92vw, 420px);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.auth-box h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.auth-box input {
  margin-bottom: 12px;
  text-align: center;
  font-size: 16px;
}

.auth-help {
  margin: 0 0 14px;
  color: #cbd5e1;
}

.auth-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: #fecaca;
}

.no-access-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}
