/* ==========================================================
   AlidaScan Premium UI
   Visual layer only
   ========================================================== */

:root{
  --alida-bg:#f3f6fb;
  --alida-surface:#ffffff;
  --alida-surface-soft:#f8fafc;
  --alida-nav:#0b1220;
  --alida-nav-soft:#111c2e;
  --alida-text:#111827;
  --alida-muted:#6b7280;
  --alida-border:#e5eaf1;
  --alida-blue:#2563eb;
  --alida-blue-deep:#1d4ed8;
  --alida-cyan:#0ea5e9;
  --alida-green:#059669;
  --alida-orange:#ea580c;
  --alida-red:#dc2626;
  --alida-purple:#7c3aed;
  --alida-shadow:
    0 1px 2px rgba(15,23,42,.03),
    0 10px 28px rgba(15,23,42,.055);
  --alida-shadow-lg:
    0 18px 55px rgba(15,23,42,.13);
}


/* ==========================================================
   MAIN APP
   ========================================================== */

body.alida-app{
  margin:0;
  color:var(--alida-text);
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(37,99,235,.055),
      transparent 25rem
    ),
    radial-gradient(
      circle at 10% 20%,
      rgba(14,165,233,.04),
      transparent 24rem
    ),
    var(--alida-bg);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Pretendard",
    "Noto Sans KR",
    "Segoe UI",
    sans-serif !important;
  letter-spacing:-.015em;
}


/* ---------- Top Bar ---------- */

.alida-topbar{
  background:rgba(255,255,255,.91) !important;
  border-color:rgba(226,232,240,.9) !important;
  box-shadow:
    0 1px 0 rgba(15,23,42,.025),
    0 8px 30px rgba(15,23,42,.035);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.alida-topbar-inner{
  max-width:1520px !important;
  min-height:80px;
  padding:14px 28px !important;
}

.alida-brand-title{
  display:flex;
  align-items:center;
  gap:10px;
  color:#0f172a;
  font-size:20px !important;
  font-weight:800 !important;
  letter-spacing:-.035em;
}

.alida-brand-title i{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:0 !important;
  border-radius:11px;
  color:#fff !important;
  background:
    linear-gradient(
      145deg,
      #2563eb 0%,
      #0f56d8 55%,
      #073b9f 100%
    );
  box-shadow:
    0 8px 20px rgba(37,99,235,.24),
    inset 0 1px 0 rgba(255,255,255,.28);
}

.alida-brand-subtitle{
  margin-top:1px !important;
  margin-left:46px;
  color:#94a3b8 !important;
  font-size:11px !important;
  font-weight:500;
  letter-spacing:.02em;
}

.alida-status-group{
  align-items:center;
}

.alida-app .pill{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 11px !important;
  border:1px solid rgba(226,232,240,.9);
  font-weight:650;
  letter-spacing:-.015em;
  box-shadow:0 1px 2px rgba(15,23,42,.025);
}

.alida-status-group a.pill{
  border-color:#172033;
  background:#111827 !important;
  box-shadow:0 5px 14px rgba(15,23,42,.12);
}

.alida-status-group a.pill:hover{
  background:#020617 !important;
  transform:translateY(-1px);
}


/* ---------- Main Layout ---------- */

.alida-shell{
  width:100%;
  max-width:1520px !important;
  grid-template-columns:238px minmax(0,1fr) !important;
  gap:28px !important;
  padding:28px !important;
}

.alida-content{
  min-width:0;
  padding-bottom:42px;
}


/* ---------- Sidebar ---------- */

.alida-sidebar.card{
  position:sticky;
  top:108px;
  padding:13px !important;
  border:1px solid rgba(255,255,255,.04) !important;
  border-radius:22px !important;
  color:#dbe4f0;
  background:
    radial-gradient(
      circle at 15% -10%,
      rgba(59,130,246,.25),
      transparent 190px
    ),
    linear-gradient(
      180deg,
      #111b2d 0%,
      #0b1322 52%,
      #08101d 100%
    ) !important;
  box-shadow:
    0 18px 42px rgba(15,23,42,.17),
    inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.alida-sidebar .nav-btn{
  position:relative;
  min-height:46px;
  margin:2px 0;
  padding:0 14px !important;
  border:1px solid transparent;
  border-radius:12px !important;
  color:#9fb0c5;
  font-size:13px;
  font-weight:650;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.alida-sidebar .nav-btn i{
  width:29px !important;
  color:#71859e;
  font-size:14px;
  transition:color .18s ease;
}

.alida-sidebar .nav-btn:hover{
  color:#f8fafc;
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.045);
  transform:translateX(2px);
}

.alida-sidebar .nav-btn:hover i{
  color:#b9cdf0;
}

.alida-sidebar .nav-btn.tab-active{
  color:#fff !important;
  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.98),
      rgba(29,78,216,.92)
    ) !important;
  border-color:rgba(96,165,250,.35);
  box-shadow:
    0 10px 22px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.alida-sidebar .nav-btn.tab-active i{
  color:#fff;
}


/* ---------- Page Titles ---------- */

.alida-content h2.text-2xl{
  color:#101828;
  font-size:26px !important;
  font-weight:800 !important;
  letter-spacing:-.04em;
}

.alida-content h2.text-2xl + p{
  margin-top:5px !important;
  color:#7c8798 !important;
}

.alida-content h3{
  color:#172033;
  letter-spacing:-.025em;
}


/* ---------- Cards ---------- */

.alida-app .card{
  border:1px solid var(--alida-border) !important;
  border-radius:18px !important;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,1),
      rgba(255,255,255,.985)
    ) !important;
  box-shadow:var(--alida-shadow) !important;
}

.alida-app .card:hover{
  border-color:#dce3ed !important;
}

#tab-dashboard
.grid.sm\:grid-cols-2.xl\:grid-cols-6
> .card{
  position:relative;
  min-height:116px;
  padding:18px 18px 16px !important;
  overflow:hidden;
}

#tab-dashboard
.grid.sm\:grid-cols-2.xl\:grid-cols-6
> .card::after{
  content:"";
  position:absolute;
  width:66px;
  height:66px;
  right:-24px;
  top:-22px;
  border-radius:50%;
  background:rgba(37,99,235,.04);
}

#tab-dashboard
.grid.sm\:grid-cols-2.xl\:grid-cols-6
> .card
.text-xs{
  color:#8b95a7 !important;
  font-size:11px !important;
  font-weight:650;
}

#tab-dashboard
.grid.sm\:grid-cols-2.xl\:grid-cols-6
> .card
.text-3xl{
  margin-top:9px !important;
  color:#111827;
  font-size:31px !important;
  line-height:1;
  letter-spacing:-.045em;
}

#d-negative{
  color:#e66b19 !important;
}

#d-high{
  color:#dc2626 !important;
}

#d-risk{
  color:#6d4ee8 !important;
}


/* ---------- Chart cards ---------- */

#tab-dashboard
.grid.xl\:grid-cols-2
> .card{
  padding:20px !important;
}

#tab-dashboard
.grid.xl\:grid-cols-2
> .card h3{
  padding-bottom:13px;
  border-bottom:1px solid #f0f2f5;
  font-size:14px;
  font-weight:750;
}


/* ---------- AI Panel ---------- */

#tab-dashboard > .card.p-5{
  position:relative;
  border-color:#dbe6f7 !important;
  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f8fbff 100%
    ) !important;
}

#tab-dashboard > .card.p-5 h3 i{
  width:31px;
  height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:8px !important;
  border-radius:9px;
  background:#eaf2ff;
}


/* ---------- Buttons ---------- */

.alida-app button,
.alida-app a.pill{
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease;
}

.alida-app button:not(.nav-btn):hover{
  transform:translateY(-1px);
}

.alida-app button.bg-blue-600{
  background:
    linear-gradient(
      135deg,
      #2f6fec,
      #1d55d4
    ) !important;
  box-shadow:
    0 6px 14px rgba(37,99,235,.18);
}

.alida-app button.bg-slate-800,
.alida-app button.bg-slate-700{
  background:#172033 !important;
  box-shadow:
    0 5px 13px rgba(15,23,42,.12);
}

.alida-app button.bg-emerald-700{
  background:#087d64 !important;
}


/* ---------- Inputs ---------- */

.alida-app input:not([type="checkbox"]),
.alida-app textarea,
.alida-app select{
  min-height:42px;
  border:1px solid #dbe1ea !important;
  border-radius:11px !important;
  color:#182230;
  background:#fff !important;
  box-shadow:
    inset 0 1px 1px rgba(15,23,42,.015);
  outline:none;
  transition:
    border-color .16s ease,
    box-shadow .16s ease;
}

.alida-app textarea{
  padding-top:10px !important;
  padding-bottom:10px !important;
}

.alida-app input:not([type="checkbox"]):focus,
.alida-app textarea:focus,
.alida-app select:focus{
  border-color:#80a9f7 !important;
  box-shadow:
    0 0 0 3px rgba(37,99,235,.09) !important;
}

.alida-app input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color:#2563eb;
}


/* ---------- Tables ---------- */

.alida-app table{
  border-collapse:separate;
  border-spacing:0;
}

.alida-app thead{
  background:#f8fafc !important;
}

.alida-app th{
  height:46px;
  color:#7b8798 !important;
  font-size:11px;
  font-weight:700;
  letter-spacing:.015em;
  border-bottom:1px solid #edf0f4;
}

.alida-app td{
  color:#344054;
  border-color:#edf0f4 !important;
}

.alida-app tbody tr{
  transition:background .14s ease;
}

.alida-app tbody tr:hover{
  background:#fbfcfe;
}


/* ---------- Details / Setting panels ---------- */

.alida-app details.card{
  overflow:hidden;
}

.alida-app details > summary{
  min-height:66px;
  background:#fff;
}

.alida-app details[open] > summary{
  background:
    linear-gradient(
      180deg,
      #fff,
      #fbfcfe
    );
}

.alida-app details > summary span.font-bold{
  font-size:14px;
  font-weight:750;
}


/* ---------- Run actions ---------- */

#tab-run
.grid.lg\:grid-cols-3
> button.card{
  position:relative;
  min-height:154px;
  padding:24px !important;
  overflow:hidden;
}

#tab-run
.grid.lg\:grid-cols-3
> button.card:hover{
  transform:translateY(-3px);
  box-shadow:
    0 15px 32px rgba(15,23,42,.09) !important;
}

#tab-run
.grid.lg\:grid-cols-3
> button.card
.text-2xl{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:#f1f6ff;
}

#tab-run
.grid.lg\:grid-cols-3
> button.card:nth-child(2)
.text-2xl{
  background:#f3f1ff;
}

#tab-run
.grid.lg\:grid-cols-3
> button.card:nth-child(3)
.text-2xl{
  background:#edf9f5;
}


/* ---------- List Results ---------- */

#recent-issues > div,
#run-results > div{
  transition:background .14s ease;
}

#recent-issues > div:hover,
#run-results > div:hover{
  background:#fbfcff;
}


/* ---------- Toast ---------- */

#toast{
  border:1px solid rgba(255,255,255,.1);
  border-radius:13px !important;
  box-shadow:
    0 16px 45px rgba(15,23,42,.23) !important;
  backdrop-filter:blur(8px);
}


/* ==========================================================
   AUTH
   ========================================================== */

body.alida-auth{
  position:relative;
  overflow-x:hidden;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(37,99,235,.12),
      transparent 28rem
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(14,165,233,.08),
      transparent 28rem
    ),
    #f3f6fb !important;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Pretendard",
    "Noto Sans KR",
    "Segoe UI",
    sans-serif !important;
}

body.alida-auth::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(
      rgba(148,163,184,.055) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(148,163,184,.055) 1px,
      transparent 1px
    );
  background-size:36px 36px;
  mask-image:
    linear-gradient(
      to bottom,
      rgba(0,0,0,.55),
      transparent 85%
    );
}

body.alida-auth .alida-auth-card{
  position:relative;
  z-index:1;
  border:1px solid rgba(226,232,240,.88) !important;
  border-radius:24px !important;
  padding:38px 34px !important;
  background:rgba(255,255,255,.94) !important;
  box-shadow:
    0 28px 70px rgba(15,23,42,.12),
    0 2px 5px rgba(15,23,42,.04) !important;
  backdrop-filter:blur(16px);
}

body.alida-auth .alida-auth-logo{
  color:#101828;
  font-size:29px !important;
  font-weight:850 !important;
  letter-spacing:-.045em;
}

body.alida-auth .alida-auth-logo::before{
  content:"A";
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:10px;
  border-radius:12px;
  color:#fff;
  font-size:18px;
  font-weight:850;
  vertical-align:3px;
  background:
    linear-gradient(
      145deg,
      #2563eb,
      #154fc5
    );
  box-shadow:
    0 8px 20px rgba(37,99,235,.23);
}

body.alida-auth .alida-auth-sub{
  color:#8a95a6 !important;
}

body.alida-auth label{
  color:#344054;
}

body.alida-auth input{
  min-height:49px;
  border:1px solid #dbe1ea !important;
  border-radius:12px !important;
  background:#fff;
  outline:none;
  transition:
    border-color .16s ease,
    box-shadow .16s ease;
}

body.alida-auth input:focus{
  border-color:#7ca6f7 !important;
  box-shadow:
    0 0 0 4px rgba(37,99,235,.09);
}

body.alida-auth button{
  min-height:50px;
  border-radius:12px !important;
  background:
    linear-gradient(
      135deg,
      #2867e8,
      #194ebd
    ) !important;
  box-shadow:
    0 9px 18px rgba(37,99,235,.19);
  transition:
    transform .16s ease,
    box-shadow .16s ease;
}

body.alida-auth button:hover{
  transform:translateY(-1px);
  box-shadow:
    0 12px 23px rgba(37,99,235,.25);
}

body.alida-auth .error,
body.alida-auth .msg.error{
  border:1px solid #fee2e2;
  background:#fff5f5 !important;
}

body.alida-auth .success,
body.alida-auth .msg.success{
  border:1px solid #d1fae5;
  background:#f0fdf7 !important;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media(max-width:1023px){

  .alida-topbar-inner{
    padding:13px 16px !important;
  }

  .alida-brand-subtitle{
    display:none;
  }

  .alida-status-group{
    flex-wrap:wrap;
    justify-content:flex-end;
  }

  .alida-shell{
    display:block !important;
    padding:16px !important;
  }

  .alida-sidebar.card{
    position:static !important;
    display:grid;
    grid-template-columns:
      repeat(2,minmax(0,1fr));
    gap:5px;
    margin-bottom:18px;
    border-radius:18px !important;
  }

  .alida-sidebar .nav-btn{
    margin:0;
  }
}


@media(max-width:640px){

  .alida-topbar-inner{
    display:block !important;
  }

  .alida-status-group{
    margin-top:12px;
    justify-content:flex-start;
  }

  .alida-status-group .pill{
    font-size:10px;
  }

  .alida-brand-title{
    font-size:18px !important;
  }

  .alida-sidebar.card{
    grid-template-columns:1fr 1fr;
  }

  .alida-content h2.text-2xl{
    font-size:22px !important;
  }

  #tab-dashboard
  .grid.sm\:grid-cols-2.xl\:grid-cols-6
  > .card{
    min-height:100px;
  }

  body.alida-auth .alida-auth-card{
    padding:30px 24px !important;
    border-radius:20px !important;
  }
}

/* ALIDASCAN_SIDEBAR_CONTRAST_V1 */

/* 비활성 메뉴 */
.alida-sidebar .nav-btn {
    color: #334155 !important;
    font-weight: 600 !important;
}

.alida-sidebar .nav-btn i {
    color: #475569 !important;
}

/* 마우스 올렸을 때 */
.alida-sidebar .nav-btn:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

.alida-sidebar .nav-btn:hover i {
    color: #334155 !important;
}

/* 현재 선택 메뉴 */
.alida-sidebar .nav-btn.tab-active {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.alida-sidebar .nav-btn.tab-active i {
    color: #ffffff !important;
}

