/* =========================
RESET
========================= */
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:Arial, sans-serif;
}

html,body{
  height:100%;
}

body{
  background:
    radial-gradient(circle at top left, #1e3a8a 0%, transparent 35%),
    radial-gradient(circle at top right, #0f766e 0%, transparent 30%),
    linear-gradient(135deg, #07101d 0%, #08111f 45%, #0b1324 100%);
  color:white;
}

button,input,textarea,select{
  font:inherit;
}

button{
  cursor:pointer;
}

.hidden{
  display:none !important;
}


/* =========================
BASE
========================= */
.icon-btn{
  border:none;
  background:transparent;
  color:white;
  font-size:24px;
}

.card{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:24px;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}


/* =========================
LOCK
========================= */
.lock-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.lock-card{
  width:100%;
  max-width:420px;
  padding:32px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:28px;
  backdrop-filter:blur(20px);
}

.lock-card h1{
  margin-bottom:8px;
}

.lock-card p{
  color:#cbd5e1;
  margin-bottom:16px;
}

.lock-card input,
.lock-card button{
  width:100%;
  margin-top:12px;
  padding:14px 16px;
  border:none;
  border-radius:14px;
}

.lock-card input{
  background:rgba(15,23,42,.9);
  color:white;
}

.lock-card button{
  background:#2563eb;
  color:white;
  font-weight:700;
}

#lock-msg{
  margin-top:12px;
  color:#fca5a5;
}


/* =========================
APP
========================= */
.app-shell{
  display:flex;
  min-height:100vh;
}


/* =========================
SIDEBAR
========================= */
.sidebar{
  width:260px;
  flex-shrink:0;
  padding:24px;
  border-right:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  backdrop-filter:blur(20px);
}

.brand{
  margin-bottom:28px;
}

.brand h2{
  margin-bottom:6px;
}

.brand small{
  color:#cbd5e1;
}

.menu{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.menu button{
  border:none;
  border-radius:14px;
  padding:14px 16px;
  text-align:left;
  color:white;
  background:rgba(255,255,255,.06);
}

.menu button:hover{
  background:rgba(255,255,255,.12);
}


/* =========================
MAIN
========================= */
.main{
  flex:1;
  min-width:0;
  height:100vh;
  overflow-y:auto;
  overflow-x:hidden;
}


/* =========================
STICKY HEADER
========================= */
.main-header{
  position:sticky;
  top:0;
  left:0;
  right:0;
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 24px;
  background:rgba(8,17,31,.92);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,.08);
}

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

.header-brand h1{
  font-size:26px;
  margin-bottom:4px;
}

.header-brand small{
  color:#cbd5e1;
}

.add-btn{
  width:52px;
  height:52px;
  border:none;
  border-radius:16px;
  font-size:30px;
  line-height:1;
  color:white;
  background:#2563eb;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}


/* =========================
CONTENT
========================= */
.main-content{
  padding:24px;
}


/* =========================
MODAL
========================= */
.modal-root{
  position:fixed;
  inset:0;
  z-index:1000;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}

.modal-card{
  position:relative;
  z-index:2;
  width:min(720px, calc(100vw - 24px));
  max-height:85vh;
  margin:60px auto;
  overflow:auto;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:28px;
  backdrop-filter:blur(22px);
  padding:22px;
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}

.modal-tabs{
  display:flex;
  gap:10px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.modal-tabs button{
  border:none;
  border-radius:14px;
  padding:12px 16px;
  color:white;
  background:rgba(255,255,255,.08);
}

.modal-content{
  min-height:200px;
}


/* =========================
MOBILE TOPBAR
========================= */
.mobile-topbar{
  display:none;
}


/* =========================
RESPONSIVE
========================= */
@media(max-width:760px){

  .mobile-topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:60px;
    z-index:700;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 16px;
    background:rgba(8,17,31,.92);
    backdrop-filter:blur(20px);
    border-bottom:1px solid rgba(255,255,255,.08);
  }

  .brand-mobile{
    font-weight:700;
  }

  .mobile-space{
    margin-left:auto;
  }

  .sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:-280px;
    z-index:900;
    transition:.25s;
  }

  .sidebar.open{
    left:0;
  }

  .main{
    padding-top:60px;
  }

  .main-header{
    padding:16px;
  }

  .header-brand h1{
    font-size:22px;
  }

  .header-brand small{
    display:none;
  }

  #desktop-menu-btn{
    display:none;
  }

  .modal-card{
    margin:70px auto;
  }
}