/* Modern UI layer (design-driven)
   - No markup/functionality changes required
   - Loaded after theme.css/style.css/primary-override.css
*/

:root {
  --ui-bg: #f9f9fc;
  --ui-surface: #ffffff;
  --ui-surface-2: #f3f3f6;
  --ui-surface-3: #eeeef0;
  --ui-text: #1a1c1e;
  --ui-text-2: #3c4a43;
  --ui-outline: #bbcac1;

  --ui-primary: #00c896;
  --ui-primary-2: #006c4f;

  --ui-radius-lg: 14px;
  --ui-radius-md: 12px;
  --ui-radius-sm: 10px;

  --ui-shadow: 0 20px 50px rgba(26, 28, 30, 0.06);
  --ui-shadow-soft: 0 10px 30px rgba(26, 28, 30, 0.06);
}

/* Base typography */
html, body {
  background: var(--ui-bg);
}
body, .content, .main, #content {
  font-family: "Montserrat", "Inter", "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6 {
  font-family: "Montserrat", "Manrope", "Inter", "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  letter-spacing: -0.01em;
}

/* Cards / boxes */
.box {
  border: 1px solid rgba(187, 202, 193, 0.35);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow);
  background: var(--ui-surface);
}
.box .box-header {
  border-bottom: 1px solid rgba(187, 202, 193, 0.35);
  background: transparent;
  border-top-left-radius: var(--ui-radius-lg);
  border-top-right-radius: var(--ui-radius-lg);
}
.box .box-header h2 {
  font-weight: 700;
}
.box .box-content {
  border-bottom-left-radius: var(--ui-radius-lg);
  border-bottom-right-radius: var(--ui-radius-lg);
}

/* Header bar (existing navbar) */
#header.navbar {
  height: 76px;
  background: rgba(249, 249, 252, 0.80) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(187, 202, 193, 0.35) !important;
  box-shadow: 0 10px 30px rgba(26, 28, 30, 0.05);
}
#header.navbar .navbar-brand .logo {
  font-weight: 800;
  letter-spacing: -0.02em;
}
#header.navbar .btn {
  border-radius: 999px !important;
}
#header.navbar .btn,
#header.navbar .nav > li > a,
#header.navbar .navbar-brand,
#header.navbar .navbar-brand .logo {
  color: var(--ui-text) !important;
}
#header.navbar .btn:hover,
#header.navbar .nav > li > a:hover,
#header.navbar .btn:focus,
#header.navbar .nav > li > a:focus {
  background: rgba(243, 243, 246, 0.85) !important;
}
#header.navbar .number {
  border-radius: 999px;
}

/* Sidebar */
#sidebar-left,
#sidebar_menu,
.sidebar-nav {
  border-right: 1px solid rgba(187, 202, 193, 0.20);
}
.sidebar-nav > ul > li > a {
  border-radius: 12px;
  margin: 4px 10px;
  transition: background-color .2s ease, color .2s ease;
}
.sidebar-nav > ul > li > a .text {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar-nav > ul > li > a .chevron {
  opacity: 0.55;
}
.sidebar-nav > ul > li.active > a,
.nav.main-menu > li.active > a,
.sidebar-nav > ul > li > a:hover {
  background: rgba(0, 200, 150, 0.16) !important;
}
.sidebar-nav > ul > li.active > a,
.sidebar-nav > ul > li > a:hover {
  color: var(--ui-text) !important;
}
.sidebar-nav > ul > li > ul {
  border-radius: var(--ui-radius-lg);
  margin: 6px 10px 10px 10px;
  padding: 6px 0;
  border: 1px solid rgba(187, 202, 193, 0.35);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}
.sidebar-nav > ul > li > ul > li > a {
  border-radius: 12px;
  margin: 2px 8px;
  padding: 10px 12px;
  font-weight: 600;
}
.sidebar-nav > ul > li > ul > li > a:hover {
  background: rgba(243, 243, 246, 0.85) !important;
}

/* Quick links -> modern “action cards” */
.quick-button.small {
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  border: 1px solid rgba(187, 202, 193, 0.35);
  box-shadow: var(--ui-shadow-soft);
  padding: 18px 10px 12px 10px;
}
.quick-button.small.white,
.quick-button.small.white:hover,
.quick-button.small.white:focus {
  color: var(--ui-text) !important;
}
.quick-button.small[class*="b"] {
  /* override legacy colored tiles (bblue, bred, etc.) */
  background: var(--ui-surface) !important;
}
.quick-button.small i {
  font-size: 20px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 200, 150, 0.16);
  color: var(--ui-primary);
}
.quick-button.small p {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.01em;
}

/* Tables (global look for DataTables) */
.table,
table.table {
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(187, 202, 193, 0.35);
}
.table > thead > tr > th {
  background: rgba(243, 243, 246, 0.9) !important;
  color: var(--ui-text-2) !important;
  border-color: rgba(187, 202, 193, 0.35) !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .10em;
  font-weight: 800;
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(243, 243, 246, 0.45);
}
.table > tbody > tr:hover {
  background-color: rgba(243, 243, 246, 0.9);
}

/* DataTables wrapper (global) */
div.dataTables_wrapper {
  font-family: inherit;
}
div.dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}
div.dataTables_length,
div.dataTables_filter,
div.dataTables_info,
div.dataTables_paginate {
  padding: 10px 0;
}
div.dataTables_length label,
div.dataTables_filter label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(60, 74, 67, 0.75);
}
div.dataTables_filter input[type="search"],
div.dataTables_filter input[type="text"] {
  width: 320px;
  max-width: 100%;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(187, 202, 193, 0.55) !important;
  background: rgba(243, 243, 246, 0.85) !important;
}
div.dataTables_length select {
  border-radius: 999px !important;
  border: 1px solid rgba(187, 202, 193, 0.55) !important;
  background: rgba(243, 243, 246, 0.85) !important;
  padding: 6px 10px !important;
  height: auto;
}

/* Pagination */
div.dataTables_paginate ul.pagination > li > a,
div.dataTables_paginate ul.pagination > li > span {
  border-radius: 999px !important;
  margin: 0 3px;
  border: 1px solid rgba(187, 202, 193, 0.45) !important;
}
div.dataTables_paginate ul.pagination > li.active > a,
div.dataTables_paginate ul.pagination > li.active > span {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #fff !important;
}

/* Table actions dropdown buttons (keep compact + modern) */
.btn-group > .btn,
.btn-group-vertical > .btn {
  border-radius: 999px !important;
}
.dropdown-menu {
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(187, 202, 193, 0.45);
  box-shadow: var(--ui-shadow);
}
.dropdown-menu > li > a {
  padding: 10px 14px;
  font-weight: 600;
}

/* Forms */
.form-control,
input[type="text"], input[type="password"], input[type="email"],
select, textarea {
  border-radius: 999px;
  border: 1px solid rgba(187, 202, 193, 0.55) !important;
  background: rgba(243, 243, 246, 0.8) !important;
  box-shadow: none !important;
}
.form-control:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
select:focus, textarea:focus {
  border-color: rgba(0, 200, 150, 0.70) !important;
  box-shadow: 0 0 0 4px rgba(0, 200, 150, 0.18) !important;
  outline: none !important;
}
textarea.form-control, textarea {
  border-radius: var(--ui-radius-md);
}
.input-group .form-control {
  border-radius: 999px 0 0 999px;
}
.input-group-addon, .input-group-btn .btn {
  border-radius: 0 999px 999px 0;
}
.select2-container .select2-choice,
.select2-container-multi .select2-choices {
  border-radius: 999px !important;
  border: 1px solid rgba(187, 202, 193, 0.55) !important;
  background: rgba(243, 243, 246, 0.8) !important;
}
.select2-drop,
.select2-drop-active {
  border-radius: var(--ui-radius-lg) !important;
  border: 1px solid rgba(187, 202, 193, 0.45) !important;
  box-shadow: var(--ui-shadow);
}

/* Buttons (modern sizing) */
.btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn.btn-sm, .btn-sm {
  padding: 6px 12px;
}
.btn.btn-xs, .btn-xs {
  padding: 4px 10px;
}

/* Modals */
.modal-content {
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(187, 202, 193, 0.45);
  box-shadow: var(--ui-shadow);
}
.modal-header {
  border-bottom: 1px solid rgba(187, 202, 193, 0.35);
}
.modal-footer {
  border-top: 1px solid rgba(187, 202, 193, 0.35);
}

/* Alerts */
.alert {
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(187, 202, 193, 0.35);
  box-shadow: var(--ui-shadow-soft);
}
.alert-success { background: rgba(0, 200, 150, 0.10) !important; border-color: rgba(0, 200, 150, 0.35) !important; color: var(--ui-text) !important; }
.alert-info { background: rgba(14, 165, 233, 0.10) !important; border-color: rgba(14, 165, 233, 0.25) !important; color: var(--ui-text) !important; }
.alert-warning { background: rgba(245, 158, 11, 0.12) !important; border-color: rgba(245, 158, 11, 0.25) !important; color: var(--ui-text) !important; }
.alert-danger { background: rgba(239, 68, 68, 0.10) !important; border-color: rgba(239, 68, 68, 0.22) !important; color: var(--ui-text) !important; }

/* Badges/labels (more modern) */
.label, .badge {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* DataTables TableTools / export buttons */
div.DTTT .btn,
.DTTT .btn {
  border-radius: 999px !important;
  border: 1px solid rgba(187, 202, 193, 0.45) !important;
  background: rgba(243, 243, 246, 0.85) !important;
}
div.DTTT .btn:hover,
.DTTT .btn:hover {
  background: rgba(243, 243, 246, 1) !important;
}

/* iCheck (checkbox/radio) container spacing */
.icheckbox_square-blue,
.iradio_square-blue {
  border-radius: 6px;
}

/* Primary gradient buttons (optional utility class) */
.btn.ui-gradient {
  background: linear-gradient(135deg, var(--ui-primary-2) 0%, var(--ui-primary) 100%) !important;
  border: none !important;
  color: #fff !important;
}


