/* ott24x7 license panel — premium dark */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0b0e;
  --bg-glow: rgba(239, 43, 61, 0.10);
  --panel: #131519;
  --panel-2: #191c22;
  --panel-3: #1f232a;
  --line: #262a31;
  --line-2: #2f343d;
  --text: #eceef1;
  --muted: #888f9a;
  --muted-2: #5f6670;
  --red: #ef2b3d;
  --red-2: #c01627;
  --green: #22c55e;
  --orange: #f59e0b;
  --blue: #3b82f6;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 100% -5%, var(--bg-glow), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
::placeholder { color: var(--muted-2); }
a { color: inherit; text-decoration: none; }

/* Inputs */
input, select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; outline: none;
  width: 100%; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,43,61,.15); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888f9a' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  padding: 11px 18px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  font-weight: 600; font-family: inherit; transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--red-2)); border: none; color: #fff; box-shadow: 0 6px 20px rgba(239,43,61,.28); }
.btn.primary:hover { box-shadow: 0 8px 26px rgba(239,43,61,.42); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 380px; max-width: 92vw; background: linear-gradient(180deg, var(--panel), #101216);
  border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.03);
}
.login-logo { width: 210px; align-self: center; margin-bottom: 4px; }
.login-card h1 { font-size: 19px; margin: 0; text-align: center; font-weight: 700; }
.login-card label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.login-sub { text-align: center; margin: -4px 0 6px; }
.error { color: #ff6b78; min-height: 18px; font-size: 13px; text-align: center; }
.login-foot { text-align: center; font-size: 12px; color: var(--muted-2); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #101216, #0c0e11);
  border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.side-brand img { width: 42px; height: 42px; border-radius: 11px; }
.side-brand .bt { font-weight: 800; font-size: 16px; letter-spacing: .3px; }
.side-brand .bs { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(239,43,61,.22), rgba(192,22,39,.14)); color: #fff; box-shadow: inset 0 0 0 1px rgba(239,43,61,.3); }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; }

.main { padding: 26px 30px 60px; max-width: 1240px; }

/* Page header */
.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(180deg, var(--panel), #101217);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px;
}
.page-head h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; gap: 10px; flex: none; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.section { margin-bottom: 20px; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(180deg, var(--panel), #101217); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; transition: border-color .15s, transform .12s;
}
.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.stat .n { font-size: 32px; font-weight: 800; line-height: 1; }
.stat.green .n { color: var(--green); }
.stat.orange .n { color: var(--orange); }
.stat.red .n { color: var(--red); }
.stat.blue .n { color: var(--blue); }

/* Toolbar (search + filter) */
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.toolbar .search { flex: 1; position: relative; }
.toolbar .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }
.toolbar .search input { padding-left: 40px; }
.toolbar select { max-width: 220px; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 13px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
td.key { font-family: 'JetBrains Mono', ui-monospace, monospace; color: #ff8a94; font-weight: 500; }
.tag { display: inline-flex; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.tag.active { background: rgba(34,197,94,.16); color: var(--green); }
.tag.suspended { background: rgba(245,158,11,.16); color: var(--orange); }
.tag.revoked, .tag.expired { background: rgba(239,43,61,.16); color: #ff6b78; }
.row-actions { display: flex; gap: 6px; }

.empty { padding: 44px 22px; text-align: center; color: var(--muted); }

/* Download / brand blocks */
.dl-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.keys-out textarea { width: 100%; min-height: 130px; font-family: 'JetBrains Mono', monospace; color: #ff8a94;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; resize: vertical; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(4,5,7,.62); backdrop-filter: blur(3px); z-index: 40; }
.modal {
  position: fixed; z-index: 50; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 520px; max-width: 94vw; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, var(--panel), #0f1115); border: 1px solid var(--line-2);
  border-radius: 18px; box-shadow: 0 40px 100px rgba(0,0,0,.7);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.icon-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 18px; width: 32px; height: 32px; border-radius: 8px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text);
  padding: 13px 20px; border-radius: 12px; box-shadow: 0 14px 44px rgba(0,0,0,.6); z-index: 90; font-weight: 500; }
.toast.err { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
