/* assets/css/glass.css */

/* -----------------------------
   Base
-------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(255,255,255,0.92);
  background: radial-gradient(1200px 700px at 20% 10%, rgba(82,168,255,0.22), transparent 60%),
              radial-gradient(900px 600px at 90% 30%, rgba(255,82,240,0.12), transparent 55%),
              radial-gradient(900px 700px at 50% 90%, rgba(82,255,160,0.10), transparent 55%),
              #0b1220;
}

a{ color: inherit; }

/* -----------------------------
   Common Glass Card
-------------------------------- */
.card{
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

small{ opacity: .85; }

/* -----------------------------
   Grid system (simple)
-------------------------------- */
.grid{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}
.col-12{ width: calc(100% - 0px); }
.col-8 { width: calc(66.666% - 7px); }
.col-6 { width: calc(50% - 7px); }
.col-4 { width: calc(33.333% - 10px); }
.col-3 { width: calc(25% - 11px); }

@media (max-width: 980px){
  .col-8,.col-6,.col-4,.col-3{ width: 100%; }
}

/* -----------------------------
   Forms
-------------------------------- */
label{
  display:block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  opacity: .9;
}

input, select, textarea{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  outline: none;

  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);

  transition: border-color .15s ease, background .15s ease;
}

textarea{ resize: vertical; }

input:focus, select:focus, textarea:focus{
  border-color: rgba(82,168,255,0.55);
  background: rgba(255,255,255,0.09);
}

/* Some browsers make select options dark */
select option{
  background: #0f172a;
  color: rgba(255,255,255,0.92);
}

/* -----------------------------
   Buttons
-------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 10px 14px;
  border-radius: 14px;
  text-decoration:none;
  cursor:pointer;
  user-select:none;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);

  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
}

.btn:active{ transform: translateY(0px); }

.btn-primary{
  background: rgba(82,168,255,0.22);
  border-color: rgba(82,168,255,0.45);
}
.btn-primary:hover{
  background: rgba(82,168,255,0.28);
}

/* -----------------------------
   Badge
-------------------------------- */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;

  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

/* -----------------------------
   Table
-------------------------------- */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  letter-spacing: .2px;
  padding: 12px 12px;

  background: rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
}

.table tbody tr:hover{
  background: rgba(255,255,255,0.05);
}

/* -----------------------------
   Single-page app layout (sidebar + content)
-------------------------------- */
.app{
  display:flex;
  min-height:100vh;
  gap:18px;
  padding:18px;
}

/* Sidebar */
.sidebar{
  width:280px;
  position:sticky;
  top:18px;
  height:calc(100vh - 36px);

  border-radius:18px;
  padding:14px;

  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);

  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.sidebar-top{ display:block; }

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:8px 6px 10px;
}

.brand-logo{
  width:44px;height:44px;
  border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.12);
}

.brand-title{ font-weight:900; }
.brand-sub{ font-size:12px; opacity:.8; }

.userbox{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:10px;
  padding:10px;
  border-radius:16px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
}

.avatar{
  width:40px;height:40px;
  border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.12);
}

.user-name{ font-weight:800; }
.user-role{ font-size:12px; opacity:.85; }

.nav{ margin-top:12px; display:flex; flex-direction:column; gap:8px; }

.nav-link{
  display:block;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;

  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);

  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.nav-link:hover{
  transform: translateY(-1px);
  background:rgba(255,255,255,0.08);
}

.nav-link.active{
  background:rgba(82,168,255,0.18);
  border-color:rgba(82,168,255,0.35);
}

/* Main */
.main{
  flex:1;
  min-width:0;
}

.topbar{
  border-radius:18px;
  padding:14px 16px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-title{
  font-weight:900;
  letter-spacing:.2px;
}

.content{ margin-top:14px; }

/* Mobile layout */
@media (max-width: 980px){
  .app{ flex-direction:column; }
  .sidebar{
    width:100%;
    height:auto;
    position:relative;
    top:auto;
  }
}
/* GREEN BUTTON */
.btn-green {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: none;
  color: #ffffff;
}

.btn-green:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  transform: translateY(-2px);
  transition: 0.2s ease;
}

/* RED BUTTON */
.btn-red {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: none;
  color: #ffffff;
}

.btn-red:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  transform: translateY(-2px);
  transition: 0.2s ease;
}
/* Supply dashboard stat cards */
.stat {
  border-left: 6px solid rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
}
.stat .stat-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.stat .stat-label {
  font-size:12px;
  opacity:.85;
  letter-spacing:.5px;
  text-transform: uppercase;
}
.stat .stat-value {
  font-size:30px;
  font-weight:900;
  margin-top:4px;
}
.stat .stat-dot {
  width:12px;
  height:12px;
  border-radius:50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
  flex:0 0 auto;
}

/* color themes */
.stat-yellow { border-left-color: rgba(255, 193, 7, .8); }
.stat-yellow .stat-dot { background: rgba(255, 193, 7, .95); }

.stat-blue { border-left-color: rgba(82, 168, 255, .9); }
.stat-blue .stat-dot { background: rgba(82, 168, 255, .95); }

.stat-green { border-left-color: rgba(46, 204, 113, .9); }
.stat-green .stat-dot { background: rgba(46, 204, 113, .95); }

.stat-gray { border-left-color: rgba(200, 200, 200, .55); }
.stat-gray .stat-dot { background: rgba(200, 200, 200, .9); }