﻿/* Shared stylesheet for all client portal pages */

:root{
  --app-bg:#f5f7fb;
  --panel:#ffffff;
  --panel-2:#ffffff;
  --border:rgba(20,33,61,.10);
  --muted:rgba(20,33,61,.72);
  --muted-2:rgba(20,33,61,.58);
  --card:#ffffff;
  --card2:#ffffff;
  --shadow:0 18px 40px rgba(16,24,40,.10);
  --radius:16px;
  --text:#0f172a;
}

[data-bs-theme="dark"]{
  --app-bg:#0b1220;
  --panel:#0f1b33;
  --panel-2:#0c172d;
  --border:rgba(255,255,255,.10);
  --muted:rgba(255,255,255,.72);
  --muted-2:rgba(255,255,255,.60);
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --text:#e8eefc;
}

body{ background:var(--app-bg); color:var(--text); }
.app{ display:flex; min-height:100vh; }
.content{ flex:1; min-width:0; }

.sidebar{
  width:280px;
  background:linear-gradient(180deg,var(--panel) 0%, var(--panel-2) 100%);
  border-right:1px solid var(--border);
  position:sticky;
  top:0;
  height:100vh;
  padding:18px;
  display:none;
  overflow:hidden;
}
@media (min-width:992px){
  .sidebar{ display:flex; flex-direction:column; }
}

.sidebar-scroll{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  margin-right:-6px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:1020;
  background:color-mix(in srgb, var(--app-bg) 85%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{ padding:14px 16px; }
@media (min-width:992px){
  .topbar-inner{ padding:14px 24px; }
}

.glass{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.glass-soft{
  background:var(--card2);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

.brand{ display:flex; align-items:center; gap:10px; padding:10px 10px 14px; }
.brand-mark{
  width:40px;
  height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:color-mix(in srgb, var(--app-bg) 85%, var(--panel));
  border:1px solid color-mix(in srgb, var(--text) 16%, transparent);
  color:var(--text);
}

.nav-link{
  color:color-mix(in srgb, var(--text) 78%, transparent);
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
}
.nav-link:hover{
  background:color-mix(in srgb, var(--text) 6%, transparent);
  color:var(--text);
}
.nav-link.active{
  background:color-mix(in srgb, var(--bs-primary) 16%,transparent);
  border:1px solid color-mix(in srgb, var(--bs-primary) 22%,transparent);
  color:var(--text);
}
.nav-section-title{
  font-size:.75rem;
  color:var(--muted-2);
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:14px 10px 8px;
}

.text-muted-3{ color:var(--muted-2)!important; }
.btn{ border-radius:12px; }
.form-control,.form-select,.input-group-text{
  border-radius:12px;
  border:1px solid var(--border);
}
.form-control:focus,.form-select:focus{
  box-shadow:none;
  border-color:color-mix(in srgb,var(--bs-primary) 60%,transparent);
}

.badge-soft{
  background:color-mix(in srgb,var(--text) 7%,transparent);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:999px;
  padding:.35rem .6rem;
  font-size:.8rem;
}

.table thead th{
  color:var(--muted);
  font-weight:800;
  border-bottom:1px solid var(--border);
  background:color-mix(in srgb,var(--card) 92%,transparent);
  white-space:nowrap;
}
.table td{
  border-top:1px solid var(--border);
  vertical-align:middle;
}

.offcanvas{
  background:linear-gradient(180deg,var(--panel) 0%, var(--panel-2) 100%);
  color:var(--text);
}

.theme-icon-btn,
.profile-icon-btn{
  border:0 !important;
  background:transparent !important;
  color:color-mix(in srgb, var(--text, #334155) 90%, transparent) !important;
  padding:.2rem .35rem;
  line-height:1;
}
.theme-icon-btn:hover,.theme-icon-btn:focus,.theme-icon-btn:active,
.profile-icon-btn:hover,.profile-icon-btn:focus,.profile-icon-btn:active{
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.theme-icon-btn i,.profile-icon-btn i{ font-size:1.25rem; }
.profile-icon-btn::after{ display:none !important; }

/* Utility classes to avoid inline styles in HTML */
.u-modal-radius-16{ border-radius:16px !important; }
.u-radius-14{ border-radius:14px !important; }
.u-dropdown-min-360{ min-width:360px; }
.u-hidden{ display:none !important; }
.u-w-180{ width:180px; }
.u-w-130{ width:130px; }
.u-w-120{ width:120px; }
.u-w-55p{ width:55%; }
.u-brand-mark-36{ width:36px; height:36px; border-radius:10px; }
.u-brand-mark-44{ width:44px; height:44px; }
.u-minw-160{ min-width:160px; }
.u-minw-140{ min-width:140px; }
.u-fs-2rem{ font-size:2rem; }

/* Unified clear-history button style */
.btn-clear-history{
  border-radius:999px !important;
  border:1px solid #dc3545 !important;
  color:#dc3545 !important;
  background:transparent !important;
  font-weight:500;
  padding:.35rem .9rem;
}
.btn-clear-history:hover,
.btn-clear-history:focus,
.btn-clear-history:active{
  color:#fff !important;
  background:#dc3545 !important;
  border-color:#dc3545 !important;
  box-shadow:none !important;
}
