/* ======================================================================
   CASSIN AI — AZIA DESIGN SYSTEM THEME
   Extracted from Azia Admin Bootstrap Template
   Applies Azia's color palette, typography, and component styles
   ====================================================================== */

/* --- Google Fonts (Roboto + Montserrat + Raleway) ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&family=Montserrat:wght@400;500;600;700;800&family=Raleway:wght@400;500;600;700;800&display=swap');

/* --- Azia CSS Design Tokens ----------------------------------------- */
:root {
  /* Core Azia palette */
  --az-blue:      #3366ff;
  --az-indigo:    #5b47fb;
  --az-purple:    #6f42c1;
  --az-pink:      #f10075;
  --az-red:       #dc3545;
  --az-orange:    #fd7e14;
  --az-yellow:    #ffc107;
  --az-green:     #3bb001;
  --az-teal:      #00cccc;
  --az-cyan:      #17a2b8;
  --az-dark:      #3b4863;
  --az-gray:      #7987a1;
  --az-gray-dark: #3b4863;
  --az-light:     #f4f5f8;

  /* Surfaces */
  --az-body-bg:    #f4f5f8;
  --az-body-color: #031b4e;
  --az-text-muted: #7987a1;
  --az-border:     #cdd4e0;
  --az-border-lt:  #e3e7ed;

  /* Sidebar */
  --az-sidebar-bg:     #fff;
  --az-sidebar-text:   #1c273c;
  --az-sidebar-active: #5b47fb;
  --az-sidebar-label:  #7987a1;

  /* Header */
  --az-header-bg:     #fff;
  --az-header-shadow: 0 0 30px rgba(28,39,60,.08);
  --az-header-border: rgba(28,39,60,.12);

  /* Cards */
  --az-card-shadow: 0 0 10px rgba(28,39,60,.07);
  --az-card-radius: 5px;

  /* Override Cassin AI tokens to use Azia palette */
  --ink-900:    #031b4e;
  --ink-700:    #1c273c;
  --ink-500:    #7987a1;
  --line:       #cdd4e0;
  --brand:      #3366ff;
  --brand-soft: #e8edff;
  --ok:         #3bb001;
  --warn:       #ffc107;
  --bad:        #dc3545;
  --bg:         #f4f5f8;
  --tw:         #5b47fb;
}

/* ===== BASE TYPOGRAPHY ============================================== */

/* Apply Roboto globally for font — does NOT override page-specific text colors */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 14px;
  line-height: 1.5;
}

/* Azia text color only applies inside the dashboard layout (sidebar + main-wrapper) */
/* Dark-background pages (users.html, login.html, etc.) keep their own text colors */
.main-wrapper {
  color: #031b4e;
  background: var(--az-body-bg);
}

.main-wrapper h1, .main-wrapper h2, .main-wrapper h3,
.main-wrapper h4, .main-wrapper h5, .main-wrapper h6 {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600;
  color: #1c273c;
}

/* Montserrat headings for card-head and topnav (scoped) */
.card-head,
.topnav-title {
  font-family: 'Montserrat', sans-serif !important;
}

small, .small { font-size: 12px; }
strong, b { font-weight: 700; }

/* ===== SIDEBAR (Azia Light Style) =================================== */

.sidebar {
  background: var(--az-sidebar-bg) !important;
  border-right: 1px solid var(--az-border) !important;
  box-shadow: 2px 0 15px rgba(28,39,60,.06) !important;
}

/* Brand */
.sidebar-brand {
  border-bottom: 1px solid var(--az-border-lt) !important;
  padding: 18px 20px !important;
}

.sidebar-brand-name {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  font-size: 22px !important;
  color: #1c273c !important;
  letter-spacing: -0.5px !important;
}

.sidebar-brand-name span {
  color: #5b47fb !important;
}

.sidebar-brand-sub {
  font-family: 'Roboto', sans-serif !important;
  color: #7987a1 !important;
  font-size: 10px !important;
  letter-spacing: 0.5px !important;
  font-weight: 500 !important;
}

.sidebar-badge {
  background: #f0efff !important;
  border: 1px solid #d5d0ff !important;
  color: #5b47fb !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

/* Nav section labels */
.sidebar-section-label {
  font-family: 'Roboto', sans-serif !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  color: #7987a1 !important;
  text-transform: uppercase !important;
  padding: 14px 20px 4px !important;
  border-bottom: 1px dotted var(--az-border) !important;
  margin: 0 20px 2px !important;
}

/* Nav links */
.sidebar-link {
  font-family: 'Roboto', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #1c273c !important;
  border-left: 3px solid transparent !important;
  height: 40px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  position: relative !important;
  text-decoration: none !important;
  transition: all 0.15s !important;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  right: 0;
  border-top: 1px dotted var(--az-border);
}

.sidebar-link:first-child::before { display: none; }

.sidebar-link:hover {
  color: #5b47fb !important;
  background: rgba(91,71,251,.04) !important;
  border-left-color: transparent !important;
}

.sidebar-link.active {
  color: #5b47fb !important;
  background: rgba(91,71,251,.05) !important;
  border-left-color: #5b47fb !important;
}

.sidebar-link i {
  font-size: 22px !important;
  width: 24px !important;
  color: inherit !important;
  line-height: 0 !important;
}

/* Sidebar buttons (same style as links) */
.sidebar-btn {
  font-family: 'Roboto', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #1c273c !important;
  border-left: 3px solid transparent !important;
  height: 40px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: none !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  width: 100% !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}

.sidebar-btn:hover {
  color: #5b47fb !important;
  background: rgba(91,71,251,.04) !important;
}

.sidebar-btn i {
  font-size: 22px !important;
  width: 24px !important;
  color: inherit !important;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--az-border-lt) !important;
  color: #7987a1 !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 11px !important;
  background: #fff !important;
}

/* Sidebar overlay */
.sidebar-overlay {
  background: rgba(28,39,60,.5) !important;
}

/* ===== HEADER / TOPNAV (Azia White Header) =========================== */

.topnav {
  background: var(--az-header-bg) !important;
  border-bottom: 1px solid var(--az-header-border) !important;
  box-shadow: var(--az-header-shadow) !important;
}

.topnav-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
  color: #1c273c !important;
  font-size: 15px !important;
}

.topnav-sub {
  font-family: 'Roboto', sans-serif !important;
  color: #7987a1 !important;
  font-size: 12px !important;
}

.topnav-hamburger {
  color: #1c273c !important;
}

/* ===== MODEL PICKER (Azia component style) =========================== */

.model-picker {
  background: #f4f5f8 !important;
  border: 1px solid var(--az-border) !important;
  border-radius: 4px !important;
  padding: 3px !important;
}

.model-btn {
  font-family: 'Roboto', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #7987a1 !important;
  border-radius: 3px !important;
  padding: 4px 12px !important;
}

.model-btn:hover:not(.active) {
  color: #1c273c !important;
  background: #e3e7ed !important;
}

.model-btn.active.claude {
  background: #3366ff !important;
  color: #fff !important;
}

.model-btn.active.openai {
  background: #3bb001 !important;
  color: #fff !important;
}

.model-btn.active.gemini {
  background: #6f42c1 !important;
  color: #fff !important;
}

/* ===== CARDS (Azia card style) ======================================= */

.card {
  border: 1px solid var(--az-border-lt) !important;
  border-radius: var(--az-card-radius) !important;
  box-shadow: var(--az-card-shadow) !important;
  background: #fff !important;
  overflow: hidden !important;
}

.card-head {
  background: #fff !important;
  border-bottom: 1px solid var(--az-border-lt) !important;
  border-radius: var(--az-card-radius) var(--az-card-radius) 0 0 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #1c273c !important;
  padding: 14px 20px !important;
}

.card-head.collapsible:hover {
  background: #f4f5f8 !important;
}

/* ===== CONFIG PANEL ================================================= */

.config-panel {
  background: #fff !important;
  border: 1px solid var(--az-border-lt) !important;
  border-radius: var(--az-card-radius) !important;
  box-shadow: var(--az-card-shadow) !important;
}

/* ===== BUTTONS (Azia button style) ================================== */

.btn-fetch,
button.btn-fetch {
  background: #5b47fb !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 2px 6px rgba(91,71,251,.3) !important;
  transition: all 0.15s !important;
}

.btn-fetch:hover:not(:disabled),
button.btn-fetch:hover:not(:disabled) {
  background: #4836e8 !important;
  transform: none !important;
  box-shadow: 0 4px 12px rgba(91,71,251,.4) !important;
}

.btn-fetch:disabled,
button.btn-fetch:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.btn-run-analysis,
button.btn-run-analysis {
  background: #3366ff !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 2px 6px rgba(51,102,255,.25) !important;
}

.btn-run-analysis:hover:not(:disabled),
button.btn-run-analysis:hover:not(:disabled) {
  background: #254eda !important;
  box-shadow: 0 4px 12px rgba(51,102,255,.35) !important;
}

/* Generic Bootstrap button overrides */
.btn-primary {
  background-color: #3366ff !important;
  border-color: #3366ff !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
}

.btn-primary:hover {
  background-color: #254eda !important;
  border-color: #254eda !important;
}

.btn-secondary {
  background-color: #7987a1 !important;
  border-color: #7987a1 !important;
  font-family: 'Roboto', sans-serif !important;
  border-radius: 4px !important;
}

.btn-success {
  background-color: #3bb001 !important;
  border-color: #3bb001 !important;
  border-radius: 4px !important;
}

.btn-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  border-radius: 4px !important;
}

.btn-outline-primary {
  color: #3366ff !important;
  border-color: #3366ff !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
}

.btn-outline-primary:hover {
  background-color: #3366ff !important;
  border-color: #3366ff !important;
  color: #fff !important;
}

/* Approval / reject buttons */
.btn-approve {
  background: #3bb001 !important;
  border-color: #3bb001 !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
}
.btn-approve:hover:not(:disabled) {
  background: #319201 !important;
  border-color: #319201 !important;
}
.btn-approve:disabled {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

.btn-reject {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
}
.btn-reject:hover:not(:disabled) {
  background: #bd2130 !important;
  border-color: #bd2130 !important;
}
.btn-reject:disabled {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* ===== FORMS (Azia form style) ======================================= */

.main-wrapper .form-label,
.main-wrapper label,
.config-panel label,
.config-panel .form-label {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: #1c273c !important;
  margin-bottom: 4px !important;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  font-family: 'Roboto', sans-serif !important;
  font-size: 14px !important;
  color: #1c273c !important;
  border: 1px solid var(--az-border) !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  padding: 8px 12px !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: #3366ff !important;
  box-shadow: 0 0 0 3px rgba(51,102,255,.12) !important;
  outline: none !important;
}

.form-control::placeholder { color: #7987a1 !important; }

.form-select {
  border: 1px solid var(--az-border) !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 14px !important;
  color: #1c273c !important;
}

.form-select:focus {
  border-color: #3366ff !important;
  box-shadow: 0 0 0 3px rgba(51,102,255,.12) !important;
}

.helper {
  font-size: 11px !important;
  color: #7987a1 !important;
  font-family: 'Roboto', sans-serif !important;
}

/* ===== DATE PRESETS ================================================= */

.date-preset {
  background: #fff !important;
  border: 1px solid var(--az-border) !important;
  color: #1c273c !important;
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 5px 14px !important;
  transition: all 0.12s !important;
}

.date-preset:hover:not(.active) {
  background: #f4f5f8 !important;
}

.date-preset.active {
  background: #5b47fb !important;
  border-color: #5b47fb !important;
  color: #fff !important;
}

/* ===== TABLES (Azia table style) ===================================== */

table {
  font-family: 'Roboto', sans-serif;
}

.main-wrapper .table {
  color: #1c273c !important;
  font-size: 13px;
}

.table thead th,
.table > thead > tr > th {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: #7987a1 !important;
  background: #f4f5f8 !important;
  border-bottom: 2px solid var(--az-border-lt) !important;
  border-top: none !important;
  padding: 10px 12px !important;
  white-space: nowrap;
}

.table tbody td,
.table > tbody > tr > td {
  border-top: 1px solid var(--az-border-lt) !important;
  vertical-align: middle !important;
  padding: 10px 12px !important;
  color: #1c273c;
}

.table tbody tr:hover td {
  background: rgba(51,102,255,.02) !important;
}

.table-bordered {
  border: 1px solid var(--az-border-lt) !important;
}

.table-bordered td,
.table-bordered th {
  border: 1px solid var(--az-border-lt) !important;
}

/* ===== BADGES ======================================================= */

.badge {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  font-size: 11px !important;
  border-radius: 3px !important;
  padding: 3px 7px !important;
}

.badge.bg-primary,
.badge-primary   { background-color: #3366ff !important; color: #fff !important; }
.badge.bg-success,
.badge-success   { background-color: #3bb001 !important; color: #fff !important; }
.badge.bg-danger,
.badge-danger    { background-color: #dc3545 !important; color: #fff !important; }
.badge.bg-warning,
.badge-warning   { background-color: #ffc107 !important; color: #1c273c !important; }
.badge.bg-info,
.badge-info      { background-color: #17a2b8 !important; color: #fff !important; }
.badge.bg-secondary,
.badge-secondary { background-color: #7987a1 !important; color: #fff !important; }

/* ===== ALERTS ======================================================= */

.alert {
  border-radius: 4px !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
  border-width: 1px !important;
}

.alert-primary   { background: #e8edff !important; border-color: #c5d0ff !important; color: #254eda !important; }
.alert-success   { background: #e5f5d9 !important; border-color: #bde9a0 !important; color: #287a00 !important; }
.alert-danger    { background: #fde8ea !important; border-color: #f5c0c5 !important; color: #b02232 !important; }
.alert-warning   { background: #fff8e1 !important; border-color: #ffe089 !important; color: #8a6400 !important; }
.alert-info      { background: #e2f3f6 !important; border-color: #a9dfe8 !important; color: #0a6b7c !important; }

/* ===== STATUS COLORS ================================================ */

.text-ok,  .status-ok  { color: #3bb001 !important; }
.text-warn,.status-warn { color: #ffc107 !important; }
.text-bad, .status-bad  { color: #dc3545 !important; }

/* ===== PAGE CONTENT ================================================= */

.page-content {
  background: var(--az-body-bg) !important;
}

/* ===== SCROLLBAR (Azia subtle style) ================================ */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f4f5f8; }
::-webkit-scrollbar-thumb { background: #cdd4e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7987a1; }

/* ===== MAIN WRAPPER ================================================= */

.main-wrapper {
  background: var(--az-body-bg) !important;
}

/* ===== LOGIN PAGE (Azia signin style) =============================== */

.auth-bg,
body.login-page,
.login-wrapper {
  background: linear-gradient(135deg, #254eda 0%, #5b47fb 100%) !important;
}

.auth-card,
.login-card,
.signin-card {
  border-radius: 5px !important;
  box-shadow: 0 0 40px rgba(28,39,60,.15) !important;
  background: #fff !important;
}

/* ===== MODAL (Azia modal style) ===================================== */

.modal-content {
  border: none !important;
  border-radius: 5px !important;
  box-shadow: 0 5px 40px rgba(28,39,60,.2) !important;
}

.modal-header {
  border-bottom: 1px solid var(--az-border-lt) !important;
  font-family: 'Montserrat', sans-serif !important;
}

.modal-footer {
  border-top: 1px solid var(--az-border-lt) !important;
}

.modal-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  color: #1c273c !important;
}

/* ===== PROGRESS BARS =============================================== */

.progress {
  border-radius: 3px !important;
  height: 5px !important;
  background: var(--az-border-lt) !important;
}

.progress-bar {
  background: #3366ff !important;
  border-radius: 3px !important;
}

/* ===== DROPDOWN (Azia dropdown style) =============================== */

.dropdown-menu {
  border: 1px solid var(--az-border-lt) !important;
  border-radius: 4px !important;
  box-shadow: 0 5px 20px rgba(28,39,60,.1) !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
}

.dropdown-item {
  color: #1c273c !important;
  font-size: 13px !important;
  padding: 8px 16px !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: #f4f5f8 !important;
  color: #5b47fb !important;
}

.dropdown-divider {
  border-top-color: var(--az-border-lt) !important;
}

/* ===== NAV TABS (Azia tab style) ==================================== */

.nav-tabs {
  border-bottom: 1px solid var(--az-border) !important;
}

.nav-tabs .nav-link {
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #7987a1 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 16px !important;
  border-radius: 0 !important;
  transition: all 0.15s !important;
}

.nav-tabs .nav-link:hover {
  color: #1c273c !important;
  border-bottom-color: var(--az-border) !important;
  background: none !important;
}

.nav-tabs .nav-link.active {
  color: #5b47fb !important;
  border-bottom: 2px solid #5b47fb !important;
  background: none !important;
  font-weight: 600 !important;
}

/* ===== LIST GROUPS ================================================== */

.list-group-item {
  border-color: var(--az-border-lt) !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
  color: #1c273c !important;
}

/* ===== SIDEBAR PLANNED ITEMS ======================================== */

.sidebar-link-planned {
  opacity: 0.45 !important;
  cursor: default !important;
  pointer-events: none !important;
}

.badge-planned {
  display: inline-block;
  font-size: 9px !important;
  font-weight: 600 !important;
  font-family: 'Montserrat', sans-serif !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #e3e7ed !important;
  color: #7987a1 !important;
  border-radius: 3px !important;
  padding: 1px 5px !important;
  margin-left: 4px;
  vertical-align: middle;
}

.list-group-item.active {
  background: #3366ff !important;
  border-color: #3366ff !important;
}

/* ===== BREADCRUMB =================================================== */

.breadcrumb {
  background: none !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 12px !important;
  padding: 0 !important;
}

.breadcrumb-item a { color: #3366ff !important; }
.breadcrumb-item.active { color: #7987a1 !important; }
.breadcrumb-item + .breadcrumb-item::before { color: #cdd4e0 !important; }

/* ===== PAGINATION =================================================== */

.page-link {
  color: #3366ff !important;
  border-color: var(--az-border) !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
}

.page-item.active .page-link {
  background: #3366ff !important;
  border-color: #3366ff !important;
  color: #fff !important;
}

.page-link:hover {
  background: #f4f5f8 !important;
  color: #254eda !important;
}

/* ===== TOOLTIPS & POPOVERS ========================================== */

.tooltip-inner {
  font-family: 'Roboto', sans-serif !important;
  font-size: 12px !important;
  border-radius: 3px !important;
}

/* ===== SPINNERS / LOADING =========================================== */

.spinner-border {
  color: #3366ff;
}

/* ===== INLINE STATUS BADGE OVERRIDES ================================ */

[class*="status-badge"],
[class*="state-badge"] {
  font-family: 'Roboto', sans-serif !important;
  font-size: 11px !important;
  border-radius: 3px !important;
}

/* ===== RESPONSIVE (mobile) ========================================== */

@media (max-width: 991.98px) {
  .sidebar {
    box-shadow: 3px 0 20px rgba(28,39,60,.12) !important;
  }
}
