/* Premium Login UI - Bynzo Billing */
:root{
  --brand-navy:#102A4A;
  --brand-deep:#0F243C;
  --brand-blue:#05589B;
  --brand-cyan:#0A9FD9;
  --brand-teal:#0EA29F;
  --brand-aqua:#18DBE3;
  --brand-green:#1FA058;
  --brand-lightgreen:#5BD25F;
  --text:#ffffff;
  --muted:rgba(255,255,255,.72);
  --card:rgba(255,255,255,.06);
  --card-border:rgba(255,255,255,.14);
  --shadow: 0 18px 45px rgba(0,0,0,.38);
  --radius:18px;
}

body{
  min-height:100vh;
  background: radial-gradient(1200px 800px at 20% 20%, rgba(10,159,217,.28), transparent 55%),
              radial-gradient(900px 700px at 80% 30%, rgba(31,160,88,.22), transparent 55%),
              radial-gradient(1100px 900px at 60% 80%, rgba(24,219,227,.18), transparent 55%),
              linear-gradient(140deg, var(--brand-deep), var(--brand-navy));
  color: var(--text);
}

.login-page{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 42px 16px;
}

.login-shell{
  width:min(1080px, 100%);
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
}

@media (max-width: 920px){
  .login-shell{ grid-template-columns: 1fr; }
  .login-hero{ order: 2; }
}

/* Make the two panels feel balanced on large screens */
@media (min-width: 1100px){
  .login-hero{ padding: 38px; }
  .login-card{ padding: 30px; }
}

.login-hero{
  border-radius: var(--radius);
  padding: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--card-border);
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}

.login-hero:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(700px 400px at 20% 20%, rgba(10,159,217,.22), transparent 60%),
              radial-gradient(600px 450px at 90% 40%, rgba(31,160,88,.18), transparent 62%);
  pointer-events:none;
}

.login-hero > *{ position:relative; z-index:1; }

.brand-row{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-row img{
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.brand-title{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  margin:0;
}

.brand-sub{
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

.hero-h1{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 34px;
  margin: 14px 0 10px;
  letter-spacing: .2px;
}

.hero-p{
  margin:0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 52ch;
}

.hero-points{
  margin: 18px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap: 10px;
}

.hero-points li{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  color: rgba(255,255,255,.86);
  font-size: 14px;
}

.dot{
  margin-top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--brand-aqua), var(--brand-green));
  box-shadow: 0 0 0 4px rgba(24,219,227,.12);
}

.login-card{
  border-radius: var(--radius);
  padding: 26px;
  background: var(--card);
  border:1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.login-card h2{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin:0 0 6px 0;
  font-size: 22px;
}

.login-card .hint{
  margin:0 0 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.form-row{ margin-bottom: 12px; }

.login-card label{
  display:block;
  font-size: 13px;
  color: rgba(255,255,255,.86);
  margin-bottom: 6px;
}

.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="number"]{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  color:#fff;
  outline:none;
}

.login-card input::placeholder{ color: rgba(255,255,255,.48); }

.login-card input:focus{
  border-color: rgba(24,219,227,.58);
  box-shadow: 0 0 0 4px rgba(24,219,227,.12);
}

.actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-primary, .login-card button[type="submit"], .login-card input[type="submit"]{
  appearance:none;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  color:#06111f;
  background: linear-gradient(135deg, var(--brand-aqua), var(--brand-lightgreen));
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}

.btn-primary:hover, .login-card button[type="submit"]:hover, .login-card input[type="submit"]:hover{
  transform: translateY(-1px);
}

.link, .login-card a{
  color: rgba(255,255,255,.9);
  text-decoration:none;
  font-size: 13px;
}

.link:hover, .login-card a:hover{ text-decoration: underline; }

.small{
  font-size: 12px;
  color: var(--muted);
}

.form-help{ margin-top: 8px; }

.alert-success{
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 160, 88, .14);
  border: 1px solid rgba(31, 160, 88, .22);
  color: rgba(255,255,255,.95);
}

/* --- Login UI Revamp v2 (better balance + app-like) --- */
.login-shell{ align-items: stretch; }
.login-hero,
.login-card{ min-height: 520px; }

.login-hero{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.login-card{
  display:flex;
  flex-direction:column;
}

.login-form{ margin-top: 8px; }

.actions{ margin-top: 14px; }

@media (max-width: 920px){
  .login-hero,
  .login-card{ min-height: auto; }
}

@media (max-width: 520px){
  .login-shell{ gap: 14px; }
  .login-card{ padding: 18px; }
  .login-hero{ padding: 20px; }
  .hero-h1{ font-size: 26px; }
}

.err, .error, .alert, .alert-danger{
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 82, 82, .14);
  border: 1px solid rgba(255, 82, 82, .22);
  color: rgba(255,255,255,.95);
}


/* --- Mobile Responsive Polish --- */
img, svg { max-width: 100%; height: auto; }

/* Prevent horizontal scroll */
html, body { overflow-x: hidden; }

/* Forms: better tap targets on mobile */
input, select, textarea, button {
  min-height: 44px;
  font-size: 16px; /* avoids iOS zoom */
}

/* Containers */
.page-wrap { padding-left: 14px; padding-right: 14px; }

/* Tables: scroll on small screens */
.table-responsive, .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius, 14px);
}
.table-responsive table, .table-wrap table { min-width: 680px; }

/* Buttons: full width on small screens when needed */
@media (max-width: 520px){
  .actions { width:100%; }
  .actions .btn-primary, .actions button[type="submit"], .actions input[type="submit"] {
    width: 100%;
  }
  .actions a.link, .actions a { width: 100%; text-align:center; }
}

/* Login */
@media (max-width: 520px){
  .login-page{ padding: 26px 12px; }
  .login-hero{ padding: 22px; }
  .login-card{ padding: 20px; }
  .hero-h1{ font-size: 28px; }
  .brand-title{ font-size: 20px; }
}

/* KPI cards grid */
@media (max-width: 520px){
  .grid-cards{ gap: 12px; }
  .card{ padding: 14px; }
  .card .kpi{ font-size: 24px; }
}

/* Navbar / header links: stack nicely if present */
@media (max-width: 720px){
  nav, .navbar, .topbar, header{
    flex-wrap: wrap;
  }
  .navbar-nav, .nav, .menu{
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Modals / cards spacing */
@media (max-width: 520px){
  .card, .login-hero, .login-card{
    border-radius: 16px;
  }
}


/* === Premium Sidebar + Topbar + Contrast (Dark UI) === */
:root{
  --bg-0: #071522;
  --bg-1: rgba(255,255,255,.06);
  --bg-2: rgba(255,255,255,.04);
  --stroke: rgba(255,255,255,.14);
  --stroke-2: rgba(255,255,255,.10);
  --text-0: rgba(255,255,255,.96);
  --text-1: rgba(255,255,255,.78);
  --text-2: rgba(255,255,255,.62);
}

body{ background-color: var(--bg-0); color: var(--text-0); }

/* Shell layout */
.app-shell{
  display:grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
@media (max-width: 980px){
  .app-shell{ grid-template-columns: 1fr; }
  .sidebar{ position: sticky; top: 0; z-index: 50; }
}

/* Sidebar */
.sidebar{
  background: linear-gradient(180deg, rgba(15,36,60,.92), rgba(7,21,34,.92));
  border-right: 1px solid var(--stroke);
  padding: 16px 14px;
}
.sidebar .brand{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke-2);
}
.sidebar .brand img{ width: 34px; height: 34px; object-fit: contain; }
.sidebar .brand .t1{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin: 0;
}
.sidebar .brand .t2{ margin:0; font-size: 12px; color: var(--text-2); }

.side-nav{ margin-top: 14px; display:grid; gap: 6px; }
.side-nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: var(--text-0);
  background: rgba(255,255,255,.03);
  border: 1px solid transparent;
}
.side-nav a:hover{
  border-color: rgba(24,219,227,.35);
  background: rgba(255,255,255,.06);
}
.side-nav a.active{
  background: linear-gradient(135deg, rgba(24,219,227,.14), rgba(91,210,95,.12));
  border-color: rgba(24,219,227,.25);
}

/* Topbar */
.main{
  display:flex;
  flex-direction:column;
  min-width: 0;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.topbar .title{
  font-family: Poppins, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .subtitle{
  margin:0;
  font-size: 12px;
  color: var(--text-2);
}
.topbar .right{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.search{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke-2);
  background: rgba(0,0,0,.18);
}
.search input{
  border: none !important;
  outline: none;
  background: transparent !important;
  color: var(--text-0) !important;
  padding: 0 !important;
  min-height: auto !important;
  font-size: 14px !important;
}
.search input::placeholder{ color: rgba(255,255,255,.45); }

.user-chip{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: rgba(255,255,255,.04);
  color: var(--text-0);
  text-decoration:none;
  font-weight: 700;
  font-size: 13px;
}

/* Readability: tables */
table{ color: var(--text-0); }
.table-premium, table.table, table.dataTable, table{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--stroke);
}
.table-premium th, .table-premium td,
table th, table td{
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
}
.table-premium th, table th{
  background: rgba(0,0,0,.24);
  color: rgba(255,255,255,.90);
}
table tr:nth-child(even) td{ background: rgba(255,255,255,.02); }
table tr:hover td{ background: rgba(255,255,255,.05); }

/* Readability: forms */
label{ color: rgba(255,255,255,.86); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea,
.form-control{
  background: rgba(0,0,0,.22) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: rgba(255,255,255,.96) !important;
}
select option{ color: #0b1a26; } /* dropdown list text */
input::placeholder, textarea::placeholder{ color: rgba(255,255,255,.48) !important; }
input:focus, select:focus, textarea:focus{
  border-color: rgba(24,219,227,.55) !important;
  box-shadow: 0 0 0 4px rgba(24,219,227,.12) !important;
}

/* Alerts */
.alert, .alert-danger, .alert-success, .error, .err{
  background: rgba(0,0,0,.22) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.95) !important;
}
