/* frontend/css/styles.css */
/* Main styles for DAIS Procurement Portal */

:root {
  --shale: #114036;
  --mist: #16AF8E;
  --teal: #191919;
  --citrine: #F9B73F;
  --gypsum: #F9F3D9;
  --surface: rgba(249,243,217,.07);
  --stroke: rgba(249,183,63,.22);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Dubai', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 6% 10%, rgba(22,175,142,.08), transparent 60%),
    radial-gradient(1000px 500px at 95% 85%, rgba(249,183,63,.10), transparent 60%),
    linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  color: var(--gypsum);
}

/* Navbar */
.navbar {
  background: rgba(25,25,25,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}

.navbar-brand {
  color: var(--citrine) !important;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Brand logo sizing */
.navbar-brand .brand-logo { 
  height: 26px; 
  width: auto; 
  display: inline-block; 
}
.navbar-brand .brand-text { line-height: 1; }

.brand-divider {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, var(--citrine), transparent);
  margin: 0 12px;
}

.btn-icon {
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.btn-icon:hover {
  border-color: var(--teal);
  color: #fff;
}

/* Header */
.header {
  padding: 18px 0 0;
}

.header .container-xxl {
  max-width: 1400px;
}

.kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 14px;
}

.kpi .value {
  font-weight: 700;
  color: var(--gypsum);
  font-size: 1.15rem;
}

.kpi .label {
  opacity: .8;
  font-size: .9rem;
}

/* Tabs */
.nav-pills .nav-link {
  color: #dedaC6;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: .6rem 1rem;
  background: rgba(255,255,255,.03);
}

.nav-pills .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--mist));
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(22,175,142,.25);
}

/* Surface / Cards */
.surface {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.surface-header {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.surface-body {
  padding: 16px;
}

/* Chat */
.chat-wrap {
  height: 460px;
  overflow: auto;
  padding-right: 6px;
}

.bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: #141414;
  border: 1px solid rgba(255,255,255,.12);
  color: #f3f3f3;
}

.bubble.me {
  margin-left: auto;
  background: rgba(22,175,142,.12);
  border-color: rgba(22,175,142,.35);
}

.bubble small {
  opacity: .75;
}

.bubble .btn-sm {
  font-size: 0.8rem;
  padding: 4px 10px;
  margin-top: 8px;
}

.bubble .view-chart-btn {
  background: rgba(22,175,142,.15);
  border-color: rgba(22,175,142,.4);
  color: rgba(22,175,142,1);
  transition: all 0.2s;
}

.bubble .view-chart-btn:hover {
  background: rgba(22,175,142,.25);
  border-color: rgba(22,175,142,.6);
  color: rgba(22,175,142,1);
  transform: translateY(-1px);
}

.bubble .view-chart-btn i {
  font-size: 0.9rem;
}

.vis-wrap {
  height: 460px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  color: rgba(249,243,217,.75);
}

.vis-wrap.filled {
  display: block;
  align-items: stretch;
  justify-content: unset;
  background: none;
  border: 0;
}

/* Saved */
.card {
  background: rgba(249,243,217,.08);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
}

.thumb {
  height: 160px;
  background:
    linear-gradient(135deg, rgba(22,175,142,.25), rgba(249,183,63,.25)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 4px);
}

.card-title {
  font-weight: 700;
}

.card .meta {
  opacity: .75;
  font-size: .9rem;
}

/* Table / Data Viewer */
.form-select {
  background: #141414;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
}

.table {
  --bs-table-color: #eae5cf;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255,255,255,.12);
}

thead th {
  background: linear-gradient(135deg, var(--mist), var(--teal));
  color: #fff;
  border: 0 !important;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: rgba(255,255,255,.04);
}

/* Offcanvas Alerts */
.offcanvas {
  background: rgba(25,25,25,.95);
  color: #fff;
  border-left: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

.list-group-item {
  background: transparent;
  color: #eae5cf;
  border-color: rgba(255,255,255,.1);
}

.badge-alert {
  background: var(--citrine);
  color: #191919;
  font-weight: 700;
}

/* Utility */
.accent-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--citrine), transparent);
}

.muted {
  opacity: .85;
}
/* fullview wrapper */
.dais-vis { display: flex; flex-direction: column; width:100%; height:100%; }
.dais-vis > .dais-toolbar + div { flex: 1 1 auto; height: 100%; min-height: 65vh; }

/*new version */
.kpi-card{padding:14px;border:1px solid #eee;border-radius:12px;display:inline-block}
.kpi-title{font-size:12px;color:#666;margin-bottom:4px}
.kpi-value{font-size:28px;font-weight:700}
.chip-wrap{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.chip{padding:6px 10px;border-radius:999px;background:#f1f3f5}
.insight-actions{display:flex;gap:8px;margin-top:8px}
.table-card{padding:10px;border:1px solid #eee;border-radius:12px;overflow:auto}
.table-card table.clean{border-collapse:collapse;width:100%}
.table-card th,.table-card td{padding:8px;border-bottom:1px solid #f0f0f0;text-align:left}

/* Chart Message Styles */
.chart-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 2px solid var(--mist);
  border-radius: var(--radius);
  background: rgba(22, 175, 142, 0.1);
  transition: all 0.3s ease;
}

.message-content {
  text-align: center;
  padding: 2rem;
}

.message-icon {
  margin-bottom: 1rem;
  opacity: 0.8;
}

.message-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gypsum);
  margin-bottom: 0.5rem;
}

.message-subtitle {
  font-size: 1rem;
  color: var(--gypsum);
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.message-hint {
  font-size: 0.9rem;
  color: var(--citrine);
  opacity: 0.8;
  font-style: italic;
}