@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg:        #0a0c10;
  --bg2:       #0f1117;
  --surface:   rgba(255,255,255,0.04);
  --surface-h: rgba(255,255,255,0.08);
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.16);
  --text:      #e8eaf0;
  --muted:     #5a5f70;
  --accent:    #7c6af7;
  --accent2:   #4fd1c5;
  --radius:    16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124,106,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(79,209,197,0.08) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v1H0zM0 0v40h1V0' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px;
  height: 64px;
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 14px;
  color: white; letter-spacing: -0.5px;
  box-shadow: 0 0 20px rgba(124,106,247,0.35);
  flex-shrink: 0;
}

.brand { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.3px; }
.brand span { color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; color: var(--muted);
  background: var(--surface);
}

.user-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2);
  animation: pulse 2.4s ease infinite;
}

#clock {
  font-family: 'Syne', sans-serif;
  font-size: 13px; color: var(--muted);
  min-width: 80px; text-align: right;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(0.7); }
}

.logout {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: transparent;
  transition: all .2s;
}
.logout:hover { border-color: #e05252; color: #e05252; background: rgba(224,82,82,0.06); }

/* MAIN */
.main {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 52px 32px 80px;
}

/* GREETING */
.greeting {
  margin-bottom: 56px;
  animation: fadeUp .6s ease both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

.greeting-time {
  font-size: 11px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.greeting-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  letter-spacing: -1.5px; line-height: 1.05;
}
.greeting-title em { font-style: normal; color: var(--accent); }
.greeting-sub {
  margin-top: 12px; font-size: 14px; color: var(--muted); font-weight: 300;
}

/* SECTION HEADER */
.section-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.section-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  animation: fadeUp .6s .15s ease both;
}

/* CARD */
.page {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 24px 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  background: var(--surface);
  transition: border-color .25s, transform .25s, background .25s;
}

.page::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--c, var(--accent));
  opacity: .7;
}

.page::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 0%, var(--glow, rgba(124,106,247,0.07)), transparent 65%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.page:hover::after { opacity: 1; }
.page:hover {
  border-color: var(--border-h);
  background: var(--surface-h);
  transform: translateY(-4px);
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 22px;
  transition: transform .25s;
}
.page:hover .card-icon { transform: scale(1.1) rotate(-5deg); }

.card-badge {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.badge-live { background: rgba(79,209,197,0.12); color: var(--accent2); border: 1px solid rgba(79,209,197,0.2); }
.badge-soon { background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid var(--border); }

.card-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px;
}
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }

.card-footer {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-url { font-size: 11px; color: var(--muted); opacity: .6; }

.card-arrow {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 14px; color: var(--muted);
  transition: all .2s;
}
.page:hover .card-arrow {
  background: var(--c, var(--accent));
  border-color: transparent; color: white;
  transform: rotate(-45deg);
}

.disabled { opacity: .3; pointer-events: none; }
.disabled:hover { transform: none; }

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%; max-width: 380px;
  background: rgba(15,17,23,0.95);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 38px;
  backdrop-filter: blur(24px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
  animation: fadeUp .5s ease both;
}

.login-logo {
  width: 54px; height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px; color: white;
  margin-bottom: 28px;
  box-shadow: 0 0 32px rgba(124,106,247,0.45);
}

.login-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px;
}
.login-sub { font-size: 13px; color: var(--muted); margin-bottom: 34px; line-height: 1.5; }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--muted); margin-bottom: 7px;
  letter-spacing: .06em; text-transform: uppercase;
}

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, background .2s;
}
input:focus { border-color: var(--accent); background: rgba(124,106,247,0.06); }
input::placeholder { color: var(--muted); }

.error-msg {
  padding: 10px 14px; border-radius: 10px;
  background: rgba(224,82,82,0.1); border: 1px solid rgba(224,82,82,0.25);
  font-size: 13px; color: #e05252; margin-bottom: 16px;
}

button[type="submit"] {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--accent), #5a4fcf);
  border: none; border-radius: 10px;
  color: white; font-size: 14px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; letter-spacing: .02em;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 6px 24px rgba(124,106,247,0.4);
  margin-top: 6px;
}
button[type="submit"]:hover { opacity: .88; }
button[type="submit"]:active { transform: scale(.98); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 3px; }

.add-btn {
  width: 100%; margin-top: 14px; padding: 13px;
  background: transparent; border: 1px dashed var(--border);
  border-radius: var(--radius); color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.add-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(124,106,247,0.05); }

.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: none; place-items: center;
}
.modal-bg.open { display: grid; }
.modal {
  background: #0f1117; border: 1px solid var(--border-h);
  border-radius: 20px; padding: 36px; width: 100%; max-width: 420px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  animation: fadeUp .25s ease;
}
.modal-title {
  font-family: 'Syne', sans-serif; font-size: 20px;
  font-weight: 700; margin-bottom: 24px;
}
