:root {
  --ink: #0b1726; --muted: #6d7b8e; --line: #e7ecf2; --paper: #fff;
  --surface: #f4f7fa; --navy: #07111f; --navy-2: #0c1b2d;
  --orange: #ff8a3d; --orange-soft: #fff0e7; --green: #16a777;
  --violet: #7658f6; --cyan: #109dba; --shadow: 0 18px 55px rgba(20,36,55,.09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; color: white; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#ff9d59,#fb6b28); font-size: 13px; font-weight: 900; box-shadow: 0 8px 24px rgba(255,122,48,.28); letter-spacing: -.03em; transform: rotate(-3deg); }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 14px; line-height: 1.15; }
.brand small { font-size: 8px; margin-top: 4px; color: #8697ab; letter-spacing: .16em; }

/* Login */
.login-page { min-height: 100vh; background: var(--navy); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,1.08fr) minmax(420px,.92fr); }
.login-story { position: relative; display: flex; flex-direction: column; padding: 42px clamp(42px,6vw,94px); color: #fff; overflow: hidden; isolation: isolate; }
.login-story::before,.login-story::after { content: ""; position: absolute; border-radius: 999px; z-index: -1; }
.login-story::before { width: 620px; height: 620px; left: -220px; top: 120px; background: radial-gradient(circle,rgba(255,127,57,.19),rgba(255,127,57,0) 68%); }
.login-story::after { width: 520px; height: 520px; right: -290px; bottom: -170px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 80px rgba(255,255,255,.015),0 0 0 160px rgba(255,255,255,.012); }
.brand-login { align-self: flex-start; }
.login-copy { margin: auto 0; max-width: 730px; padding: 80px 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(255,138,61,.13); }
.login-copy h1 { margin: 0; font-size: clamp(44px,5.6vw,82px); line-height: .99; letter-spacing: -.055em; max-width: 820px; }
.login-copy h1 em { color: #a8b7c9; font-style: normal; font-weight: 500; }
.login-copy > p:not(.eyebrow) { max-width: 630px; margin: 28px 0 0; color: #91a1b5; font-size: 17px; line-height: 1.75; }
.login-features { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 48px; }
.login-features span { display: flex; align-items: center; gap: 9px; color: #c5d0dc; font-size: 12px; font-weight: 650; }
.login-features i { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: var(--orange); font-size: 9px; font-style: normal; }
.login-foot { color: #52657b; font-size: 11px; letter-spacing: .06em; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #f6f8fb; position: relative; }
.login-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#cbd3dc 1px,transparent 1px); background-size: 24px 24px; opacity: .24; mask-image: linear-gradient(to bottom,black,transparent 70%); }
.login-card { position: relative; z-index: 1; width: min(450px,100%); padding: 46px; border: 1px solid #e8edf2; border-radius: 25px; background: rgba(255,255,255,.96); box-shadow: 0 30px 80px rgba(21,39,59,.11); }
.secure-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--green); background: #eaf9f4; border-radius: 999px; padding: 8px 12px; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.secure-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,167,119,.12); }
.login-card h2 { margin: 28px 0 7px; font-size: 31px; letter-spacing: -.035em; }
.login-card > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-form { display: grid; gap: 20px; margin-top: 32px; }
.login-form label > span { display: block; margin-bottom: 9px; color: #344255; font-size: 12px; font-weight: 750; }
.input-shell { display: flex; align-items: center; height: 54px; border: 1px solid #dfe5ec; border-radius: 13px; background: #fbfcfd; transition: .2s ease; }
.input-shell:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); background: #fff; }
.input-shell b { width: 47px; text-align: center; color: #a0adbb; font-size: 12px; }
.input-shell input { flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); padding-right: 14px; }
.input-shell input::placeholder { color: #a9b4c0; }
.primary-button { height: 55px; margin-top: 5px; border: 0; border-radius: 13px; color: white; background: linear-gradient(135deg,#ff914c,#fb6d29); font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 0 12px 28px rgba(250,107,40,.24); transition: transform .18s ease,box-shadow .18s ease; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(250,107,40,.3); }
.primary-button span { margin-left: 10px; }
.security-note { display: flex; gap: 12px; align-items: center; margin-top: 24px !important; padding-top: 22px; border-top: 1px solid var(--line); font-size: 11px !important; }
.security-note i { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: #edf9f5; color: var(--green); font-style: normal; font-weight: 900; }
.security-note strong { color: #344255; }
.login-error { margin-top: 22px; padding: 12px 14px; border-radius: 10px; color: #a73c32; background: #fff0ee; font-size: 12px; line-height: 1.5; }

/* Dashboard */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 22px; background: var(--navy); color: #8ea0b5; z-index: 20; }
.sidebar .brand { padding: 0 8px 25px; }
.main-nav { margin-top: 15px; }
.main-nav p { margin: 25px 12px 10px; color: #45586e; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.main-nav a { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 13px; margin: 4px 0; border-radius: 11px; color: #8294a9; font-size: 12px; font-weight: 650; transition: .18s ease; }
.main-nav a:hover { color: #e2e9f0; background: rgba(255,255,255,.04); }
.main-nav a.active { color: #fff; background: rgba(255,138,61,.12); box-shadow: inset 2px 0 var(--orange); }
.main-nav a.active .nav-icon { color: var(--orange); }
.main-nav a b { margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--orange); background: rgba(255,138,61,.12); font-size: 9px; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }
.sidebar-status { display: flex; align-items: center; gap: 11px; margin: auto 3px 14px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.025); }
.sidebar-status div { display: flex; flex-direction: column; }
.sidebar-status strong { color: #c7d2de; font-size: 10px; }
.sidebar-status small { margin-top: 3px; color: #5e7187; font-size: 8px; }
.pulse-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(22,167,119,.1); }
.logout-button { width: 100%; height: 42px; border: 0; border-top: 1px solid rgba(255,255,255,.07); color: #71849a; background: transparent; font-size: 11px; cursor: pointer; text-align: left; padding: 14px 12px 0; }
.logout-button span { margin-right: 12px; font-size: 15px; }
.logout-button:hover { color: #fff; }
.main-content { min-width: 0; padding: 0 clamp(24px,4vw,64px); background: #f5f7fa; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); }
.search-box { width: min(390px,45vw); height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #e3e8ee; border-radius: 11px; background: white; }
.search-box > span { color: #8b99a9; font-size: 19px; transform: rotate(-15deg); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); font-size: 11px; background: transparent; }
.search-box input::placeholder { color: #98a5b3; }
kbd { padding: 3px 7px; border: 1px solid #dce2e9; border-radius: 5px; color: #98a5b4; background: #f6f8fa; font-size: 9px; font-family: inherit; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.live-clock { padding-right: 16px; border-right: 1px solid #dfe5eb; text-align: right; }
.live-clock span { display: block; font-size: 12px; font-weight: 850; }
.live-clock small { display: block; margin-top: 2px; color: #8492a2; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.admin-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: var(--navy-2); font-size: 10px; font-weight: 800; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.hero-section { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 45px 0 28px; }
.hero-section .eyebrow { margin-bottom: 13px; font-size: 8px; }
.hero-section h1 { margin: 0; font-size: clamp(29px,3vw,42px); letter-spacing: -.04em; }
.hero-section > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.refresh-button { height: 39px; padding: 0 15px; border: 1px solid #e1e6ec; border-radius: 10px; color: #445266; background: white; font-size: 10px; font-weight: 750; cursor: pointer; }
.refresh-button span { display: inline-block; margin-right: 6px; font-size: 14px; }
.refresh-button.loading span { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric-card { position: relative; min-height: 118px; display: flex; align-items: center; gap: 15px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.metric-card.accent::before { content: ""; position: absolute; left: 0; top: 19px; bottom: 19px; width: 3px; border-radius: 0 4px 4px 0; background: var(--orange); }
.metric-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 11px; color: var(--orange); background: var(--orange-soft); font-size: 16px; }
.metric-icon.green { color: var(--green); background: #eaf9f4; }
.metric-icon.violet { color: var(--violet); background: #f0edff; }
.metric-icon.cyan { color: var(--cyan); background: #e8f8fb; }
.metric-card div { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 7px; }
.metric-card small { grid-column: 1/-1; margin-bottom: 4px; color: #96a2b0; font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.metric-card strong { font-size: 23px; letter-spacing: -.03em; white-space: nowrap; }
.metric-card p { margin: 0; color: #8c99a8; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sites-section { padding: 42px 0 0; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.section-heading p,.security-card p { margin: 0 0 5px; color: var(--orange); font-size: 7px; font-weight: 900; letter-spacing: .16em; }
.section-heading h2,.security-card h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.section-heading > span { color: #98a5b3; font-size: 9px; }
.site-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.site-card { position: relative; min-height: 285px; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 8px 35px rgba(28,45,65,.045); overflow: hidden; transition: transform .2s ease,box-shadow .2s ease; }
.site-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle,rgba(118,88,246,.09),transparent 68%); pointer-events: none; }
.site-card.cyan::after { background: radial-gradient(circle,rgba(16,157,186,.1),transparent 68%); }
.site-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.site-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.site-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.site-mark { display: grid; place-items: center; width: 47px; height: 47px; flex: 0 0 auto; border-radius: 13px; color: white; background: linear-gradient(145deg,#8369fc,#5b3fde); font-size: 12px; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 10px 24px rgba(91,63,222,.22); }
.cyan .site-mark { background: linear-gradient(145deg,#1ab7d0,#087e9a); box-shadow: 0 10px 24px rgba(8,126,154,.21); }
.site-identity h3 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.02em; }
.site-identity a { color: #8a98a7; font-size: 9px; }
.site-identity a:hover { color: var(--ink); }
.site-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; color: #9a7b35; background: #fff8e9; font-size: 8px; font-weight: 800; white-space: nowrap; }
.site-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.site-status.online { color: var(--green); background: #eaf9f4; }
.site-status.offline { color: #c34f43; background: #fff0ee; }
.site-description { min-height: 43px; margin: 25px 0 18px; color: #667589; font-size: 10px; line-height: 1.65; max-width: 90%; }
.section-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.section-tags span { padding: 7px 9px; border-radius: 7px; color: #6f7d8d; background: #f4f6f8; font-size: 8px; font-weight: 650; }
.site-card-foot { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; align-items: center; justify-content: space-between; padding-top: 17px; border-top: 1px solid var(--line); }
.site-card-foot small { display: flex; align-items: center; gap: 7px; color: #95a1af; font-size: 8px; }
.status-ping { width: 7px; height: 7px; border-radius: 50%; background: #d2ad58; }
.status-ping.online { background: var(--green); box-shadow: 0 0 0 4px rgba(22,167,119,.09); }
.status-ping.offline { background: #c34f43; }
.panel-button { min-width: 113px; height: 37px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; border-radius: 9px; color: white; background: var(--navy-2); font-size: 9px; font-weight: 800; transition: .18s ease; }
.panel-button:hover { background: #152b43; transform: translateX(2px); }
.panel-button span { color: var(--orange); font-size: 13px; }
.site-skeleton { height: 285px; border-radius: 17px; background: linear-gradient(90deg,#eef2f5 25%,#f8fafb 50%,#eef2f5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state,.load-error { padding: 35px; border: 1px dashed #dce3ea; border-radius: 14px; color: #8997a7; background: white; text-align: center; font-size: 11px; }
.bottom-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; padding: 18px 0 45px; }
.activity-card,.security-card { min-height: 188px; padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: white; scroll-margin-top: 20px; }
.section-heading.compact { margin-bottom: 13px; }
.activity-list { border-top: 1px solid var(--line); }
.activity-empty { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 95px; color: #94a1af; }
.activity-empty > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--violet); background: #f0edff; }
.activity-empty p { font-size: 9px; line-height: 1.6; }
.activity-empty strong { color: #5e6d7f; }
.activity-row { min-height: 56px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f5; }
.activity-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--violet); background: #f0edff; font-size: 12px; }
.activity-row div { display: flex; flex-direction: column; gap: 3px; }
.activity-row strong { font-size: 10px; }
.activity-row small,.activity-row time { color: #95a1af; font-size: 8px; }
.security-card { display: flex; align-items: center; gap: 21px; color: #fff; border: 0; background: linear-gradient(145deg,#0b1a2c,#10243a); }
.security-symbol { position: relative; display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; color: var(--orange); background: rgba(255,255,255,.04); font-size: 27px; }
.security-symbol i { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: white; background: var(--green); border: 3px solid #10243a; font-size: 9px; font-style: normal; }
.security-card h2 { font-size: 17px; }
.security-card span { display: block; margin-top: 10px; color: #8395a9; font-size: 9px; line-height: 1.6; }
.dashboard-footer { min-height: 66px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #9ca8b5; font-size: 8px; }
.dashboard-footer span:last-child { display: flex; align-items: center; gap: 7px; }
.dashboard-footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sidebar-backdrop { display: none; }

@media (max-width:1050px) { .metric-grid { grid-template-columns: repeat(2,1fr); } .bottom-grid { grid-template-columns: 1fr; } }
@media (max-width:800px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 46vh; padding: 30px; }
  .login-copy { padding: 70px 0 45px; }
  .login-copy h1 { font-size: clamp(40px,11vw,62px); }
  .login-copy > p:not(.eyebrow) { font-size: 14px; }
  .login-foot { display: none; }
  .login-panel { padding: 30px 18px 55px; }
  .login-card { padding: 30px 24px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 245px; transition: transform .22s ease; box-shadow: 15px 0 60px rgba(3,12,22,.3); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 15; background: rgba(3,11,20,.55); backdrop-filter: blur(2px); }
  .sidebar-backdrop.visible { display: block; }
  .menu-button { display: block; }
  .search-box { width: min(350px,62vw); }
  .site-grid { grid-template-columns: 1fr; }
}
@media (max-width:560px) {
  .main-content { padding: 0 17px; }
  .topbar { height: 66px; gap: 12px; }
  .search-box { flex: 1; width: auto; }
  .search-box kbd,.live-clock { display: none; }
  .hero-section { align-items: flex-start; padding-top: 34px; }
  .hero-section > div > p:last-child { max-width: 260px; }
  .refresh-button { width: 38px; padding: 0; font-size: 0; }
  .refresh-button span { margin: 0; font-size: 15px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 104px; padding: 15px; gap: 10px; }
  .metric-icon { width: 34px; height: 34px; }
  .metric-card strong { font-size: 18px; }
  .metric-card p { display: none; }
  .site-card { padding: 19px; }
  .site-card-foot { left: 19px; right: 19px; }
  .site-description { max-width: 100%; }
  .site-status { font-size: 0; padding: 8px; }
  .site-status i { width: 7px; height: 7px; }
  .login-features { display: grid; gap: 12px; }
  .login-copy { padding-bottom: 20px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
