* { box-sizing: border-box; }

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --bg: #0b1020;
  --card: #151b2e;
  --card-2: #1c2440;
  --text: #e8ebf5;
  --muted: #8b93b0;
  --border: #2a3355;
  --danger: #ef4444;
  --success: #22c55e;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(99,102,241,0.25), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(139,92,246,0.18), transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 48px;
}

.topbar { display: flex; align-items: center; gap: 14px; padding: 28px 20px 18px; }
.logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: 0.5px; box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; }
.topbar p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  margin: 0 16px 16px; padding: 24px; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.hidden { display: none !important; }

.card h2 { margin-top: 0; font-size: 21px; }
.card > p { color: var(--muted); font-size: 14px; line-height: 1.5; }

label { display: block; margin: 16px 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
input {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(11,16,32,0.6); color: var(--text); font-size: 15px; transition: border-color 0.15s;
}
input:focus { outline: none; border-color: var(--accent); }

button {
  margin-top: 20px; width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(99,102,241,0.6);
  transition: transform 0.1s, opacity 0.15s;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); opacity: 0.9; }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.hint { font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.error {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5; font-size: 13px; line-height: 1.4;
}

.team-banner {
  background: rgba(11,16,32,0.5); border-radius: 14px; padding: 16px;
  margin-bottom: 18px; border: 1px solid var(--border);
}
.team-banner > span { color: var(--success); font-weight: 700; font-size: 14px; }
.team-banner > p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.team-code-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; flex-wrap: wrap; }
.team-code-row strong { font-size: 20px; letter-spacing: 3px; }
.team-code-row button { width: auto; margin: 0; padding: 9px 14px; font-size: 13px; box-shadow: none; }

.dash-header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.dash-header-row p { color: var(--muted); font-size: 13.5px; margin: 0; }
.link-btn {
  width: auto; margin: 0; padding: 6px 4px; background: none; box-shadow: none;
  color: var(--accent); font-weight: 600; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; transform: none; }

h3 { font-size: 15px; margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.task-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(11,16,32,0.5); padding: 14px; border-radius: 14px; margin-bottom: 10px;
  border: 1px solid var(--border);
}
.task-info { display: flex; flex-direction: column; gap: 3px; }
.task-info strong { font-size: 14.5px; }
.task-info small { color: var(--muted); font-size: 12px; }
.task-info .due { color: #a5b4fc; font-size: 12px; font-weight: 600; margin-top: 2px; }
.task-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 10px;
  background: rgba(255,255,255,0.06); box-shadow: none; font-size: 15px;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }
.delete-task { color: var(--danger); }

.empty { color: var(--muted); font-size: 14px; }

.fab { margin-top: 22px; font-size: 15px; }

.modal {
  position: fixed; inset: 0; background: rgba(5,8,20,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-content {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 20px; padding: 26px; width: 100%; max-width: 380px; position: relative;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.close-x { position: absolute; top: 14px; right: 14px; width: auto; background: none; box-shadow: none; padding: 4px 8px; color: var(--muted); }

.alert-content { text-align: center; }
.bell { font-size: 52px; animation: ring 0.5s ease-in-out infinite; }
@keyframes ring {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}
.alert-content h2 { margin: 10px 0 4px; }
