/* TECNO UNIVERSITY — v6 redesign (light aurora + clean glass) */
:root{
  --top-h:56px;
  --top-h-mobile:48px;

  --bg0:#f7fbff;
  --bg1:#eef6ff;
  --bg2:#f6f0ff;
  --card:rgba(255,255,255,0.72);
  --card2:rgba(255,255,255,0.86);
  --stroke:rgba(15,40,70,0.10);
  --shadow: 0 18px 55px rgba(10,30,60,0.14);
  --text:#0b1220;
  --muted:rgba(11,18,32,0.62);
  --accent:#00b8ff;      /* TECNO-ish cyan */
  --accent2:#6b5cff;     /* violet */
  --danger:#ff3d6b;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 12% 10%, rgba(0,184,255,0.22), transparent 60%),
    radial-gradient(850px 620px at 88% 20%, rgba(107,92,255,0.18), transparent 55%),
    radial-gradient(1100px 700px at 55% 110%, rgba(0,184,255,0.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, var(--bg2));
  overflow-x:hidden;
}

/* Subtle animated aurora layer */
.bg{
  position:fixed; inset:-20%;
  background:
    radial-gradient(700px 420px at 18% 22%, rgba(0,184,255,0.18), transparent 60%),
    radial-gradient(720px 520px at 78% 28%, rgba(107,92,255,0.16), transparent 62%),
    radial-gradient(900px 650px at 52% 78%, rgba(0,184,255,0.10), transparent 60%);
  filter: blur(30px);
  opacity:0.85;
  pointer-events:none;
  animation: floaty 10s ease-in-out infinite alternate;
}
@keyframes floaty{
  from{transform: translate3d(-10px,-6px,0) scale(1);}
  to{transform: translate3d(10px,8px,0) scale(1.02);}
}

.wrap, .shell{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 16px;
}
.shell.wide{padding:86px 16px 44px;}

.card{
  width:min(980px, 100%);
  border-radius:26px;
  background:linear-gradient(180deg, var(--card), rgba(255,255,255,0.55));
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding:22px;
}

h1{margin:0 0 8px;font-size:28px;letter-spacing:0.2px;}
.sub{margin:0 0 16px;color:var(--muted);line-height:1.35;}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
}
.brand img.logo{
  height:96px;
  width:auto;
  max-width:min(92vw, 420px);
  object-fit:contain;
  filter: drop-shadow(0 14px 26px rgba(10,30,60,0.16));
}

/* Inputs */
label.lbl, label{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin:10px 0 6px;
}
input.inp, input, select.select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.14);
  background:rgba(255,255,255,0.85);
  color:var(--text);
  outline:none;
}
input:focus, input.inp:focus, select.select:focus{
  border-color: rgba(0,184,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,184,255,0.14);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.12);
  background:
    linear-gradient(135deg, rgba(0,184,255,0.95), rgba(107,92,255,0.92));
  color:#fff;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
  box-shadow: 0 10px 26px rgba(0,90,150,0.18);
}
.btn:hover{transform: translateY(-1px);}
.btn:active{transform: translateY(0px);}
.btn.secondary{
  background: rgba(255,255,255,0.85);
  color: var(--text);
  border-color: rgba(15,40,70,0.12);
  box-shadow: 0 10px 26px rgba(10,30,60,0.10);
}
.btn.ghost{
  background: rgba(255,255,255,0.55);
  color: var(--text);
  border-color: rgba(15,40,70,0.10);
  box-shadow: none;
}
.btn.danger{
  background: rgba(255,61,107,0.92);
  border-color: rgba(255,61,107,0.30);
}
.btn.small{padding:9px 10px;border-radius:12px;font-weight:800;}

.muted{color:var(--muted);}
.err, .error{color:var(--danger);margin-top:10px;white-space:pre-wrap;display:none;}

.row{display:flex;gap:12px;}
.row > div{flex:1;}
.row > input{flex:1;min-width:0;}
.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap;}
.link{color:rgba(0,110,200,0.95);text-decoration:none;font-weight:800;}
.link:hover{text-decoration:underline;}

/* ===== Fixed header (Hub/Admin) ===== */
.top{
  position:fixed; top:0; left:0; right:0;
  z-index:20;
  height: var(--top-h);
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.60));
  border-bottom:1px solid rgba(15,40,70,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.top .brand{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.top .brand img{display:block;}
.logo.small{
  height:34px;
  width:auto;
  max-width: 240px;
  object-fit:contain;
  filter: drop-shadow(0 8px 18px rgba(10,30,60,0.12));
}
.top-title{
  font-weight:900;
  color:var(--text);
  font-size:14px;
  letter-spacing:0.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.icon-btn{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 10px 24px rgba(10,30,60,0.10);
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
}
.icon-btn:active{transform: translateY(1px);}
.icon-dots{
  width:4px;height:4px;border-radius:999px;
  background: rgba(15,40,70,0.75);
  position:relative;
}
.icon-dots::before,.icon-dots::after{
  content:"";
  width:4px;height:4px;border-radius:999px;
  background: rgba(15,40,70,0.75);
  position:absolute; left:0;
}
.icon-dots::before{ top:-7px; }
.icon-dots::after{ top:7px; }

.menu{
  position:absolute;
  top:54px;
  right:10px;
  min-width: 220px;
  padding:8px;
  border-radius:16px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 20px 50px rgba(10,30,60,0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.menu-user{
  padding:10px 10px 8px;
  font-size:12px;
  color:var(--muted);
  line-height:1.25;
}
.menu-sep{
  height:1px;
  background: rgba(15,40,70,0.10);
  margin:6px 8px;
}
.menu-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-weight:900;
  color: var(--text);
}
.menu-item:hover{background: rgba(120,170,230,0.16);}
.menu-item.danger{color: rgba(200,30,60,0.92);}
.menu-item.danger:hover{background: rgba(220,40,70,0.10);}

/* Mobile header: ultra-compact */
@media (max-width: 520px){
  /* Force fixed, small header height */
  .top{height: var(--top-h-mobile); padding:0 8px;}
  .logo.small{height:20px; max-width: 60vw; filter:none;}
  .icon-btn{width:24px; height:24px; border-radius:10px;}
  /* Keep content below the fixed header */
  .shell.wide{padding-top: calc(var(--top-h-mobile) + 18px);} 
  .menu{top: calc(var(--top-h-mobile) + 6px); right:8px; min-width: 200px;}
  .top-title{display:none;}
}

@media (max-width: 380px){
  .top{height: 44px; padding:0 8px;}
  .logo.small{height:18px; max-width: 64vw;}
  .icon-btn{width:24px; height:24px; border-radius:10px;}
  .shell.wide{padding-top: 62px;}
  .menu{top: 50px;}
}

/* ===== Projects (Hub) ===== */
.projects{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}
.proj{
  border-radius:22px;
  border:1px solid rgba(15,40,70,0.10);
  background:linear-gradient(180deg, var(--card2), rgba(255,255,255,0.62));
  padding:18px;
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow: 0 10px 28px rgba(10,30,60,0.10);
}
.proj-title{font-size:18px;font-weight:900;margin-bottom:6px;}
.proj-sub{color:var(--muted);font-size:13px;line-height:1.35;}

.proj-test-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:10px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(0,110,200,0.18);
  background:rgba(0,110,200,0.08);
  color:rgba(11,18,32,0.85);
  font-size:12px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
}

/* ===== Admin Tables / Panels ===== */
.panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.58));
  border:1px solid rgba(15,40,70,0.10);
  border-radius:20px;
  padding:16px;
}
.table-wrap{overflow:auto;border-radius:16px;border:1px solid rgba(15,40,70,0.10);background:rgba(255,255,255,0.55);}
table{width:100%;border-collapse:collapse;}
th,td{padding:10px 8px;border-bottom:1px solid rgba(15,40,70,0.08);text-align:left;font-size:13px;}
th{color:rgba(11,18,32,0.84);font-weight:900;}

.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.footerLinks{margin-top:14px;display:flex;gap:12px;flex-wrap:wrap;}
.footerLinks a{color:rgba(0,110,200,0.95);text-decoration:none;font-weight:800;}
.footerLinks a:hover{text-decoration:underline;}

/* ===== Tabs ===== */
.tabs{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap;}
.tabbtn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.10);
  background:rgba(255,255,255,0.60);
  color:var(--muted);
  cursor:pointer;
  font-weight:900;
}
.tabbtn.active{
  color: var(--text);
  border-color: rgba(0,184,255,0.30);
  background: rgba(0,184,255,0.16);
}

/* ===== Modal ===== */
.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:18px;}
.modal-backdrop{position:absolute;inset:0;background:rgba(10,20,40,0.45);}
.modal-card{
  position:relative;
  width:min(520px, 100%);
  border-radius:22px;
  background:linear-gradient(180deg, var(--card2), rgba(255,255,255,0.62));
  border:1px solid rgba(15,40,70,0.10);
  box-shadow: 0 18px 60px rgba(10,30,60,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding:18px;
}
.modal-title{font-size:18px;font-weight:950;margin-bottom:6px;}
.modal-sub{color:var(--muted);font-size:13px;line-height:1.35;margin-bottom:10px;}

/* Multi-select */
.ms{ border:1px solid rgba(255,255,255,0.12); border-radius:12px; padding:10px; background:rgba(0,0,0,0.12); }
.ms-head{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.ms-search{ flex:1; min-width:160px; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.12); background:rgba(0,0,0,0.18); color:inherit; }
.ms-actions{ display:flex; gap:8px; }
.ms-list{ max-height:240px; overflow:auto; display:flex; flex-direction:column; gap:6px; padding-right:6px; }
.ms-item{ display:flex; gap:8px; align-items:center; padding:6px 8px; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); cursor:pointer; }
.ms-item input{ transform: translateY(1px); }
.ms-id{ margin-left:auto; opacity:0.55; font-size:12px; }
