:root{
  --bg:#07111f;
  --bg2:#0b1728;
  --card:rgba(12,20,34,.82);
  --border:rgba(255,255,255,.08);
  --text:#ffffff;
  --muted:rgba(255,255,255,.68);
  --link:#6dd3ff;
  --blue:#22c7f3;
  --blue-dark:#1d4ed8;
  --green:#22c55e;
  --red:#ef4444;
  --graybtn:#334155;
  --shadow:0 12px 30px rgba(0,0,0,.28);
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 15% 0%, #10223a 0%, var(--bg) 55%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  min-height:100vh;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

a{
  color:var(--link);
  text-decoration:none;
}

.client-shell{
  min-height:100vh;
}

.client-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(6,12,22,.82);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.client-header-inner{
  max-width:1180px;
  margin:0 auto;
  padding:24px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.client-logo-link{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  max-width:280px;
}

.client-logo{
  width:auto;
  height:72px;
  max-height:72px;
  object-fit:contain;
}

.client-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.client-user-email{
  color:var(--muted);
  font-size:13px;
  margin-right:6px;
  white-space:nowrap;
}

.client-nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:#fff;
  font-weight:700;
  transition:.18s ease;
}

.client-nav-link:hover{
  filter:brightness(1.08);
}

.client-nav-link.is-active{
  background:rgba(34,199,243,.18);
  border-color:rgba(34,199,243,.45);
}

.client-menu-toggle{
  display:none;
  width:46px;
  height:46px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  padding:10px;
  cursor:pointer;
}

.client-menu-toggle span{
  display:block;
  height:2px;
  background:#fff;
  border-radius:2px;
  margin:5px 0;
}

.client-main{
  padding:24px 0 36px;
}

.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:0 18px;
}

.client-page-head{
  margin-bottom:16px;
}

.client-page-title{
  margin:0;
  font-size:clamp(30px,4vw,48px);
  line-height:1.02;
  font-weight:900;
  letter-spacing:-.02em;
}

.client-page-subtitle{
  margin-top:8px;
  color:var(--muted);
  font-size:clamp(15px,2vw,22px);
}

.client-trust-device-row{
  margin-top:12px;
}

.client-trust-device-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  line-height:1.2;
  cursor:pointer;
}

.client-trust-device-checkbox{
  width:16px;
  height:16px;
  min-height:0;
  margin:0;
  padding:0;
  flex:0 0 auto;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow);
  margin-bottom:16px;
}

.muted{
  color:var(--muted);
}

.small{
  font-size:13px;
}

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

input,
select{
  width:100%;
  min-height:46px;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:#fff;
  outline:none;
}

button,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
}

.btn:hover,
button:hover{
  filter:brightness(1.06);
}

.btn-primary{
  background:var(--blue-dark);
  border-color:rgba(37,99,235,.52);
}

.btn.secondary{
  background:var(--graybtn);
}

code{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.1);
  padding:5px 8px;
  border-radius:10px;
  color:#e5f7ff;
}

@media (max-width: 900px){
  .client-menu-toggle{
    display:block;
  }

  .client-nav{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:14px 18px 18px;
    background:rgba(6,12,22,.96);
    border-bottom:1px solid rgba(255,255,255,.08);
  }

  .client-menu-open .client-nav{
    display:flex;
  }

  .row{
    grid-template-columns:1fr;
  }

  .client-user-email{
    margin:0;
    white-space:normal;
  }
}

@media (max-width: 640px){
  .client-header-inner{
    padding:12px 14px;
  }

  .wrap{
    padding:0 14px;
  }

  .client-logo-link{
    max-width:200px;
  }

  .client-logo{
    height:34px;
    max-height:34px;
  }

  .client-page-title{
    font-size:40px;
  }

  .client-page-subtitle{
    font-size:18px;
  }

  .card{
    padding:16px;
    border-radius:18px;
  }
}

/* =============================================
   SCREEN CARDS (screens.php)
   ============================================= */

.clientScreensIntro {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 720px;
}

.screenGrid {
  display: grid;
  gap: 16px;
}

.screenCard {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(0,0,0,.2) 100%),
    rgba(0,0,0,.18);
  padding: 20px;
  display: grid;
  gap: 18px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

.screenCard:hover {
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(0,0,0,.24);
}

.screenHeader {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.screenMain { min-width: 0; }

.screenEyebrow {
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.screenTitle {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0;
}

.screenUrl {
  display: block;
  max-width: 100%;
  color: rgba(255,255,255,.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 12px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 9px 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  opacity:.82;
}

.screenMeta {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:14px;
}

.screenMetaBlock {
  min-width:0;
}

.metaLabel {
  color: rgba(255,255,255,.46);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.metaPrimary {
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
}

.statusWrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

.statusDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.status-online .statusDot  { background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,.4); }
.status-stale .statusDot   { background: #f59e0b; }
.status-offline .statusDot { background: var(--red); }

.status-online { color: var(--green); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.2); }
.status-stale { color: #f59e0b; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.2); }
.status-offline { color: var(--red); background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.2); }

.status-online .statusText  { color: var(--green); }
.status-stale .statusText   { color: #f59e0b; }
.status-offline .statusText { color: var(--red); }

.metaLine { color: var(--muted); font-size: 12px; line-height: 1.35; }

.screenActions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  padding-top: 2px;
}
.screenActions form { margin: 0; }

.screenBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  box-sizing: border-box;
  transition: filter .15s, border-color .15s, background .15s;
}

.screenBtn:hover     { filter: brightness(1.1); }
.screenBtnSlides     { background: linear-gradient(180deg, #2e7cf7 0%, #1d4ed8 100%); color: #fff; border-color: rgba(96,165,250,.4); }
.screenBtnPublish    { background: rgba(255,255,255,.06); color: #fff; }
.screenBtnView       { background: transparent; color: #fff; }

.screenBtnPrimary {
  min-width: 148px;
}

.emptyState {
  color: var(--muted);
  padding: 20px 4px 6px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .screenHeader {
    flex-direction:column;
    align-items:flex-start;
  }

  .screenActions,
  .screenActions form {
    width: 100%;
  }

  .screenBtn,
  .screenActions form button {
    width: 100%;
  }
}
