/* static/css/app.css */
:root{
  --bg0:#070A12;
  --bg1:#0B1220;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.08);
  --stroke:rgba(255,255,255,.12);
  --stroke2:rgba(255,255,255,.18);
  --text:#EAF0FF;
  --muted:rgba(234,240,255,.70);
  --muted2:rgba(234,240,255,.55);
  --accent:#7C5CFF;
  --accent2:#2DD4BF;
  --danger:#FF4D6D;
  --warn:#FFB020;
  --ok:#2EE59D;
  --shadow: 0 18px 60px rgba(0,0,0,.50);
  --shadow2: 0 10px 32px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 12px;
}

html, body { height:100%; }
body{
  background:
    radial-gradient(900px 480px at 15% 10%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(720px 420px at 85% 15%, rgba(45,212,191,.16), transparent 60%),
    radial-gradient(900px 520px at 40% 110%, rgba(255,77,109,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  font-feature-settings: "ss01" 1, "ss02" 1;
}

a { color: rgba(234,240,255,.9); }
a:hover { color: white; }

.container-xxl { max-width: 1320px; }

.navbar{
  background: rgba(10,14,26,.55) !important;
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
}
.navbar .nav-link{ color: rgba(234,240,255,.78) !important; }
.navbar .nav-link:hover{ color: white !important; }

.brand-mark{
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(45,212,191,.75));
  box-shadow: 0 10px 26px rgba(124,92,255,.28);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight: 800; letter-spacing: .5px;
}

.page-hero{
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(800px 300px at 20% 0%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(800px 300px at 80% 0%, rgba(45,212,191,.16), transparent 55%),
    rgba(255,255,255,.04);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
}

.glass{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
}
.glass.soft{ background: rgba(255,255,255,.045); }

.cardx{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
}
.cardx .cardx-hd{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:space-between;
}
.cardx .cardx-bd{ padding: 16px; }

.kpi{
  display:flex; align-items:flex-end; gap:10px;
}
.kpi .v{ font-size: 28px; font-weight: 800; line-height: 1; }
.kpi .u{ color: var(--muted); font-size: 12px; margin-bottom: 2px; }

.muted{ color: var(--muted) !important; }
.muted2{ color: var(--muted2) !important; }

.btn{
  border-radius: 14px;
  padding: 10px 14px;
}
.btn-primary{
  background: linear-gradient(135deg, rgba(124,92,255,.92), rgba(45,212,191,.70));
  border: 0;
  box-shadow: 0 12px 28px rgba(124,92,255,.18);
}
.btn-primary:hover{ filter: brightness(1.05); }
.btn-outline-light{
  border-color: rgba(255,255,255,.22);
  color: rgba(234,240,255,.88);
}
.btn-outline-light:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28);
  color: white;
}

.form-control, .form-select{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(234,240,255,.92);
  border-radius: 14px;
}
.form-control:focus, .form-select:focus{
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 0 0 .25rem rgba(124,92,255,.12);
  background: rgba(255,255,255,.06);
  color: white;
}
.form-control::placeholder{ color: rgba(234,240,255,.40); }

.table{
  color: rgba(234,240,255,.90);
}
.table thead th{
  color: rgba(234,240,255,.72);
  border-bottom-color: rgba(255,255,255,.14);
}
.table td, .table th{
  border-top-color: rgba(255,255,255,.10);
}
.table-hover tbody tr:hover{
  background: rgba(255,255,255,.04);
}

.badge-soft{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(234,240,255,.86);
  border-radius: 999px;
  padding: 6px 10px;
}

.ball{
  width: 34px; height: 34px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center; justify-content:center;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(10,14,26,.95);
  margin-right: 6px;
  box-shadow: 0 10px 22px rgba(0,0,0,.38);
  user-select:none;
}
.ball.red{ background: radial-gradient(circle at 30% 30%, #FFD0D9, #FF4D6D); }
.ball.blue{ background: radial-gradient(circle at 30% 30%, #D7ECFF, #3B82F6); }
.ball.green{ background: radial-gradient(circle at 30% 30%, #CFFFEA, #2DD4BF); }
.ball.yellow{ background: radial-gradient(circle at 30% 30%, #FFF2C2, #FFB020); }
.ball.gray{ background: radial-gradient(circle at 30% 30%, #F2F6FF, #A7B2C6); }

.hr-soft{
  border-top: 1px solid rgba(255,255,255,.10);
  opacity: 1;
}

/* ===== Fix: select dropdown options unreadable on dark UI ===== */
html { color-scheme: dark; }

/* Ensure select itself stays dark */
.form-select{
  background-color: rgba(255,255,255,.05) !important;
  color: rgba(234,240,255,.92) !important;
}

/* Ensure dropdown list items are dark with light text */
.form-select option{
  background-color: #0B1220 !important;
  color: #EAF0FF !important;
}

/* Highlighted/selected option visibility */
.form-select option:checked,
.form-select option:hover{
  background-color: rgba(124,92,255,.35) !important;
  color: #FFFFFF !important;
}

/* ===== Make number badges round balls (compat layer) ===== */
/* 你目前頁面上像 "badge-ball" 這種框框，統一做成圓球外觀 */
.badge-ball{
  width: 34px;
  height: 34px;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .2px;
  margin-right: 6px;
  user-select: none;
  box-shadow: 0 10px 22px rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.10);
}

/* 顏色對齊你原本 .ball.* 的風格 */
.badge-ball.ball-green{
  color: rgba(10,14,26,.95);
  background: radial-gradient(circle at 30% 30%, #CFFFEA, #2DD4BF) !important;
}
.badge-ball.ball-yellow{
  color: rgba(10,14,26,.95);
  background: radial-gradient(circle at 30% 30%, #FFF2C2, #FFB020) !important;
}
.badge-ball.ball-gray{
  color: rgba(10,14,26,.95);
  background: radial-gradient(circle at 30% 30%, #F2F6FF, #A7B2C6) !important;
}

/* index.html 表格裡的號碼（如果你用 span.badge 類型）也順便圓球化 */
table td .badge,
table td .badge-soft{
  border-radius: 999px !important;
}
