@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{
  --bg:#0b1020;
  --border:rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --accent:#00d4ff;
  --accent2:#6b5bff;
  --shadow: 0 22px 70px rgba(0,0,0,.45);
  --radius:22px;
}

/* ✅ remove blue tap highlight + premium touch */
*{
  box-sizing:border-box;
  font-family:Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
}

html,body{
  height:100%;
  margin:0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0,212,255,.16), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(107,91,255,.20), transparent 45%),
    var(--bg);
  color:var(--text);
}

a{ color:var(--accent); text-decoration:none; -webkit-tap-highlight-color: rgba(0,0,0,0); }
a:hover{ text-decoration:underline; }

/* no annoying outline */
:focus{ outline:none; }
/* keep nice focus for keyboard users */
:focus-visible{
  box-shadow: 0 0 0 4px rgba(0,212,255,.18);
  border-color: rgba(0,212,255,.55);
}

button, a, input, .card, .tab{
  user-select:none;
  -webkit-user-select:none;
  touch-action: manipulation;
}

.hidden{ display:none !important; }

/* ===================== AUTH ===================== */
.auth-shell{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:24px;
}

.auth-card{
  width:min(460px, 100%);
  background: linear-gradient(180deg, rgba(15,22,48,.86), rgba(15,22,48,.72));
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding:22px;
  backdrop-filter: blur(12px);
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:14px;
}

/* ✅ logo box + fit */
.logo{
  width:54px;
  height:54px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background: linear-gradient(135deg, rgba(0,212,255,.25), rgba(107,91,255,.25));
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;              /* ✅ keep inside */
}

.logo.sm{
  width:42px;
  height:42px;
  border-radius:14px;
  overflow:hidden;
}

.logo img{
  width:100%;
  height:100%;
  object-fit: cover;            /* ✅ perfect fill */
  object-position: center;
  display:block;
}

.brand h1{ margin:0; font-size:20px; line-height:1.2; }
.brand p{ margin:2px 0 0; font-size:13px; color:var(--muted); }

.tabs{
  display:flex;
  gap:10px;
  margin:14px 0 10px;
}

.tab{
  flex:1;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}

.tab.active{
  border-color: rgba(0,212,255,.55);
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(107,91,255,.16));
}

.msg{
  min-height:18px;
  margin:6px 0 2px;
  font-size:13px;
  color: var(--muted);
}
.msg.ok{ color: #7CFFB2; }
.msg.err{ color: #ff8a8a; }

.form{ margin-top:10px; display:flex; flex-direction:column; gap:12px; }

.field{ display:flex; flex-direction:column; gap:6px; }
.field span{ font-size:12px; color:var(--muted); }

.field input{
  height:46px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding:0 14px;
  outline:none;
  font-weight:600;
  transition:.18s ease;
}
.field input:focus-visible{
  box-shadow: 0 0 0 4px rgba(0,212,255,.12);
  border-color: rgba(0,212,255,.55);
}

.btn{
  height:46px;
  border-radius:16px;
  border:1px solid rgba(0,212,255,.45);
  background: linear-gradient(135deg, rgba(0,212,255,.22), rgba(107,91,255,.18));
  color: var(--text);
  font-weight:900;
  cursor:pointer;
  transition: .18s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.btn.ghost{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

.hint{
  margin:0;
  font-size:12px;
  color: var(--muted);
  text-align:center;
}

/* ✅ hint link premium */
.hint a{
  color: var(--accent);
  font-weight:900;
}
.hint a:active{ opacity:.85; }

.footer{
  margin-top:16px;
  font-size:12px;
  color: var(--muted);
  text-align:center;
}

/* ===================== DASHBOARD (Premium) ===================== */
.dash-shell{
  min-height:100vh;
  padding:18px;
  max-width:1200px;
  margin:0 auto;
}

.dash-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;

  padding:16px 16px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:24px;

  background: linear-gradient(135deg,
    rgba(0,212,255,.12),
    rgba(107,91,255,.10),
    rgba(15,22,48,.55)
  );

  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
}

.dash-left{
  display:flex;
  align-items:center;
  gap:12px;
}
.dash-left h2{
  margin:0;
  font-size:18px;
  letter-spacing:.2px;
}
.sub{
  margin:2px 0 0;
  font-size:12px;
  color: rgba(234,240,255,.75);
}

.dash-right{ display:flex; gap:10px; }

.dash-main{ padding:16px 2px 6px; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:14px 0 14px;
}

.search{
  flex:1;
  height:46px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  color: var(--text);
  padding:0 14px;
  outline:none;
  font-weight:600;
  transition: .18s ease;
}
.search:focus-visible{
  box-shadow: 0 0 0 4px rgba(0,212,255,.12);
  border-color: rgba(0,212,255,.55);
}

.count{
  min-width:52px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.8);
  font-weight:900;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.card{
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(15,22,48,.62), rgba(15,22,48,.42));
  padding:16px;

  box-shadow:
    0 18px 55px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.06);

  cursor:pointer;
  transition: .18s ease;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,212,255,.18), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(107,91,255,.18), transparent 45%);
  opacity:0;
  transition:.18s ease;
}

.card:hover::before{ opacity:1; }
.card:hover{
  transform: translateY(-3px);
  border-color: rgba(0,212,255,.35);
}
.card:active{ transform: translateY(-1px); }

.card h3{
  margin:0;
  font-size:15px;
  letter-spacing:.2px;
}
.card p{
  margin:8px 0 0;
  font-size:12px;
  color: rgba(234,240,255,.72);
  line-height:1.5;
}

.tag{
  margin-top:12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color: rgba(234,240,255,.78);

  border:1px solid rgba(255,255,255,.10);
  padding:7px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
}

.empty{
  margin-top:22px;
  text-align:center;
  color: rgba(234,240,255,.72);
}

.dash-footer{
  margin-top:18px;
  text-align:center;
  font-size:12px;
  color: rgba(234,240,255,.65);
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
  .dash-header{ flex-direction:column; align-items:stretch; }
  .dash-right{ display:flex; justify-content:flex-end; }
}
