:root{
  --bg:#080b10;
  --panel:#0f141c;
  --panel-2:#121923;
  --line:#202a38;
  --text:#f4f7fb;
  --muted:#8f9bae;
  --accent:#7c8cff;
  --healthy:#3bd685;
  --warning:#f6c85f;
  --down:#ff6476;
  --pending:#8995a8;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-right:env(safe-area-inset-right,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-left:env(safe-area-inset-left,0px);
}

*{box-sizing:border-box}
html{background:var(--bg);min-height:100%;min-height:100dvh}
body{
  margin:0;
  background:
    radial-gradient(circle at 20% 0%,rgba(124,140,255,.08),transparent 30%),
    var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  min-height:100%;
  min-height:100dvh;
}

a{color:inherit;text-decoration:none}
button,input{font:inherit}

.app-shell{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:260px 1fr}

.sidebar{
  position:sticky;top:0;height:100vh;height:100dvh;
  border-right:1px solid var(--line);
  background:rgba(8,11,16,.94);
  padding:24px 18px;
  display:flex;flex-direction:column;gap:28px;
  backdrop-filter:blur(16px);
}

.sidebar-brand{display:flex;align-items:center;gap:12px}
.sidebar-brand strong{display:block}
.sidebar-brand span{display:block;color:var(--muted);font-size:12px;margin-top:2px}

.brand-mark{
  width:52px;height:52px;border-radius:15px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#8c98ff,#5366ff);
  font-weight:900;font-size:22px;
  box-shadow:0 12px 40px rgba(83,102,255,.25);
}
.brand-mark.small{width:38px;height:38px;border-radius:11px;font-size:17px}

.nav{display:grid;gap:8px}
.nav a{padding:12px 14px;border-radius:10px;color:var(--muted)}
.nav a:hover,.nav a.active{background:var(--panel-2);color:var(--text)}

.sidebar-footer{
  margin-top:auto;color:var(--muted);font-size:12px;
  display:flex;align-items:center;gap:8px
}
.system-dot{width:8px;height:8px;border-radius:50%;background:var(--healthy);box-shadow:0 0 14px var(--healthy)}


.sidebar-backdrop{display:none}

.main{min-width:0}
.topbar,.detail-topbar{
  min-height:calc(92px + var(--safe-top));
  padding:calc(18px + var(--safe-top)) calc(28px + var(--safe-right)) 18px calc(28px + var(--safe-left));
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:18px;
  background:rgba(8,11,16,.7);backdrop-filter:blur(12px);
  position:sticky;top:0;z-index:20;
}
.topbar h1,.detail-topbar h1{margin:2px 0 0;font-size:24px}
.topbar-actions{margin-left:auto;display:flex;gap:10px}
.detail-topbar{justify-content:space-between}
.eyebrow{margin:0;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.16em}
.muted{color:var(--muted)}

.content{padding:28px;max-width:1500px;margin:0 auto}
.detail-content{max-width:1250px}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin-bottom:20px;
}
.summary-card{
  min-height:115px;padding:18px;border:1px solid var(--line);border-radius:16px;
  background:linear-gradient(180deg,var(--panel-2),var(--panel));
  display:flex;flex-direction:column;justify-content:space-between;
}
.summary-card span{color:var(--muted);font-size:12px}
.summary-card strong{font-size:30px}
.summary-card strong.small-value{font-size:14px;line-height:1.4}
.summary-card.healthy{border-color:rgba(59,214,133,.25)}
.summary-card.warning{border-color:rgba(246,200,95,.25)}
.summary-card.down{border-color:rgba(255,100,118,.25)}
.summary-card.pending{border-color:rgba(137,149,168,.25)}

.panel{
  border:1px solid var(--line);border-radius:18px;
  background:rgba(15,20,28,.88);
  margin-bottom:20px;overflow:hidden;
}
.panel-header{
  padding:20px 22px;border-bottom:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;gap:18px
}
.panel-header h2{margin:3px 0 0;font-size:18px}
.panel-note{color:var(--muted);font-size:12px}

.project-grid{
  padding:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px
}
.project-card{
  border:1px solid var(--line);border-radius:15px;padding:18px;
  background:var(--panel-2);transition:.2s transform,.2s border-color
}
.project-card:hover{transform:translateY(-2px);border-color:#344157}
.project-card.healthy{box-shadow:inset 3px 0 0 var(--healthy)}
.project-card.warning{box-shadow:inset 3px 0 0 var(--warning)}
.project-card.down{box-shadow:inset 3px 0 0 var(--down)}
.project-card.pending{box-shadow:inset 3px 0 0 var(--pending)}

.project-card-head{display:flex;justify-content:space-between;gap:14px}
.project-card h3{margin:10px 0 0;font-size:17px}
.arrow{color:var(--muted)}

.status-pill{
  display:inline-flex;padding:5px 8px;border-radius:999px;
  font-size:9px;font-weight:900;letter-spacing:.08em
}
.status-pill.healthy{background:rgba(59,214,133,.12);color:var(--healthy)}
.status-pill.warning{background:rgba(246,200,95,.12);color:var(--warning)}
.status-pill.down{background:rgba(255,100,118,.12);color:var(--down)}
.status-pill.pending,.status-pill.disabled{background:rgba(137,149,168,.12);color:var(--pending)}

.metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:22px 0}
.metric-row div{padding:10px;border:1px solid var(--line);border-radius:10px}
.metric-row span,.project-meta span{display:block;color:var(--muted);font-size:10px;margin-bottom:5px}
.metric-row strong{font-size:13px}
.project-meta{display:flex;justify-content:space-between;gap:10px;font-size:11px}
.project-meta strong{font-weight:600;text-align:right}

.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:700px}
th,td{padding:14px 18px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}
th{color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
tbody tr:hover{background:rgba(255,255,255,.015)}

.btn{
  border:1px solid var(--line);border-radius:10px;padding:10px 14px;
  background:var(--panel-2);color:var(--text);cursor:pointer;font-weight:700;font-size:12px
}
.btn:hover{border-color:#39475a}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-primary{background:#6575ff;border-color:#6575ff}
.btn-secondary{background:var(--panel-2)}
.btn-ghost{background:transparent}

.icon-btn{
  display:none;width:40px;height:40px;border-radius:10px;
  border:1px solid var(--line);background:var(--panel);color:var(--text)
}

.alert{padding:12px 14px;border-radius:10px;font-size:12px;margin:14px 0}
.alert-danger{border:1px solid rgba(255,100,118,.35);background:rgba(255,100,118,.1);color:#ff98a5}
.empty-state{padding:30px;color:var(--muted)}

.login-body{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left))}
.login-shell{width:min(430px,100%)}
.login-card{
  border:1px solid var(--line);border-radius:22px;padding:32px;
  background:linear-gradient(180deg,var(--panel-2),var(--panel));
  box-shadow:0 30px 100px rgba(0,0,0,.35)
}
.login-card h1{margin:10px 0 6px}
.login-form{display:grid;gap:14px;margin-top:26px}
.login-form label{font-size:12px;color:var(--muted)}
.login-form input{
  width:100%;margin-top:7px;padding:13px 14px;border-radius:10px;
  border:1px solid var(--line);background:#090d13;color:var(--text);outline:none
}
.login-form input:focus{border-color:#6575ff}
.login-form .btn{margin-top:4px;padding:13px}

.skeleton{animation:pulse 1.25s infinite alternate}
@keyframes pulse{from{opacity:.45}to{opacity:.85}}

@media(max-width:1100px){
  .summary-grid{grid-template-columns:repeat(3,1fr)}
  .project-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:820px){
  .app-shell{display:block}
  .sidebar{
    position:fixed;z-index:50;left:-280px;width:260px;transition:left .2s;
    height:100dvh;
    padding-top:calc(24px + var(--safe-top));
    padding-bottom:calc(24px + var(--safe-bottom));
    padding-left:calc(18px + var(--safe-left))
  }
  .sidebar.open{left:0}
  .sidebar-backdrop{
    display:block;position:fixed;inset:0;z-index:45;
    width:100%;height:100%;padding:0;margin:0;border:0;
    background:rgba(2,5,9,.62);
    opacity:0;visibility:hidden;pointer-events:none;
    transition:opacity .2s ease,visibility .2s ease;
    -webkit-tap-highlight-color:transparent;
  }
  .sidebar.open + .sidebar-backdrop{
    opacity:1;visibility:visible;pointer-events:auto;
  }
  body.sidebar-open{overflow:hidden;overscroll-behavior:none}
  .icon-btn{display:grid;place-items:center}
  .topbar{
    min-height:calc(72px + var(--safe-top));
    padding:calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) 14px calc(16px + var(--safe-left));
  }
  .content{padding:16px}
  .summary-grid{grid-template-columns:repeat(2,1fr)}
  .project-grid{grid-template-columns:1fr;padding:14px}
  .topbar-actions .btn-ghost{display:none}
}
@media(max-width:520px){
  .summary-grid{grid-template-columns:1fr 1fr}
  .summary-card{min-height:95px}
  .summary-card strong{font-size:24px}
  .panel-header{align-items:flex-start;flex-direction:column}
  .detail-topbar{
    min-height:calc(68px + var(--safe-top));
    padding:calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 12px calc(12px + var(--safe-left));
    gap:10px
  }
  .detail-topbar h1{font-size:18px}
}

.user-chip{
  display:flex;flex-direction:column;justify-content:center;align-items:flex-end;
  padding:6px 10px;border-right:1px solid var(--line)
}
.user-chip span{font-size:11px;font-weight:800}
.user-chip small{font-size:9px;color:var(--muted);letter-spacing:.12em;margin-top:2px}
@media(max-width:820px){.user-chip{display:none}}


/* ============================================================
   V1.2 LIST + MODAL MANAGER
   ============================================================ */

.list-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.search-input{
  min-width:240px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;
  background:#090d13;color:var(--text);outline:none;font-size:12px
}
.search-input:focus{border-color:#6575ff}

.project-list-head,
.project-row{
  display:grid;
  grid-template-columns:minmax(250px,2fr) 120px 80px 110px minmax(170px,1fr) 32px;
  align-items:center;
  gap:14px;
}
.project-list-head{
  padding:11px 18px;
  color:var(--muted);
  border-bottom:1px solid var(--line);
  font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase
}
.project-list{display:grid}
.project-row{
  width:100%;padding:14px 18px;border:0;border-bottom:1px solid var(--line);
  background:transparent;color:var(--text);text-align:left;cursor:pointer
}
.project-row:last-child{border-bottom:0}
.project-row:hover,.project-row:focus-visible{background:rgba(255,255,255,.025);outline:none}
.project-main{display:flex;align-items:center;gap:12px;min-width:0}
.project-main > span:last-child{min-width:0}
.project-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.project-main small{display:block;margin-top:3px;color:var(--muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto}
.status-dot.healthy{background:var(--healthy);box-shadow:0 0 12px rgba(59,214,133,.35)}
.status-dot.warning{background:var(--warning)}
.status-dot.down{background:var(--down)}
.status-dot.pending,.status-dot.disabled{background:var(--pending)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.row-arrow{font-size:22px;color:var(--muted);text-align:right}

body.modal-open{overflow:hidden}
.modal-backdrop{
  position:fixed;inset:0;z-index:100;
  display:grid;place-items:center;padding:24px;
  background:rgba(2,5,9,.78);backdrop-filter:blur(10px)
}
.modal-backdrop[hidden]{display:none}
.modal-card{
  width:min(620px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  border:1px solid #2a3545;border-radius:20px;
  background:#0d131c;
  box-shadow:0 30px 100px rgba(0,0,0,.48)
}
.modal-card.modal-large{width:min(1080px,100%)}
.modal-header{
  position:sticky;top:0;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:20px 22px;border-bottom:1px solid var(--line);
  background:rgba(13,19,28,.96);backdrop-filter:blur(12px)
}
.modal-header h2{margin:3px 0 0;font-size:20px}
.modal-close{
  width:42px;height:42px;border-radius:12px;border:1px solid var(--line);
  background:#121923;color:var(--text);font-size:25px;cursor:pointer
}
.modal-body{padding:22px}
.detail-status-line{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}
.detail-status-line .mono{color:var(--muted);font-size:11px}
.detail-metrics{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px
}
.detail-metrics article{
  min-height:96px;padding:14px;border:1px solid var(--line);border-radius:13px;background:#111923;
  display:flex;flex-direction:column;justify-content:space-between
}
.detail-metrics span{font-size:10px;color:var(--muted)}
.detail-metrics strong{font-size:21px}
.detail-metrics strong.small{font-size:12px;line-height:1.4}
.detail-url{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:13px;background:#0a0f16}
.detail-url span{display:block;color:var(--muted);font-size:10px;margin-bottom:7px}
.detail-url code{font-size:11px;overflow-wrap:anywhere;color:#cbd5e1}
.modal-section-title{margin:24px 0 10px}
.modal-section-title h3{margin:3px 0 0;font-size:16px}
.modal-table{border:1px solid var(--line);border-radius:13px}
.modal-table table{min-width:650px}

.add-project-form{display:grid;gap:15px}
.add-project-form label{font-size:11px;color:var(--muted)}
.add-project-form input{
  width:100%;margin-top:7px;padding:13px 14px;border-radius:10px;
  border:1px solid var(--line);background:#090d13;color:var(--text);outline:none;font-size:14px
}
.add-project-form input:focus{border-color:#6575ff}
.info-strip{
  padding:12px 14px;border:1px solid #263248;border-radius:11px;
  background:#111925;color:#aeb9ca;font-size:11px;line-height:1.5
}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:5px}
.alert-success{border:1px solid rgba(59,214,133,.3);background:rgba(59,214,133,.1);color:#72e6a6}

@media(max-width:900px){
  .project-list-head{display:none}
  .project-row{
    grid-template-columns:minmax(0,1fr) auto auto;
    gap:10px 12px;
    padding:15px 16px
  }
  .project-row > span:nth-child(4),
  .project-row > span:nth-child(5){display:none}
  .project-row > span:nth-child(3)::before{content:"HTTP ";color:var(--muted);font-family:inherit;font-size:9px}
  .row-arrow{display:block}
  .detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .search-input{width:100%;min-width:0}
  .list-tools{width:100%}
  .project-row{grid-template-columns:minmax(0,1fr) auto 24px}
  .project-row > span:nth-child(3){display:none}
  .detail-metrics{grid-template-columns:1fr 1fr}
  .modal-backdrop{padding:10px}
  .modal-card{max-height:calc(100vh - 20px);border-radius:15px}
  .modal-header,.modal-body{padding:16px}
  .modal-actions{flex-direction:column-reverse}
  .modal-actions .btn{width:100%}
}


/* ============================================================
   V1.2.2 ENTERPRISE MODAL FIX
   Only Check History scrolls
   ============================================================ */

.modal-card.modal-large {
    height: 92vh;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-large .modal-header {
    flex: 0 0 auto;
}

.modal-card.modal-large .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-large .modal-body > .table-wrap.modal-table {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-table {
    scrollbar-width: thin;
    scrollbar-color: #344154 transparent;
}

.modal-table::-webkit-scrollbar {
    width: 6px;
}

.modal-table::-webkit-scrollbar-track {
    background: transparent;
}

.modal-table::-webkit-scrollbar-thumb {
    background: #344154;
    border-radius: 999px;
}

.modal-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0d131c;
}

@media(max-width:900px){
    .modal-card.modal-large {
        height: 94vh;
        max-height: 94vh;
    }
}


/* ============================================================
   V1.3 iOS STYLE MODAL EXPERIENCE
   ============================================================ */

.modal-backdrop {
    overflow: hidden;
    backdrop-filter: blur(18px);
    background: rgba(0,0,0,.68);
}

.modal-card.modal-large {
    height: 86vh;
    max-height: 86vh;
    overflow: hidden !important;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 30px 80px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.05);
    animation: watchdogSheetIn .25s cubic-bezier(.2,.8,.2,1);
}

@keyframes watchdogSheetIn {
    from {
        opacity:0;
        transform:scale(.96) translateY(20px);
    }
    to {
        opacity:1;
        transform:scale(1) translateY(0);
    }
}

.modal-card.modal-large .modal-header {
    flex:0 0 auto;
    padding:28px;
}

.modal-card.modal-large .modal-body {
    flex:1 1 0;
    min-height:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.detail-metrics article {
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.02)
        );
    backdrop-filter:blur(12px);
    border-radius:20px;
}

.modal-card.modal-large .modal-body > .table-wrap.modal-table {
    flex:1 1 0;
    min-height:120px;
    max-height:none;
    overflow-y:auto;
    overflow-x:hidden;
}

.modal-table::-webkit-scrollbar {
    width:4px;
}

.modal-table::-webkit-scrollbar-track {
    background:transparent;
}

.modal-table::-webkit-scrollbar-thumb {
    background:rgba(255,255,255,.25);
    border-radius:100px;
}

.modal-table {
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.25) transparent;
}

.modal-table thead th {
    position:sticky;
    top:0;
    background:#0d131c;
    z-index:3;
}

@media(max-width:900px){
    .modal-card.modal-large {
        height:92vh;
        max-height:92vh;
        border-radius:22px;
    }
}

/* ============================================================
   V1.3.1 STRUCTURAL MODAL FIX
   The modal itself never scrolls. Only history rows can scroll.
   ============================================================ */
#projectModal.modal-backdrop {
  overflow: hidden !important;
}

#projectModal .modal-card.modal-large {
  height: min(86vh, 820px);
  max-height: calc(100dvh - 48px);
  overflow: clip !important;
  display: flex;
  flex-direction: column;
}

#projectModal .modal-header {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

#projectModal .modal-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

#projectModal .detail-status-line,
#projectModal .detail-metrics,
#projectModal .detail-url {
  flex: 0 0 auto;
}

#projectModal .watchdog-history {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

#projectModal .watchdog-history .modal-section-title {
  flex: 0 0 auto;
  margin: 0 0 10px;
}

#projectModal .watchdog-history .modal-table {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow-y: auto !important;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 16px;
}

#projectModal .watchdog-history .modal-table::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
#projectModal .watchdog-history .modal-table::-webkit-scrollbar-track {
  background: transparent;
}
#projectModal .watchdog-history .modal-table::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.20);
  border-radius: 999px;
}
#projectModal .watchdog-history .modal-table::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.34);
}
#projectModal .watchdog-history .modal-table {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.20) transparent;
}

#projectModal .watchdog-history thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(13,19,28,.97);
  backdrop-filter: blur(14px);
}

@media (max-width: 900px) {
  #projectModal .modal-card.modal-large {
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }
  #projectModal .modal-body { padding: 16px; }
  #projectModal .watchdog-history { margin-top: 16px; }
}


/* ============================================================
   V1.4 WATCHDOG BRAND SYSTEM
   ============================================================ */
.watchdog-sidebar-logo{
  width:42px;height:42px;object-fit:contain;border-radius:12px;
  filter:drop-shadow(0 0 10px rgba(0,153,255,.28));
}
.sidebar-brand strong{font-size:15px}
.sidebar-brand span{font-size:10px;letter-spacing:.02em}

.login-body{
  background:
    radial-gradient(circle at 22% 28%,rgba(0,140,255,.15),transparent 28%),
    radial-gradient(circle at 78% 72%,rgba(74,92,255,.10),transparent 30%),
    #06090e;
}
.login-shell{width:min(500px,100%)}
.login-card{
  text-align:center;
  padding:34px 38px 36px;
  border-color:rgba(69,139,255,.20);
  background:linear-gradient(180deg,rgba(18,25,35,.96),rgba(10,15,22,.96));
  box-shadow:0 35px 120px rgba(0,0,0,.55),0 0 70px rgba(0,117,255,.08);
}
.login-brand-wrap{
  display:flex;justify-content:center;align-items:center;
  margin:-12px auto 4px;
}
.watchdog-login-logo{
  display:block;width:min(310px,88%);height:auto;
  mix-blend-mode:screen;
  filter:drop-shadow(0 0 18px rgba(0,145,255,.20));
}
.login-card h1{font-size:23px;margin:8px 0 6px}
.login-card > .muted{font-size:12px;letter-spacing:.08em}
.login-form{text-align:left}
.login-form .btn{
  box-shadow:0 12px 35px rgba(83,102,255,.22);
}

@media(max-width:520px){
  .watchdog-login-logo{width:min(270px,94%)}
  .login-card{padding:26px 22px 28px}
  .sidebar-brand span{font-size:9px}
}


/* ============================================================
   V1.4.1 OFFICIAL PROJECT FOOTER
   ============================================================ */
.watchdog-footer{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:18px 22px 22px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.02em;
  border-top:1px solid rgba(255,255,255,.04);
  background:rgba(5,8,12,.42);
}
.watchdog-footer a{
  color:#7da8ff;
  font-weight:700;
  text-decoration:none;
}
.watchdog-footer a:hover{
  color:#9bbcff;
  text-decoration:underline;
}
.footer-sep{opacity:.45}

.login-body .watchdog-footer{
  position:relative;
  width:100%;
  border-top:0;
  background:transparent;
  margin-top:18px;
}

@media(max-width:620px){
  .watchdog-footer{
    gap:5px;
    padding:16px 14px 20px;
    text-align:center;
    line-height:1.5;
  }
  .footer-sep{display:none}
  .watchdog-footer span{
    flex-basis:100%;
  }
}


/* ============================================================
   V1.4.2 COPY SQL SETUP
   ============================================================ */
.sql-setup-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:-4px;
  padding:12px;
  border:1px solid rgba(89,112,255,.16);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(89,112,255,.055),rgba(255,255,255,.015));
}
.sql-setup-row small{
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.sql-copy-btn{
  flex:0 0 auto;
  min-width:145px;
}
.sql-copy-btn:disabled{
  opacity:.38;
  cursor:not-allowed;
  box-shadow:none;
}
.sql-copy-btn.copied{
  border-color:rgba(59,214,133,.38);
  color:#72e6a6;
  background:rgba(59,214,133,.08);
}

@media(max-width:560px){
  .sql-setup-row{
    align-items:stretch;
    flex-direction:column;
  }
  .sql-copy-btn{
    width:100%;
  }
}


/* ============================================================
   PWA / iPhone SAFE AREA
   Keeps the sticky header and menu button below the notch/Dynamic Island.
   Requires viewport-fit=cover in the page viewport meta tag.
   ============================================================ */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width:820px) {
    .topbar .icon-btn {
      flex:0 0 44px;
      width:44px;
      height:44px;
      min-width:44px;
      min-height:44px;
      touch-action:manipulation;
      position:relative;
      z-index:22;
    }
    .content {
      padding-right:calc(16px + var(--safe-right));
      padding-left:calc(16px + var(--safe-left));
      padding-bottom:calc(16px + var(--safe-bottom));
    }
  }
}
