
:root{
  --bg:#0f172a;
  --bg-soft:#071028;
  --card:#071029;
  --glass: rgba(255,255,255,0.03);
  --text:#e6eef8;
  --muted:#9aa7bf;
  --accent:#3b82f6;
  --accent-2:#60a5fa;
  --glass-border: rgba(255,255,255,0.04);
  --radius:14px;
  --shadow: 0 10px 30px rgba(2,6,23,0.6);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(59,130,246,0.06), transparent 10%),
              radial-gradient(900px 500px at 90% 90%, rgba(99,102,241,0.04), transparent 10%),
              var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
}

/* container card */
.card{
  width:100%;
  max-width:980px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:18px;
  padding:28px;
  box-shadow:var(--shadow);
  border:1px solid var(--glass-border);
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:24px;
  align-items:start;
}

/* left column - auth box */
.auth{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:12px;
  padding:20px;
  border:1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
}

/* right column - branding / info */
.side{
  padding:18px;
  border-radius:12px;
}

/* header */
.logo{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.logo .mark{
  width:48px;height:48px;border-radius:10px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  box-shadow: 0 6px 20px rgba(59,130,246,0.16);
  display:flex; align-items:center; justify-content:center; color:white; font-weight:700;
}

/* forms */
h2{margin:0 0 8px 0;font-size:20px}
.desc{color:var(--muted);font-size:13px;margin-bottom:14px}
.input, input[type="password"], input[type="text"]{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid rgba(255,255,255,0.04);
  background:var(--bg-soft); color:var(--text); outline:none; margin-top:10px;
}
.btn{
  display:inline-block; padding:10px 16px; border-radius:10px; margin-top:14px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:white; border:none; cursor:pointer;
  box-shadow: 0 8px 30px rgba(59,130,246,0.16);
}

/* table and lists */
.table{width:100%;border-collapse:collapse}
.table th, .table td{padding:10px;border-bottom:1px solid rgba(255,255,255,0.03); text-align:left; font-size:14px}
.small{font-size:13px;color:var(--muted)}

/* responsive */
@media (max-width:900px){
  .card{grid-template-columns:1fr; padding:18px}
  .side{order:-1}
}


/* admin card taller */
.card{min-height:760px;}
/* make code columns wrap and have a max width */
.table td, .table th { word-break: break-word; vertical-align: middle; }
/* specifically limit code column width */
.table td.code, .table th.code { max-width:220px; overflow-wrap: anywhere; }
/* scrollable tables */
.table-wrapper{max-height:320px; overflow-y:auto; padding-right:8px;}
/* nicer scrollbar */
.table-wrapper::-webkit-scrollbar{width:8px}
.table-wrapper::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.06);border-radius:8px}


/* PANEL v5 tweaks */
.card{min-height:820px;}
.table-wrapper{max-height:360px; overflow-y:auto; padding-right:8px; margin-top:8px;}
.table{min-width:640px;}
.table th, .table td{word-break:break-word; vertical-align:middle; padding:10px;}
.table th.code, .table td.code{max-width:260px; overflow-wrap:anywhere; white-space:normal;}
/* scrollbar */
.table-wrapper::-webkit-scrollbar{width:10px}
.table-wrapper::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.04); border-radius:8px}


/* v6 adjustments */
.table{min-width:100%;} 
.table th, .table td{padding:4px 6px;}
.auth{padding:10px;}
.side{padding:10px;}
.card{padding:15px; min-height:700px;}


/* v7 Dashboard Compact Modern */
:root{
  --radius:10px;
  --accent:#3b82f6;
  --accent-2:#60a5fa;
}
/* Buttons smaller */
button{
  padding:6px 12px;
  border-radius:8px;
  font-size:13px;
}
/* Table rows tighter */
.table th, .table td{
  padding:6px 8px;
  font-size:13px;
  line-height:1.2;
}
/* Icons for yes/no */
.status-yes{color:#4ade80;font-weight:bold;}
.status-no{color:#f87171;font-weight:bold;}
/* Section headers compact */
h3, h4{
  margin:6px 0;
  font-size:15px;
}
/* Card more compact */
.card{
  padding:12px;
  min-height:700px;
}
/* Panels tighter */
.auth, .side{
  padding:10px;
}
/* Scroll areas */
.table-wrapper{
  max-height:300px;
  overflow-y:auto;
  margin-top:6px;
}
/* Remove horizontal scroll */
.table{min-width:100%;}


/* Unified admin layout */
.admin-wrapper {
  width:100%;
  max-width:900px;
  margin:auto;
  padding:10px;
}
.admin-section {
  background:var(--panel);
  padding:15px;
  border-radius:12px;
}
.table-wrapper {
  max-height:260px;
  overflow-y:auto;
  margin:10px 0;
}
.table { width:100%; border-collapse:collapse; }
.table th, .table td { padding:6px 8px; }
.code { max-width:150px; word-break:break-all; }


/* v9 new layout */
.admin-grid {
  display:flex;
  gap:20px;
  max-width:1300px;
  margin:auto;
}
.left-col,.right-col{
  flex:1;
}
.table-wrapper{
  max-height:300px;
  overflow-y:auto;
}
.table{width:100%;border-collapse:collapse;}
.table td,.table th{padding:6px 8px;white-space:nowrap;}
.code{max-width:300px;overflow-wrap:anywhere;}


/* v10 improved ui */
body{font-family:Inter,Arial,sans-serif;}
.admin-grid{
  display:flex;
  gap:24px;
  max-width:1300px;
  margin:auto;
  padding:20px;
}
.left-col,.right-col{
  background:rgba(255,255,255,0.04);
  padding:18px;
  border-radius:14px;
  flex:1;
  box-shadow:0 0 20px rgba(0,0,0,0.15);
}
h3{
  margin:5px 0 10px 0;
  font-size:18px;
  font-weight:600;
}
.table{
  width:100%;
  border-collapse:collapse;
}
.table th{
  font-size:14px;
  text-align:left;
  padding:6px 10px;
  border-bottom:1px solid rgba(255,255,255,0.1);
  white-space:nowrap;
}
.table td{
  padding:6px 10px;
  font-size:14px;
  white-space:nowrap;
}
.code{
  max-width:none;
  white-space:nowrap;
}
.table-wrapper{
  max-height:320px;
  overflow-y:auto;
  margin:10px 0;
}
button.btn{
  padding:6px 14px;
  border-radius:8px;
  background:#3b82f6;
  border:none;
  color:#fff;
  cursor:pointer;
}
button.btn:hover{
  background:#60a5fa;
}
a{color:#60a5fa; text-decoration:none;}
a:hover{text-decoration:underline;}


/* v11 center + responsive */
.admin-grid{
  display:flex;
  gap:24px;
  max-width:100%;
  width:100%;
  justify-content:center;
}
@media(max-width:900px){
  .admin-grid{
    flex-direction:column;
    padding:10px;
  }
  .left-col,.right-col{
    width:100%!important;
    max-width:100%!important;
  }
  .table td,.table th{
    white-space:unset;
  }
  .code{
    white-space:unset!important;
  }
}


/* v12 desktop centering + mobile scaling */
.admin-grid{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  gap:24px;
}

/* columns equalized */
.left-col, .right-col{
  flex:1;
  min-width:0;
}

/* mobile */
@media(max-width:700px){
  .admin-grid{
    flex-direction:column;
    max-width:100%;
    padding:10px;
  }
  .left-col, .right-col{
    width:100%!important;
  }
  .table td,.table th{
    font-size:12px;
    padding:4px 6px;
    white-space:normal;
  }
  button.btn{
    width:100%;
    margin-top:4px;
    font-size:12px;
    padding:6px;
  }
  h3{
    font-size:16px;
  }
}


/* v13 perfect centering + strong mobile scaling */

/* --- DESKTOP --- */
.admin-grid{
  width:1300px;
  max-width:1300px;
  margin-left:auto;
  margin-right:auto;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
}

.left-col, .right-col{
  flex:1;
  margin:0 !important;
  min-width:0;
  padding:18px;
  border-radius:14px;
  background:rgba(255,255,255,0.04);
  box-shadow:0 0 20px rgba(0,0,0,0.15);
}

/* --- MOBILE --- */
@media(max-width:650px){
  .admin-grid{
    width:100%;
    max-width:100%;
    padding:10px;
    flex-direction:column;
  }
  .left-col, .right-col{
    width:100% !important;
    padding:10px;
    margin:0 !important;
  }
  .table td, .table th{
    font-size:11px;
    padding:3px 4px;
    white-space:normal;
  }
  button.btn{
    width:100%;
    padding:5px;
    font-size:11px;
    margin-top:4px;
  }
  h3{
    font-size:16px;
  }
}


/* v14 PERFECT DESKTOP CENTERING + FIXED PANEL WIDTH */

/* DESKTOP MODE */
@media(min-width: 900px){
    .admin-grid{
        width:1100px !important;
        max-width:1100px !important;
        margin-left:auto !important;
        margin-right:auto !important;
        display:flex !important;
        justify-content:center !important;
        gap:32px !important;
    }

    .left-col, .right-col{
        width:520px !important;
        max-width:520px !important;
        min-width:520px !important;
        padding:16px !important;
        margin:0 !important;
    }
}

/* mobile stays the same */


/* v15 PERFECT CENTERED PANEL (900px wide, two equal columns 430px) */

/* DESKTOP */
@media(min-width: 900px){
    .admin-grid{
        width:900px !important;
        max-width:900px !important;
        margin:0 auto !important;
        display:flex !important;
        justify-content:center !important;
        gap:40px !important;
        padding-top:40px !important;
    }

    .left-col, .right-col{
        width:430px !important;
        max-width:430px !important;
        min-width:430px !important;
        margin:0 !important;
        padding:16px !important;
        border-radius:14px !important;
        background:rgba(255,255,255,0.04) !important;
        box-shadow:0 0 20px rgba(0,0,0,0.15) !important;
    }
}

.desc{font-size:13px;opacity:.8;}


/* v17 mobile reorder */
@media(max-width:700px){
    .login-container{
        display:flex;
        flex-direction:column-reverse;
        gap:20px;
    }
}

@media(max-width:700px){
    .panel{
        margin-top:0 !important;
    }
    .login-container{
        gap:8px !important;
    }
    .desc{
        margin-bottom:6px !important;
    }
}


/* v19 – mobile fix for login, register, reset */
@media(max-width:700px){
    .form-container{
        display:flex;
        flex-direction:column-reverse;
        gap:8px !important;
    }
    .panel{
        margin-top:0 !important;
    }
    .side{
        margin-bottom:0 !important;
    }
}

/* logout button styling added */
.logout-btn{display:inline-block;padding:10px 14px;border-radius:6px;background:#d9534f;color:white;text-decoration:none;font-weight:700;box-shadow:0 3px 8px rgba(0,0,0,0.2)}
