:root {
  --bg:      #0f0f1a;
  --surface: #1a1a2e;
  --accent:  #e94560;
  --green:   #2ecc71;
  --warn:    #f39c12;
  --text:    #e0e0e0;
  --muted:   #888;
  --border:  #2a2a4a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; min-height: 100vh; }

/* ── Auth ── */
.auth-page { display: flex; justify-content: center; align-items: center; }
.login-box {
  background: var(--surface); padding: 2.5rem 2rem; border-radius: 14px;
  width: 320px; text-align: center; border: 1px solid var(--border);
  margin-top: 15vh;
}
.logo { font-size: 2.5rem; margin-bottom: .5rem; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--text); }
.login-box input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text);
  margin-bottom: .9rem; font-size: 1rem;
}
.login-box button {
  width: 100%; padding: 11px; background: var(--accent);
  border: none; border-radius: 7px; color: white; cursor: pointer;
  font-size: 1rem; font-weight: 600; transition: opacity .2s;
}
.login-box button:hover { opacity: .85; }
.error { color: var(--accent); margin-bottom: .8rem; font-size: .9rem; }

/* ── Layout ── */
.container { max-width: 820px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.4rem;
}
.logo-text { font-size: 1.4rem; font-weight: 700; }
.header-right { display: flex; gap: .6rem; align-items: center; }
.btn-sm {
  padding: 6px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .85rem;
  cursor: pointer; transition: border-color .2s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--text); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 1.3rem 1.4rem; margin-bottom: 1rem;
}
.card h2 {
  font-size: .8rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 1rem;
}

/* ── Storage Card ── */
.storage-card { border-color: #2a3a5a; }
.storage-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.storage-info { font-size: .9rem; color: var(--muted); margin: .3rem 0 .6rem; }
.storage-info strong { color: var(--text); }
.progress-bar-wrap {
  width: 100%; max-width: 380px; height: 8px;
  background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: .5rem;
}
.progress-bar { height: 100%; background: var(--green); border-radius: 4px; transition: width .4s; }
.progress-bar.warn   { background: var(--warn); }
.progress-bar.danger { background: var(--accent); }
.warn-text { color: var(--warn); font-size: .82rem; margin-top: .3rem; }

.reset-form { text-align: center; min-width: 180px; }
.btn-reset {
  padding: 11px 20px; background: var(--accent); border: none; border-radius: 8px;
  color: white; cursor: pointer; font-size: .95rem; font-weight: 700;
  white-space: nowrap; transition: opacity .2s; width: 100%;
}
.btn-reset:hover { opacity: .85; }
.reset-hint { font-size: .75rem; color: var(--muted); margin-top: .5rem; line-height: 1.4; }

/* ── Toast ── */
.toast {
  padding: .8rem 1.2rem; border-radius: 8px; margin-bottom: 1rem;
  font-size: .9rem; font-weight: 600;
}
.toast.success { background: #1a3a2e; border: 1px solid #2ecc71; color: #2ecc71; }

/* ── Forms ── */
.url-form, .add-form { display: flex; gap: 8px; flex-wrap: wrap; }
.url-form input, .add-form input {
  flex: 1; min-width: 160px; padding: 9px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: .95rem;
}
.url-form button, .add-form button {
  padding: 9px 18px; background: var(--accent);
  border: none; border-radius: 7px; color: white; cursor: pointer;
  font-weight: 600; transition: opacity .2s;
}
.url-form button:hover, .add-form button:hover { opacity: .85; }

/* ── Site List ── */
.site-list { list-style: none; }
.site-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.site-list li:last-child { border-bottom: none; }
.site-link {
  text-decoration: none; color: var(--text); display: flex;
  flex-direction: column; gap: 2px; flex: 1;
  padding-right: .8rem;
}
.site-link:hover .site-name { color: var(--accent); }
.site-name { font-size: .95rem; }
.site-url  { font-size: .75rem; color: var(--muted); }
.btn-del {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 5px; cursor: pointer; padding: 4px 9px; font-size: .8rem;
  transition: all .2s; flex-shrink: 0;
}
.btn-del:hover { border-color: var(--accent); color: var(--accent); }
