@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

/* ==============================
   CSS CUSTOM PROPERTIES
============================== */
:root {
  --color-primary:       #1d4ed8;
  --color-primary-dark:  #1e40af;
  --color-primary-light: #3b82f6;
  --color-success:       #22c55e;
  --color-warning:       #f59e0b;
  --color-danger:        #ef4444;
  --color-info:          #3b82f6;
  --color-surface:       #ffffff;
  --color-bg:            #f1f5f9;
  --color-bg-alt:        #f8fafc;
  --color-text:          #1e293b;
  --color-text-muted:    #64748b;
  --color-text-subtle:   #94a3b8;
  --color-border:        #e2e8f0;
  --color-border-light:  #f1f5f9;
  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.14);
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --transition: all 0.25s ease;
  --sidebar-width:  250px;
  --header-height:  60px;
}

/* ==============================
   SELECTION
============================== */
::selection      { background: var(--color-primary); color: #ffffff; }
::-moz-selection { background: var(--color-primary); color: #ffffff; }

/* ==============================
   BASE / RESPONSIVENESS
============================== */
html {
  font-size: 15px;
  background-color: var(--color-bg);
  scroll-behavior: smooth;
}
@media only screen and (min-width: 480px)  { html { font-size: 15px; } }
@media only screen and (min-width: 768px)  { html { font-size: 15px; } }
@media only screen and (min-width: 1024px) { html { font-size: 15px; } p { font-size: 1rem; line-height: 1.8; margin-bottom: 1.5rem; } }

/* ==============================
   BODY DEFAULTS
============================== */
body {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.content-wrapper,
.content-wrapper table,
.content-wrapper .table,
.content-wrapper .form-control,
.content-wrapper .panel,
.content-wrapper .modal,
.content-wrapper label {
  font-size: 0.9375rem;
}
.content-wrapper table tbody td,
.content-wrapper .table tbody td {
  font-size: 0.8125rem;
}

/* ---------- #3 Horizontal scroll for ALL tables ---------- */
.content-wrapper .table-responsive,
.content-wrapper .auto-x-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.content-wrapper .auto-x-scroll > table,
.content-wrapper .table-responsive > table { min-width: 100%; }

/* ---------- #1 Mobile KPI-card view (3-column grid per row) ----------
   Targets DataTables (`.dataTable` is added on init) and any opt-in
   `.kpi-card-mobile` table. Non-DataTable tables stay as regular tables. */
@media (max-width: 767px) {
  body:not(.no-mobile-cards) .content-wrapper table.dataTable,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile {
    display: block;
    width: 100% !important;
    border: none;
    background: transparent;
  }
  body:not(.no-mobile-cards) .content-wrapper table.dataTable thead,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile thead { display: none; }

  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody { display: block; }

  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody tr,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
    padding: 12px;
    margin: 0 0 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
  }

  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody td,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody td {
    display: block;
    padding: 2px 0;
    border: none;
    font-size: 12px;
    line-height: 1.3;
    color: var(--color-text);
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left !important;
  }
  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody td::before,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }
  /* Action cells: span full row width */
  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody td.kpi-full,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody td.kpi-full {
    grid-column: 1 / -1;
  }
  body:not(.no-mobile-cards) .content-wrapper table.dataTable tbody td .btn,
  body:not(.no-mobile-cards) .content-wrapper table.kpi-card-mobile tbody td .btn { padding: 4px 10px; font-size: 12px; }

  /* DataTables wrapper tweaks for cleaner mobile view */
  body:not(.no-mobile-cards) .content-wrapper .dataTables_wrapper .dataTables_length,
  body:not(.no-mobile-cards) .content-wrapper .dataTables_wrapper .dataTables_filter { float: none; text-align: left; margin-bottom: 6px; }
  body:not(.no-mobile-cards) .content-wrapper .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ==============================
   BUTTONS
============================== */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn i { font-size: 1rem; }
.btn.text-left { justify-content: flex-start; }

.btn-brand {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.btn-brand:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  transform: translateY(-1px);
  color: #ffffff;
}
.btn-dark {
  background: #1e293b;
  color: #ffffff;
  border: none;
}
.btn-dark:hover {
  background: #0f172a;
  box-shadow: var(--shadow-md);
  color: #ffffff;
}
.btn-red {
  background: var(--color-danger);
  color: #ffffff;
  border: none;
}
.btn-red:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  color: #ffffff;
}
.btn-alt {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-alt:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* ==============================
   BACKGROUND COLORS
============================== */
.bk-primary { background: var(--color-primary); }
.bk-success { background: var(--color-success); }
.bk-warning { background: var(--color-warning); }
.bk-danger  { background: var(--color-danger); }
.bk-info    { background: var(--color-info); }
.bk-white   { background: #ffffff; }
.bk-light   { background: var(--color-bg-alt); }
.bk-brand   { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%); }
.bk-dark    { background: #1e293b; }
.bk-blue    { background: var(--color-primary); }
.bk-alt     { background: #f1f5f9; }
.bk-ghost   { background: transparent; }
.bk-img {
  position: relative;
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url(../../img/login-bg.jpg);
}
.bk-fixed { background-attachment: fixed; }

/* ==============================
   DIVIDERS
============================== */
.hr-green {
  height: 3px;
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-light));
  border: none;
  border-radius: 2px;
}
.hr-grey {
  height: 1px;
  background: var(--color-border);
  border: none;
}
.hr-dashed {
  background: transparent;
  border-top: 2px dashed var(--color-border);
  height: 0;
  margin: 1.5rem 0;
}

/* ==============================
   PANEL
============================== */
.panel {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==============================
   BORDER UTILITY
============================== */
.brdr {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* ==============================
   TEXT UTILITIES
============================== */
.font-one       { font-family: 'Inter', sans-serif; font-weight: 700; }
.text-bold      { font-weight: 700; }
.text-normal    { font-weight: 400; }
.text-thin      { font-weight: 300; }
.text-lowercase { text-transform: none; }
.text-sm        { font-size: 0.875rem; }
.text-lg        { font-size: 1.25rem; }
.text-xl        { font-size: 1.5rem; }
.text-2x        { font-size: 2rem; }
.text-3x        { font-size: 2.5rem; }
.text-4x        { font-size: 3rem; }
.text-white,
.text-light     { color: #ffffff !important; }
.link-white a   { color: #ffffff; }
.text-grey      { color: var(--color-text-muted); }
.text-dgrey     { color: #475569; }
.text-brand     { color: var(--color-primary); }
.text-yellow    { color: #eab308; }
.title .line {
  display: inline-block;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-primary);
}

/* ==============================
   MODAL
============================== */
.modal-content {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
}
.modal-content p,
.modal-content label,
.modal-content input,
.modal-content select,
.modal-content textarea   { font-size: 0.9rem; }
.modal-content .col-form-label { font-size: 0.85rem; }
.modal-content input,
.modal-content select,
.modal-content textarea   { font-size: 0.85rem; }

.modal-header .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.modal-header .close:hover {
  color: var(--color-text);
  transform: scale(1.15);
}

/* ==============================
   SPACING UTILITIES
============================== */
.mt    { margin-top: 1.5rem; }
.mt-0x { margin-top: 0 !important; }
.mt-2x { margin-top: 3rem; }
.mt-3x { margin-top: 4.5rem; }
.mt-4x { margin-top: 6rem; }
.mt-5x { margin-top: 9rem; }
.mb    { margin-bottom: 1.5rem; }
.mb-0x { margin-bottom: 0 !important; }
.mb-2x { margin-bottom: 3rem; }
.mb-3x { margin-bottom: 4.5rem; }
.mb-4x { margin-bottom: 6rem; }
.mb-5x { margin-bottom: 9rem; }
.pt    { padding-top: 1.5rem; }
.pt-2x { padding-top: 3rem; }
.pt-3x { padding-top: 4.5rem; }
.pt-4x { padding-top: 6rem; }
.pt-5x { padding-top: 9rem; }
.pb    { padding-bottom: 1.5rem; }
.pb-2x { padding-bottom: 3rem; }
.pb-3x { padding-bottom: 4.5rem; }
.pb-4x { padding-bottom: 6rem; }
.pb-5x { padding-bottom: 9rem; }

/* ==============================
   CONTENT BOXES
============================== */
.content-box {
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.content-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.block-anchor { display: block; }

/* ==============================
   CONTENT TYPOGRAPHY
============================== */
.content-format {
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.01rem;
  color: var(--color-text);
}
.content-format h1,
.content-format h2,
.content-format h3,
.content-format h4,
.content-format h5,
.content-format h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
}
.content-format h1 a,
.content-format h2 a,
.content-format h3 a,
.content-format h4 a,
.content-format h5 a,
.content-format h6 a { color: var(--color-primary); }
.content-format h2 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}
.content-format h3 { font-size: 1.625rem; line-height: 1.3; margin-bottom: 0.75rem; }
.content-format h4 { font-size: 1.375rem; line-height: 1.4; margin-bottom: 0.5rem; }
.content-format h5 { font-size: 1.125rem; line-height: 1.5; margin-bottom: 0.5rem; }
.content-format h6 { font-size: 1rem;     line-height: 1.5; margin-bottom: 0.5rem; }
.content-format strong { font-weight: 700; }
.content-format ul:not(.social-awesome) {
  list-style: disc;
  margin: 1.25rem 0;
  padding-left: 1.75rem;
}
.content-format ul:not(.social-awesome) li { margin-bottom: 0.4rem; }
.content-format ul:not(.social-awesome).list-unstyled { list-style: none; padding-left: 1rem; }
.content-format em { font-style: italic; }
.content-format p  { margin-bottom: 1.25rem; }
.content-format figure { margin-bottom: 1.5rem; }
.content-format figure .caption { color: var(--color-text-muted); font-size: 0.875rem; }
.content-format img { border-radius: var(--radius-sm); max-width: 100%; height: auto; }
.content-format .fa { color: var(--color-primary); margin-right: 0.625rem; }
.content-format blockquote {
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.0625rem;
  color: #475569;
  margin: 1.5rem 0;
}
.content-format blockquote.double-quote { border-left: none; padding-left: 1rem; }
.content-format pre {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  line-height: 1.6;
}
.content-format ol { list-style: decimal; margin: 1.25rem 0; padding-left: 1.75rem; }
.content-format img.wp-smiley,
.content-format img.emoji {
  display: inline !important;
  border: none !important;
  box-shadow: none !important;
  height: 1rem !important;
  width: 1rem !important;
  margin: 0 0.1rem !important;
  vertical-align: -0.1rem !important;
  background: none !important;
  padding: 0 !important;
}

/* ==============================
   LIST RESET
============================== */
ul, li { margin: 0; padding: 0; list-style: none; }

/* ==============================
   SOCIAL & CIRCLE BUTTONS
============================== */
.btn-social { padding-left: 3.5rem; }
.btn-social > :first-child { width: 2.75rem; line-height: 2.75rem; }
.btn-circle {
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
  border-radius: 50%;
  text-align: center;
  font-size: 0.875rem;
}
.btn-circle.btn-lg { width: 3rem; height: 3rem; padding: 0.625rem; font-size: 1.125rem; }
.btn-circle.btn-xl { width: 4rem; height: 4rem; padding: 0.75rem;  font-size: 1.5rem; }

/* ==============================
   CHART ELEMENTS
============================== */
.chart-dot-list { margin-top: 2.5rem; margin-left: 1.5rem; }
.chart-dot-list li { margin-bottom: 0.5rem; }
.chart-dot-list li:before {
  content: '';
  height: 0.75rem;
  width: 0.75rem;
  margin-right: 0.5rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}
.chart-dot-list li.a1:before { background: var(--color-primary); }
.chart-dot-list li.a2:before { background: var(--color-primary-light); }
.chart-dot-list li.a3:before { background: #93c5fd; }
.chart-doughnut { padding: 2rem 0; }

/* ==============================
   PAGE TITLE
============================== */
.page-title {
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

/* ==============================
   BRAND HEADER
============================== */
.brand {
  background: var(--color-surface);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--color-border), var(--shadow-xs);
  margin-bottom: 0;
}
.brand .logo {
  padding: 1rem 1.25rem;
  float: left;
  width: 180px;
}
@media only screen and (min-width: 992px) {
  .brand .logo { width: 220px; }
}
.brand .logo img { height: 28px; }
.brand .menu-btn {
  float: right;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.25s ease;
}
.brand .menu-btn:hover { background: var(--color-primary-dark); }
@media only screen and (min-width: 992px) {
  .brand .menu-btn { display: none; }
}
.brand .ts-profile-nav { float: right; display: none; }
.brand .ts-profile-nav li { float: left; }
.brand .ts-profile-nav li a {
  padding: 1rem 1.25rem;
  color: var(--color-text);
  display: block;
  transition: background 0.25s ease, color 0.25s ease;
}
.brand .ts-profile-nav li a:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}
.brand .ts-profile-nav li ul {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  right: 0;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  min-width: 200px;
}
.brand .ts-profile-nav li ul li { float: none; }
.brand .ts-profile-nav li ul li a { padding: 0.625rem 1.25rem; }
.brand .ts-profile-nav .ts-account .fa-angle-down { margin-left: 0.5rem; }
.brand .ts-profile-nav .ts-account > a { min-width: 180px; }
.brand .ts-profile-nav .ts-account .ts-avatar {
  border-radius: 50%;
  height: 30px;
  margin-right: 0.625rem;
  vertical-align: middle;
}
.brand .ts-profile-nav .ts-account:hover ul { visibility: visible; opacity: 1; }
@media only screen and (min-width: 992px) {
  .brand .ts-profile-nav { display: block; }
}

/* ==============================
   SIDEBAR
============================== */
.ts-sidebar::-webkit-scrollbar-track { background-color: transparent; }
.ts-sidebar::-webkit-scrollbar       { width: 4px; background-color: transparent; }
.ts-sidebar::-webkit-scrollbar-thumb { background-color: var(--color-border); border-radius: 4px; }

.ts-sidebar {
  background: var(--color-surface);
  max-height: 0;
  transition: max-height 0.3s ease;
  overflow: hidden;
  position: fixed;
  z-index: 2;
  width: 100%;
  bottom: 0;
  top: var(--header-height);
  overflow-y: auto;
  border-right: 1px solid var(--color-border);
}
.ts-sidebar .hidden-side { display: none; }
.ts-sidebar .ts-sidebar-search {
  width: 100%;
  background: var(--color-bg-alt);
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-size: 0.875rem;
}
.ts-sidebar .ts-sidebar-search:focus {
  outline: none;
  background: var(--color-surface);
}
@media only screen and (min-width: 992px) {
  .ts-sidebar .ts-profile-nav { display: none; }
  .ts-sidebar { max-height: 100%; bottom: 0; width: var(--sidebar-width); right: auto; }
  .ts-main-content .content-wrapper { margin-left: var(--sidebar-width); }
  body.no-sidebar .ts-main-content .content-wrapper { margin-left: 0; }
}
body.no-sidebar .brand.sh-bar .sh-sidebar-toggle { display: none !important; }
@media (max-width: 991px) {
  body.no-sidebar .brand.sh-bar .site-name { text-align: left; padding-left: 4px; }
}
.ts-sidebar.menu-open { max-height: calc(100vh - var(--header-height)); bottom: 0; box-shadow: var(--shadow-md); }
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .ts-sidebar { width: var(--sidebar-width); right: auto; }
}

/* Sidebar section labels */
.ts-sidebar-menu .ts-label {
  color: var(--color-text-subtle);
  font-weight: 600;
  padding: 1rem 1.25rem 0.375rem;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

/* Sidebar links */
.ts-sidebar-menu a {
  display: block;
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.ts-sidebar-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
  border-left-color: var(--color-border);
}

/* Active state — supports `active` on either <li> or <a> */
.ts-sidebar-menu li.active,
.ts-sidebar-menu li:has(> a.active) {
  background: #eff6ff;
  border-left: 3px solid var(--color-primary);
}
.ts-sidebar-menu li.active > a,
.ts-sidebar-menu > li > a.active {
  background: #eff6ff;
  color: var(--color-primary);
  font-weight: 700;
  border-left: 3px solid var(--color-primary);
  padding-left: calc(1.25rem - 3px);
}
.ts-sidebar-menu li.active > a i,
.ts-sidebar-menu > li > a.active i { color: var(--color-primary) !important; }
/* Keep the rest of the original active rules below working */
.ts-sidebar-menu li.active > a {
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: transparent;
}

.ts-sidebar-menu li { position: relative; }
.ts-sidebar-menu li i {
  color: var(--color-text-muted);
  margin-right: 0.625rem;
  width: 1rem;
  text-align: center;
  font-size: 0.9375rem;
  transition: color 0.25s ease;
}
.ts-sidebar-menu li.active i { color: var(--color-primary); }
.ts-sidebar-menu a:hover i   { color: var(--color-primary); }

/* Sub-menu */
.ts-sidebar-menu li ul {
  display: block;
  background: var(--color-bg-alt);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.menu-open,
.ts-sidebar-menu .open > ul {
  max-height: 2000px;
  background-color: var(--color-bg-alt);
}
.ts-sidebar-menu .open > a {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 500;
}
.ts-sidebar-menu > .open > a {
  background: var(--color-surface);
  border-left-color: var(--color-primary);
}
.ts-sidebar-menu .open > .more i { transform: rotate(180deg); }

.more {
  float: right;
  min-width: 10%;
  cursor: pointer;
}
.more i {
  color: var(--color-text-muted);
  padding: 0.7rem 1rem;
  transition: transform 0.3s ease;
  font-size: 0.875rem;
}

/* Icons inside sidebar menu links */
.ts-sidebar-menu li a .fa {
  color: var(--color-text-muted) !important;
  margin-right: 0.5rem;
  transition: color 0.25s ease;
}
.ts-sidebar-menu li.active a .fa,
.ts-sidebar-menu a:hover .fa { color: var(--color-primary) !important; }

/* ==============================
   MAIN CONTENT LAYOUT
============================== */
.ts-main-content .content-wrapper {
  padding-top: 1rem;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ==============================
   LOGIN PAGE
============================== */
.login-page {
  position: fixed;
  height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==============================
   FORM ELEMENTS
============================== */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-surface);
}
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
  outline: none;
}

/* ==============================
   TABLE STYLING
============================== */
.table-responsive {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}
th {
  background: var(--color-bg-alt);
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--color-border);
}
td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.875rem;
  color: var(--color-text);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--color-bg-alt); }

/* ==============================
   CARD STYLING
============================== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Hide number input spinner arrows (global) ── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
