:root{
  --bg:#05080e;
  --bg2:#070c13;
  --surface:#0a111b;
  --surface2:#0d1622;
  --line:#1d2c3c;
  --line2:#2a4055;

  --text:#f4f7fa;
  --muted:#7890a8;

  --cyan:#22d3ee;
  --blue:#4999ff;
  --green:#32d69a;
  --amber:#f6c84a;
  --red:#f06d81;
  --violet:#b08cff;

  --radius:13px;
}

*{
  box-sizing:border-box;
}

html{
  color-scheme:dark;
}

body{
  margin:0;

  min-height:100vh;

  background:var(--bg);

  color:var(--text);

  font-family:
    Inter,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size:14px;
}

button,
input,
select,
textarea{
  font:inherit;
}

button{
  min-height:38px;

  padding:8px 13px;

  border:1px solid var(--line2);
  border-radius:8px;

  background:#0c1722;

  color:#cbd7e2;

  font-size:11px;
  font-weight:700;

  cursor:pointer;
}

button:hover{
  background:#12202d;
  color:white;
}

button:disabled{
  opacity:.35;
  cursor:not-allowed;
}

button.primary{
  background:var(--cyan);
  border-color:var(--cyan);

  color:#031316;
}

button.primary:hover{
  background:#68e8f6;
}

input,
select,
textarea{
  width:100%;

  min-height:40px;

  padding:9px 11px;

  border:1px solid var(--line2);
  border-radius:8px;

  background:#070d15;

  color:var(--text);

  outline:none;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(34,211,238,.7);

  box-shadow:
    0 0 0 3px
    rgba(34,211,238,.06);
}

label{
  display:block;

  margin-bottom:13px;

  color:#9fb1c3;

  font-size:11px;
  font-weight:700;
}

label input,
label select,
label textarea{
  margin-top:6px;
}


/* TOPBAR */

.topbar{
  height:64px;

  position:sticky;
  top:0;
  z-index:100;

  display:grid;
  grid-template-columns:1fr auto 1fr;

  align-items:center;

  padding:0 23px;

  background:rgba(5,8,14,.97);

  border-bottom:1px solid var(--line);
}

.language-box{
  width:170px;
  height:40px;

  display:flex;
  align-items:center;

  gap:8px;

  padding:0 10px;

  border:1px solid rgba(34,211,238,.4);
  border-radius:10px;

  background:#091420;
}

.language-box span{
  color:var(--cyan);
}

.language-box select{
  min-height:34px;

  margin:0;
  padding:0 6px;

  border:0;

  background:#091420;

  font-size:12px;
  font-weight:800;
}

.server-online{
  display:flex;
  align-items:center;

  gap:8px;

  color:#8799aa;

  font-size:10px;
}

.server-online i,
.online-card i{
  width:7px;
  height:7px;

  display:block;

  border-radius:50%;

  background:var(--green);

  box-shadow:
    0 0 9px
    rgba(50,214,154,.75);
}

.brand{
  justify-self:end;

  display:flex;
  align-items:center;

  gap:10px;

  text-align:right;
}

.brand strong{
  display:block;

  font-size:14px;
}

.brand strong b{
  color:var(--cyan);
}

.brand small{
  display:block;

  color:#5e7185;

  font-size:7px;
  letter-spacing:.1em;
}

.brand img{
  width:39px;
  height:39px;

  object-fit:cover;

  border-radius:9px;

  border:1px solid var(--line2);
}


/* SHELL */

.shell{
  display:grid;
  grid-template-columns:195px minmax(0,1fr);

  min-height:
    calc(100vh - 64px);
}

aside{
  min-height:
    calc(100vh - 64px);

  padding:17px 10px;

  display:flex;
  flex-direction:column;

  border-right:
    1px solid var(--line);

  background:#060a10;
}

.nav-label{
  padding:4px 10px 12px;

  color:#50657b;

  font-size:8px;
  font-weight:800;

  letter-spacing:.15em;
}

#nav{
  display:flex;
  flex-direction:column;

  gap:4px;
}

#nav button{
  width:100%;

  min-height:42px;

  padding:0 12px;

  text-align:left;

  border-color:transparent;

  background:transparent;

  color:#8195a9;
}

#nav button:hover{
  background:#0b131d;
  border-color:#1a2a38;

  color:white;
}

#nav button.selected{
  background:
    rgba(34,211,238,.07);

  border-color:
    rgba(34,211,238,.20);

  color:var(--cyan);
}

.side-credit{
  margin-top:auto;

  padding:13px;

  border:1px solid var(--line);
  border-radius:11px;

  background:#09101a;
}

.side-credit strong{
  display:block;

  font-size:10px;
}

.side-credit small{
  display:block;

  margin-top:4px;

  color:#607489;

  font-size:7px;
}

.side-credit hr{
  border:0;
  border-top:1px solid var(--line);

  margin:12px 0;
}

.side-credit span{
  color:var(--cyan);

  font-size:17px;
}

.side-credit p{
  margin:3px 0 0;

  font-size:9px;
}

.side-credit b{
  color:var(--cyan);
}


/* MAIN */

main{
  min-width:0;

  padding:18px;

  background:#060a10;
}

.hero{
  min-height:105px;

  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:20px;

  margin-bottom:14px;

  padding:19px 22px;

  border:1px solid var(--line2);
  border-radius:var(--radius);

  background:
    linear-gradient(
      120deg,
      #091522,
      #08101a
    );
}

.hero small{
  color:#60809e;

  font-size:7px;
  font-weight:800;

  letter-spacing:.15em;
}

.hero h1{
  margin:7px 0 5px;

  font-size:23px;
}

.hero h1 span{
  color:var(--cyan);
}

.hero p{
  margin:0;

  color:#7691aa;

  font-size:10px;
}

.online-card{
  display:flex;
  align-items:center;

  gap:10px;

  padding:10px 12px;

  border:1px solid #1a3347;
  border-radius:9px;

  background:#08111b;
}

.online-card span{
  color:#657a8f;

  font-size:7px;
}

.online-card strong{
  display:block;

  margin-top:2px;

  color:var(--green);

  font-size:10px;
}

#notice{
  min-height:11px;

  margin:0 0 8px;

  color:#ff8a9b;

  font-size:11px;
  font-weight:700;
}


/* ACCOUNT */

.account-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:15px;

  margin-bottom:13px;

  padding:14px 15px;

  border:1px solid var(--line);
  border-radius:11px;

  background:var(--surface);
}

.account-bar h2{
  margin:0 0 3px;

  font-size:16px;
}

.account-bar p{
  margin:0;

  color:#7291af;

  font-size:11px;
}


/* METRICS */

.metrics{
  display:grid;

  grid-template-columns:
    repeat(
      6,
      minmax(120px,1fr)
    );

  gap:10px;

  margin-bottom:13px;
}

.metric{
  min-height:88px;

  padding:13px;

  border:1px solid var(--line);
  border-top:2px solid var(--blue);
  border-radius:10px;

  background:var(--surface);
}

.metric span{
  color:#7e94aa;

  font-size:9px;
}

.metric strong{
  display:block;

  margin-top:11px;

  font-size:21px;
}

.metric.green{
  border-top-color:var(--green);
}

.metric.amber{
  border-top-color:var(--amber);
}

.metric.red{
  border-top-color:var(--red);
}

.metric.gray{
  border-top-color:#718399;
}

.metric.violet{
  border-top-color:var(--violet);
}


/* PANELS */

.panel{
  margin-bottom:13px;

  padding:15px;

  border:1px solid var(--line);
  border-radius:var(--radius);

  background:var(--surface);
}

.panel h2{
  margin:0 0 12px;

  font-size:15px;
}

.panel p{
  color:#7f93a8;

  font-size:11px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:15px;

  margin-bottom:14px;
}

.section-head h2{
  margin:0 0 4px;
}

.section-head p{
  margin:0;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:1fr 1fr;

  gap:13px;
}

.overview{
  display:grid;
  grid-template-columns:repeat(3,1fr);

  gap:9px;
}

.overview > div{
  padding:13px;

  border:1px solid var(--line);
  border-radius:9px;

  background:#080f18;
}

.overview span{
  display:block;

  color:#788da2;

  font-size:9px;
}

.overview strong{
  display:block;

  margin-top:7px;

  font-size:20px;
}

.quick-actions{
  display:flex;
  flex-wrap:wrap;

  gap:7px;
}


/* LICENSE TOOLBAR */

.license-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:10px;

  margin-bottom:13px;
}

.filters{
  flex:1;

  display:grid;
  grid-template-columns:
    minmax(250px,1fr)
    210px
    auto;

  gap:7px;
}

.toolbar-actions{
  display:flex;
  gap:7px;
}


/* TABLES */

.table-scroll{
  overflow:auto;

  border:1px solid var(--line);
  border-radius:9px;
}

table{
  width:100%;
  min-width:850px;

  border-collapse:collapse;
}

th{
  padding:9px 10px;

  background:#080f17;

  color:#66809a;

  border-bottom:1px solid var(--line);

  font-size:7px;
  font-weight:800;

  letter-spacing:.07em;

  text-align:left;
  text-transform:uppercase;
}

td{
  padding:10px;

  color:#c0cedb;

  border-bottom:1px solid #121d28;

  font-size:10px;

  vertical-align:middle;
}

tbody tr:hover{
  background:#0b141f;
}

code{
  color:#85dcea;

  font-family:
    Consolas,
    monospace;
}

.details{
  max-width:500px;

  display:block;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.actions{
  display:flex;
  flex-wrap:wrap;

  gap:5px;
}

.actions button{
  min-height:29px;

  padding:4px 7px;

  font-size:8px;
}

.danger-text,
.negative{
  color:var(--red);
}

.positive{
  color:var(--green);
}

.badge{
  display:inline-flex;

  padding:4px 7px;

  border-radius:20px;

  font-size:8px;
  font-weight:800;
}

.badge.ok{
  color:var(--green);

  background:
    rgba(50,214,154,.07);

  border:
    1px solid
    rgba(50,214,154,.18);
}

.badge.wait{
  color:var(--amber);

  background:
    rgba(246,200,74,.07);

  border:
    1px solid
    rgba(246,200,74,.18);
}

.badge.bad{
  color:var(--red);

  background:
    rgba(240,109,129,.07);

  border:
    1px solid
    rgba(240,109,129,.18);
}

.pagination{
  display:flex;
  align-items:center;
  flex-wrap:wrap;

  gap:7px;

  margin-top:11px;
}


/* WALLETS */

.wallet-layout{
  display:grid;

  grid-template-columns:
    minmax(300px,.8fr)
    minmax(500px,1.2fr);

  gap:13px;
}

.wallet-cards{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(180px,1fr)
    );

  gap:8px;
}

.wallet-card{
  padding:13px;

  border:1px solid var(--line);
  border-radius:9px;

  background:#080f18;
}

.wallet-card span{
  color:#698198;

  font-size:8px;
}

.wallet-card strong{
  display:block;

  margin-top:5px;

  font-size:13px;
}

.wallet-card b{
  display:block;

  margin:10px 0;

  color:var(--violet);

  font-size:18px;
}


/* PRODUCTS */

.product-grid,
.sdk-grid{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(260px,1fr)
    );

  gap:11px;
}

.product-card,
.sdk-card{
  padding:15px;

  border:1px solid var(--line);
  border-radius:11px;

  background:#080f18;
}

.product-status{
  display:flex;
  align-items:center;

  gap:7px;

  color:#72869b;

  font-size:8px;
  font-weight:800;
}

.product-status i{
  width:7px;
  height:7px;

  border-radius:50%;
}

.product-status i.on{
  background:var(--green);
}

.product-status i.off{
  background:var(--red);
}

.product-card h3,
.sdk-card h3{
  margin:10px 0 5px;

  font-size:16px;
}

.product-card dl{
  margin:14px 0;
}

.product-card dl > div{
  display:flex;
  justify-content:space-between;

  gap:10px;

  padding:8px 0;

  border-bottom:1px solid var(--line);
}

.product-card dt{
  color:#75899e;

  font-size:9px;
}

.product-card dd{
  margin:0;

  font-size:10px;
  font-weight:800;
}

.product-card textarea{
  min-height:75px;

  resize:none;

  font-family:
    Consolas,
    monospace;

  font-size:9px;
}

.card-actions{
  display:flex;
  flex-wrap:wrap;

  gap:7px;
}

.sdk-card > span{
  color:var(--cyan);

  font-size:8px;
  font-weight:800;
}

.sdk-card p{
  margin:12px 0;
}

.sdk-warning,
.security-note{
  margin-bottom:14px;

  padding:13px;

  border:
    1px solid
    rgba(34,211,238,.20);

  border-radius:9px;

  background:
    rgba(34,211,238,.04);
}

.sdk-warning strong{
  color:var(--cyan);
}


/* SETTINGS */

.settings-grid{
  display:grid;

  grid-template-columns:1fr 1fr;

  gap:11px;
}

.settings-grid .full{
  grid-column:1/-1;
}

.settings textarea{
  min-height:75px;

  resize:none;
}


/* LOGIN */

.login{
  width:min(410px,100%);

  margin:40px auto;

  padding:24px;

  border:1px solid var(--line2);
  border-radius:13px;

  background:var(--surface);
}

.login-label{
  color:var(--cyan);

  font-size:8px;
  font-weight:800;

  letter-spacing:.12em;
}

.login h1{
  margin:7px 0 4px;

  font-size:21px;
}

.login p{
  margin:0 0 18px;

  color:#758ba0;
}

.login button{
  width:100%;
}


/* DIALOG */

dialog{
  width:min(540px,calc(100% - 24px));

  padding:0;

  border:1px solid var(--line2);
  border-radius:13px;

  background:var(--surface);

  color:white;

  box-shadow:
    0 30px 100px
    rgba(0,0,0,.7);
}

dialog::backdrop{
  background:
    rgba(0,0,0,.72);

  backdrop-filter:
    blur(5px);
}

#dialog-form{
  padding:19px;
}

.dialog-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;

  gap:14px;

  margin-bottom:15px;
  padding-bottom:12px;

  border-bottom:1px solid var(--line);
}

.dialog-head small{
  color:var(--cyan);

  font-size:7px;
  letter-spacing:.1em;
}

.dialog-head h2{
  margin:4px 0 0;

  font-size:17px;
}

.close{
  width:34px;
  min-width:34px;

  padding:0;

  font-size:17px;
}

.error{
  color:var(--red) !important;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;

  gap:10px;
}

.checkbox{
  display:flex;
  align-items:center;

  gap:8px;
}

.checkbox input{
  width:auto;
  min-height:auto;

  margin:0;
}

.keys-output{
  min-height:170px;

  resize:vertical;

  font-family:
    Consolas,
    monospace;

  font-size:10px;
}


/* RTL */

html[dir="rtl"] body{
  font-family:
    Tahoma,
    "Segoe UI",
    Arial,
    sans-serif;
}

html[dir="rtl"] .shell{
  grid-template-columns:
    minmax(0,1fr)
    195px;
}

html[dir="rtl"] aside{
  grid-column:2;

  border-right:0;

  border-left:
    1px solid var(--line);
}

html[dir="rtl"] main{
  grid-column:1;
  grid-row:1;
}

html[dir="rtl"] #nav button,
html[dir="rtl"] th,
html[dir="rtl"] td{
  text-align:right;
}

html[dir="rtl"] .brand{
  text-align:left;
}


/* RESPONSIVE */

@media(max-width:1250px){

  .metrics{
    grid-template-columns:
      repeat(3,1fr);
  }

  .license-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .wallet-layout{
    grid-template-columns:1fr;
  }
}

@media(max-width:850px){

  .shell{
    grid-template-columns:
      170px
      minmax(0,1fr);
  }

  html[dir="rtl"] .shell{
    grid-template-columns:
      minmax(0,1fr)
      170px;
  }

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

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

@media(max-width:700px){

  .topbar{
    height:auto;

    grid-template-columns:
      1fr auto;

    gap:10px;

    padding:9px 10px;
  }

  .server-online{
    display:none;
  }

  .language-box{
    width:145px;
  }

  .brand small{
    display:none;
  }

  .shell,
  html[dir="rtl"] .shell{
    display:block;
  }

  aside{
    min-height:auto;

    padding:7px;

    border-right:0 !important;
    border-left:0 !important;
    border-bottom:
      1px solid var(--line);
  }

  .nav-label,
  .side-credit{
    display:none;
  }

  #nav{
    display:flex;
    flex-direction:row;

    overflow-x:auto;

    padding-bottom:2px;
  }

  #nav button{
    width:auto;

    min-width:max-content;

    min-height:38px;
  }

  main{
    padding:10px;
  }

  .hero{
    min-height:86px;

    padding:14px;
  }

  .hero h1{
    font-size:19px;
  }

  .online-card{
    display:none;
  }

  .metrics{
    grid-template-columns:
      repeat(2,1fr);
  }

  .section-head{
    align-items:stretch;
    flex-direction:column;
  }

  .toolbar-actions{
    flex-direction:column;
  }

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

  .settings-grid .full{
    grid-column:auto;
  }

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

@media(max-width:420px){

  .hero small,
  .hero p{
    display:none;
  }

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