/* ============================================
   SimplePOS - Theme System
   Light (Blue & White) + Dark Mode (toggled)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =============================================
   SECTION 1: LIGHT THEME — Blue & White
   ============================================= */
body,
html {
  font-family: 'Inter', sans-serif !important;
}

body {
  background: #eef2f7 !important;
  color: #2d3748 !important;
}

/* -- Login Light -- */
.login-page,
[class*="login-page"] {
  background: linear-gradient(135deg, #1e3a6e 0%, #2c5aa0 40%, #4a90d9 100%) !important;
}

.login-box .login-logo a {
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-box .login-logo b {
  color: #fff !important;
}

.login-box-body {
  background: #fff !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  padding: 30px !important;
}

.login-box-msg {
  color: #64748b !important;
}

.login-box-body .form-control {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  border-radius: 8px !important;
  height: 44px !important;
}

.login-box-body .form-control:focus {
  border-color: #2c5aa0 !important;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15) !important;
}

.login-box-body .btn-primary {
  background: linear-gradient(135deg, #2c5aa0, #4a90d9) !important;
  border: none !important;
  border-radius: 8px !important;
  height: 44px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3) !important;
}

.login-box-body .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4) !important;
  transform: translateY(-1px);
}

.login-box-body .glyphicon.form-control-feedback {
  color: #94a3b8 !important;
}

/* -- Header / Navbar -- */
.main-header {
  border: none !important;
}

.main-header .logo {
  background: #1e3a6e !important;
  color: #fff !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-weight: 700 !important;
}

.main-header .logo b {
  color: #93c5fd !important;
}

.main-header .logo:hover {
  background: #1a3461 !important;
}

.main-header .navbar {
  background: linear-gradient(135deg, #2c5aa0, #3b6fb6) !important;
  box-shadow: 0 2px 10px rgba(44, 90, 160, 0.3) !important;
  border: none !important;
}

.main-header .navbar .nav>li>a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.main-header .navbar .nav>li>a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.main-header .navbar .nav>li>a>.label {
  background: #f59e0b !important;
}

.main-header .navbar .sidebar-toggle {
  color: rgba(255, 255, 255, 0.85) !important;
}

.main-header .navbar .sidebar-toggle:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* -- Sidebar -- */
.main-sidebar,
.left-side {
  background: #1e3a6e !important;
}

.sidebar-menu>li>a {
  color: rgba(255, 255, 255, 0.7) !important;
  border-left: 3px solid transparent !important;
  transition: all 0.2s !important;
  padding: 12px 15px !important;
}

.sidebar-menu>li>a>.fa {
  color: rgba(255, 255, 255, 0.5) !important;
}

.sidebar-menu>li:hover>a,
.sidebar-menu>li.active>a {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-left-color: #93c5fd !important;
}

.sidebar-menu>li:hover>a>.fa,
.sidebar-menu>li.active>a>.fa {
  color: #93c5fd !important;
}

.sidebar-menu .treeview-menu {
  background: rgba(0, 0, 0, 0.15) !important;
}

.sidebar-menu .treeview-menu>li>a {
  color: rgba(255, 255, 255, 0.55) !important;
  padding: 8px 15px 8px 30px !important;
}

.sidebar-menu .treeview-menu>li>a:hover,
.sidebar-menu .treeview-menu>li.active>a {
  color: #93c5fd !important;
  background: transparent !important;
}

.sidebar-menu li.header {
  color: rgba(255, 255, 255, 0.4) !important;
  background: #1a3461 !important;
}

/* -- Content Area -- */
.content-wrapper,
.right-side {
  background: #eef2f7 !important;
}

.content-header {
  border-bottom: 1px solid #dce3ed !important;
}

.content-header>h1 {
  color: #1e293b !important;
  font-weight: 600 !important;
}

.breadcrumb {
  background: transparent !important;
}

.breadcrumb>li>a {
  color: #2c5aa0 !important;
}

.breadcrumb>.active {
  color: #64748b !important;
}

/* -- Cards / Boxes -- */
.box {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06) !important;
  border-top: none !important;
  overflow: hidden;
}

.box-primary {
  border-top: 3px solid #2c5aa0 !important;
}

.box-success {
  border-top: 3px solid #059669 !important;
}

.box-danger {
  border-top: 3px solid #dc2626 !important;
}

.box-warning {
  border-top: 3px solid #f59e0b !important;
}

.box-info {
  border-top: 3px solid #0284c7 !important;
}

.box .box-header {
  background: transparent !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 15px 20px !important;
}

.box .box-header .box-title {
  color: #1e293b !important;
  font-weight: 600 !important;
  font-size: 15px !important;
}

.box .box-body {
  padding: 20px !important;
}

.box-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* -- Tables -- */
.table>thead>tr>th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 11px !important;
  letter-spacing: 0.5px;
}

.table>tbody>tr>td {
  border-top: 1px solid #f1f5f9 !important;
  padding: 10px 8px !important;
  vertical-align: middle !important;
}

.table>tbody>tr:hover>td {
  background: #f0f6ff !important;
}

.table-striped>tbody>tr:nth-of-type(odd)>td {
  background: #fafbfd !important;
}

.table-bordered,
.table-bordered>thead>tr>th,
.table-bordered>tbody>tr>td {
  border-color: #e2e8f0 !important;
}

.table>tfoot>tr>th,
.table>tfoot>tr>td {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

tr.active>td,
tr.active>th,
.table>thead>tr.active>th {
  background: #f1f5f9 !important;
}

/* -- DataTables -- */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #2c5aa0 !important;
  color: #fff !important;
  border-color: #2c5aa0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #2c5aa0 !important;
  color: #fff !important;
  border-color: #2c5aa0 !important;
}

div.dt-buttons .btn {
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  border-radius: 6px !important;
}

div.dt-buttons .btn:hover {
  background: #2c5aa0 !important;
  color: #fff !important;
  border-color: #2c5aa0 !important;
}

/* -- Forms -- */
.form-control {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  border-radius: 8px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.form-control:focus {
  border-color: #2c5aa0 !important;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.12) !important;
}

.input-group-addon {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

.text_filter {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
}

/* -- Buttons -- */
.btn {
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}

.btn-primary {
  background: #2c5aa0 !important;
  border-color: #2c5aa0 !important;
  color: #fff !important;
}

.btn-primary:hover {
  background: #234a85 !important;
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3) !important;
}

.btn-success {
  background: #059669 !important;
  border-color: #059669 !important;
}

.btn-success:hover {
  background: #047857 !important;
}

.btn-danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.btn-warning {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #fff !important;
}

.btn-info {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
}

.btn-default {
  background: #fff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.btn-default:hover {
  background: #f1f5f9 !important;
}

.btn-flat {
  border-radius: 6px !important;
}

.btn-app {
  background: #fff !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

.btn-app:hover {
  border-color: #2c5aa0 !important;
  color: #2c5aa0 !important;
  transform: translateY(-1px);
}

.btn-app>.fa {
  color: #2c5aa0 !important;
}

.bg-purple {
  background-color: #7c3aed !important;
}

.bg-navy {
  background-color: #1e3a6e !important;
}

/* -- Dropdowns -- */
.dropdown-menu {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.dropdown-menu>li>a {
  color: #334155 !important;
  padding: 8px 15px !important;
}

.dropdown-menu>li>a:hover {
  background: #f0f6ff !important;
  color: #2c5aa0 !important;
}

.dropdown-menu .divider {
  background: #e2e8f0 !important;
}

/* -- Modals -- */
.modal-content {
  background: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

.modal-header .modal-title {
  color: #1e293b !important;
  font-weight: 600 !important;
}

.modal-footer {
  border-top: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}

/* -- Alerts -- */
.alert {
  border-radius: 8px !important;
  border: none !important;
}

.alert-success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-left: 4px solid #059669 !important;
}

.alert-danger {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border-left: 4px solid #dc2626 !important;
}

.alert-warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border-left: 4px solid #f59e0b !important;
}

.alert-info {
  background: #eff6ff !important;
  color: #1e40af !important;
  border-left: 4px solid #2c5aa0 !important;
}

/* -- Labels -- */
.label {
  border-radius: 6px !important;
  font-weight: 500 !important;
  padding: 4px 8px !important;
}

.label-primary {
  background: #2c5aa0 !important;
}

.label-success {
  background: #059669 !important;
}

.label-danger {
  background: #dc2626 !important;
}

.label-warning {
  background: #f59e0b !important;
  color: #fff !important;
}

/* -- Well -- */
.well {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
}

/* -- Select2 -- */
.select2-container .select2-choice,
.select2-container .select2-choices,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
}

.select2-results .select2-highlighted,
.select2-container--default .select2-results__option--highlighted {
  background: #2c5aa0 !important;
  color: #fff !important;
}

/* -- Footer -- */
.main-footer {
  background: #fff !important;
  color: #64748b !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* -- User dropdown -- */
.user-menu .user-header {
  background: linear-gradient(135deg, #2c5aa0, #3b6fb6) !important;
}

.user-menu .user-header p {
  color: #fff !important;
}

.user-menu .user-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

.notifications-menu .dropdown-menu>li.header {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* -- POS Page -- */
.pos .items .item {
  border-radius: 8px !important;
  overflow: hidden;
  transition: all 0.2s !important;
}

.pos .items .item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(44, 90, 160, 0.15) !important;
}

.pos #leftdiv {
  border-radius: 10px !important;
}

.pos #payment,
.pos #submit-sale {
  background: linear-gradient(135deg, #059669, #0d9488) !important;
  border: none !important;
}

.pos .totals tr.success td {
  color: #059669 !important;
  font-weight: 700 !important;
}

.pos #total-payable {
  color: #059669 !important;
  font-size: 20px !important;
}

/* -- Misc -- */
.nav-tabs {
  border-bottom-color: #e2e8f0 !important;
}

.nav-tabs>li.active>a {
  color: #2c5aa0 !important;
  border-bottom-color: #fff !important;
}

.pagination>li>a {
  border-radius: 6px !important;
}

.pagination>.active>a {
  background: #2c5aa0 !important;
  border-color: #2c5aa0 !important;
}

.progress {
  background: #e2e8f0 !important;
  border-radius: 8px !important;
}

.progress-bar {
  background: #2c5aa0 !important;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2c5aa0;
}

a {
  transition: color 0.2s !important;
}

/* Theme toggle button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  cursor: pointer;
  font-size: 14px !important;
  line-height: 1.5 !important;
  transition: all 0.3s !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff !important;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.theme-toggle-btn .toggle-icon {
  font-size: 16px;
}

.pos .theme-toggle-btn {
    margin-top: 5px !important;
}


/* =============================================
   SECTION 2: DARK THEME (Only when toggled)
   ============================================= */
body.dark-theme {
  background: #1a1a2e !important;
  color: #e8eaf0 !important;
}

/* -- Login -- */
body.dark-theme.login-page,
body.dark-theme.login-page-blue,
body.dark-theme.login-page-dark,
body.dark-theme.login-page-green,
body.dark-theme.login-page-purple,
body.dark-theme[class*="login-page"] {
  background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 50%, #16213e 100%) !important;
}

body.dark-theme .login-logo a {
  color: #4ecca3 !important;
}

body.dark-theme .login-logo b {
  color: #fff !important;
}

body.dark-theme .login-box-body {
  background: #1e2a45 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .login-box-msg {
  color: #a0aec0 !important;
}

body.dark-theme .login-box-body .form-control {
  background: #253351 !important;
  border-color: #2d3a56 !important;
  color: #e8eaf0 !important;
}

body.dark-theme .login-box-body .form-control:focus {
  border-color: #4ecca3 !important;
  box-shadow: 0 0 0 3px rgba(78, 204, 163, 0.2) !important;
}

body.dark-theme .login-box-body .btn-primary {
  background: linear-gradient(135deg, #4ecca3, #38b2ac) !important;
  border: none !important;
}

body.dark-theme .login-box-body .btn-primary:hover {
  box-shadow: 0 4px 15px rgba(78, 204, 163, 0.4) !important;
}

body.dark-theme .login-box-body .glyphicon.form-control-feedback {
  color: #718096 !important;
}

/* -- Header / Navbar -- */
body.dark-theme .main-header .logo {
  background: #16213e !important;
  color: #4ecca3 !important;
  border-right: 1px solid #2d3a56 !important;
}

body.dark-theme .main-header .logo b {
  color: #fff !important;
}

body.dark-theme .main-header .logo:hover {
  background: #1e2a45 !important;
}

body.dark-theme .main-header .navbar {
  background: #16213e !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  border: none !important;
}

body.dark-theme .main-header .navbar .nav>li>a {
  color: #a0aec0 !important;
}

body.dark-theme .main-header .navbar .nav>li>a:hover {
  color: #4ecca3 !important;
  background: transparent !important;
}

body.dark-theme .main-header .navbar .sidebar-toggle {
  color: #a0aec0 !important;
}

body.dark-theme .main-header .navbar .sidebar-toggle:hover {
  color: #4ecca3 !important;
  background: #2a3a5c !important;
}

body.dark-theme .main-header {
  border: none !important;
}

/* -- Sidebar -- */
body.dark-theme .main-sidebar {
  background: #16213e !important;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .sidebar-menu>li>a {
  color: #a0aec0 !important;
  border-left: 3px solid transparent !important;
  transition: all 0.2s !important;
}

body.dark-theme .sidebar-menu>li>a>.fa {
  color: #718096 !important;
}

body.dark-theme .sidebar-menu>li:hover>a,
body.dark-theme .sidebar-menu>li.active>a {
  background: #2a3a5c !important;
  color: #4ecca3 !important;
  border-left-color: #4ecca3 !important;
}

body.dark-theme .sidebar-menu>li:hover>a>.fa,
body.dark-theme .sidebar-menu>li.active>a>.fa {
  color: #4ecca3 !important;
}

body.dark-theme .sidebar-menu .treeview-menu {
  background: rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .sidebar-menu .treeview-menu>li>a {
  color: #718096 !important;
}

body.dark-theme .sidebar-menu .treeview-menu>li>a:hover,
body.dark-theme .sidebar-menu .treeview-menu>li.active>a {
  color: #4ecca3 !important;
}

body.dark-theme .sidebar-menu li.header {
  color: #718096 !important;
  background: #16213e !important;
}

/* -- Content -- */
body.dark-theme .content-wrapper {
  background: #1a1a2e !important;
}

body.dark-theme .content-header {
  border-bottom: 1px solid #2d3a56 !important;
}

body.dark-theme .content-header>h1 {
  color: #e8eaf0 !important;
}

body.dark-theme .breadcrumb {
  background: transparent !important;
}

body.dark-theme .breadcrumb>li>a {
  color: #4ecca3 !important;
}

body.dark-theme .breadcrumb>.active {
  color: #718096 !important;
}

/* -- Boxes / Cards -- */
body.dark-theme .box {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
  border-top: none !important;
}

body.dark-theme .box-primary {
  border-top: 3px solid #4ecca3 !important;
}

body.dark-theme .box-success {
  border-top: 3px solid #4ecca3 !important;
}

body.dark-theme .box-danger {
  border-top: 3px solid #e74c6f !important;
}

body.dark-theme .box-warning {
  border-top: 3px solid #f0a030 !important;
}

body.dark-theme .box-info {
  border-top: 3px solid #4ea8de !important;
}

body.dark-theme .box .box-header {
  border-bottom: 1px solid #2d3a56 !important;
}

body.dark-theme .box .box-header .box-title {
  color: #e8eaf0 !important;
}

body.dark-theme .box-footer {
  background: #16213e !important;
  border-top: 1px solid #2d3a56 !important;
}

/* -- Tables -- */
body.dark-theme .table {
  color: #e8eaf0 !important;
}

body.dark-theme .table>thead>tr>th {
  background: #16213e !important;
  color: #a0aec0 !important;
  border-bottom: 2px solid #2d3a56 !important;
  text-transform: uppercase;
  font-size: 11px !important;
  letter-spacing: 0.5px;
}

body.dark-theme .table>tbody>tr>td {
  border-top: 1px solid #2d3a56 !important;
}

body.dark-theme .table>tbody>tr:hover>td {
  background: #2a3a5c !important;
}

body.dark-theme .table-striped>tbody>tr:nth-of-type(odd)>td {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.dark-theme .table-striped>tbody>tr:nth-of-type(even)>td {
  background: transparent !important;
}

body.dark-theme .table-bordered,
body.dark-theme .table-bordered>thead>tr>th,
body.dark-theme .table-bordered>tbody>tr>td {
  border-color: #2d3a56 !important;
}

body.dark-theme .table>tfoot>tr>th,
body.dark-theme .table>tfoot>tr>td {
  background: #16213e !important;
  border-color: #2d3a56 !important;
  color: #e8eaf0 !important;
}

body.dark-theme tr.active>td,
body.dark-theme tr.active>th,
body.dark-theme .table>thead>tr.active>th {
  background: #16213e !important;
}

/* -- DataTables -- */
body.dark-theme .dataTables_wrapper .dataTables_length,
body.dark-theme .dataTables_wrapper .dataTables_filter,
body.dark-theme .dataTables_wrapper .dataTables_info,
body.dark-theme .dataTables_wrapper .dataTables_paginate {
  color: #a0aec0 !important;
}

body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #a0aec0 !important;
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
  border-radius: 6px !important;
}

body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #4ecca3 !important;
  color: #fff !important;
  border-color: #4ecca3 !important;
}

body.dark-theme .dataTables_empty {
  color: #718096 !important;
}

body.dark-theme div.dt-buttons .btn {
  background: #253351 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
}

body.dark-theme div.dt-buttons .btn:hover {
  background: #4ecca3 !important;
  color: #fff !important;
}

/* -- Forms -- */
body.dark-theme .form-control {
  background: #253351 !important;
  border: 1px solid #2d3a56 !important;
  color: #e8eaf0 !important;
}

body.dark-theme .form-control:focus {
  border-color: #4ecca3 !important;
  box-shadow: 0 0 0 3px rgba(78, 204, 163, 0.15) !important;
}

body.dark-theme .input-group-addon {
  background: #16213e !important;
  border: 1px solid #2d3a56 !important;
  color: #a0aec0 !important;
}

body.dark-theme label,
body.dark-theme .control-label {
  color: #a0aec0 !important;
}

body.dark-theme .text_filter {
  background: #253351 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
}

/* -- Buttons -- */
body.dark-theme .btn-primary {
  background: #4ecca3 !important;
  border: none !important;
}

body.dark-theme .btn-primary:hover {
  background: #3db890 !important;
  box-shadow: 0 4px 12px rgba(78, 204, 163, 0.3) !important;
}

body.dark-theme .btn-success {
  background: #4ecca3 !important;
}

body.dark-theme .btn-danger {
  background: #e74c6f !important;
}

body.dark-theme .btn-warning {
  background: #f0a030 !important;
  color: #1a1a2e !important;
}

body.dark-theme .btn-info {
  background: #4ea8de !important;
}

body.dark-theme .btn-default {
  background: #253351 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
}

body.dark-theme .btn-default:hover {
  background: #2a3a5c !important;
}

body.dark-theme .btn-app {
  background: #1e2a45 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
}

body.dark-theme .btn-app:hover {
  border-color: #4ecca3 !important;
  color: #4ecca3 !important;
}

body.dark-theme .btn-app>.fa {
  color: #4ecca3 !important;
}

body.dark-theme .bg-purple {
  background-color: #7c3aed !important;
}

body.dark-theme .bg-navy {
  background-color: #4ea8de !important;
}

/* -- Dropdowns -- */
body.dark-theme .dropdown-menu {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .dropdown-menu>li>a {
  color: #e8eaf0 !important;
}

body.dark-theme .dropdown-menu>li>a:hover {
  background: #2a3a5c !important;
  color: #4ecca3 !important;
}

body.dark-theme .dropdown-menu .divider {
  background: #2d3a56 !important;
}

/* -- Modals -- */
body.dark-theme .modal-content {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .modal-header {
  border-bottom: 1px solid #2d3a56 !important;
}

body.dark-theme .modal-header .modal-title {
  color: #e8eaf0 !important;
}

body.dark-theme .modal-header .close {
  color: #718096 !important;
}

body.dark-theme .modal-footer {
  border-top: 1px solid #2d3a56 !important;
  background: #16213e !important;
}

body.dark-theme .modal-backdrop {
  background: rgba(10, 10, 20, 0.7) !important;
}

/* -- Alerts -- */
body.dark-theme .alert-success {
  background: rgba(78, 204, 163, 0.15) !important;
  color: #4ecca3 !important;
  border-left: 4px solid #4ecca3 !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

body.dark-theme .alert-danger {
  background: rgba(231, 76, 111, 0.15) !important;
  color: #e74c6f !important;
  border-left: 4px solid #e74c6f !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

body.dark-theme .alert-warning {
  background: rgba(240, 160, 48, 0.15) !important;
  color: #f0a030 !important;
  border-left: 4px solid #f0a030 !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

body.dark-theme .alert-info {
  background: rgba(78, 168, 222, 0.15) !important;
  color: #4ea8de !important;
  border-left: 4px solid #4ea8de !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

/* -- Labels -- */
body.dark-theme .label-primary {
  background: #4ecca3 !important;
}

body.dark-theme .label-success {
  background: #4ecca3 !important;
}

body.dark-theme .label-danger {
  background: #e74c6f !important;
}

body.dark-theme .label-warning {
  background: #f0a030 !important;
  color: #1a1a2e !important;
}

body.dark-theme .label-default {
  background: #2a3a5c !important;
  color: #a0aec0 !important;
}

/* -- Well / Select2 -- */
body.dark-theme .well {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
}

body.dark-theme .select2-container .select2-choice,
body.dark-theme .select2-container .select2-choices,
body.dark-theme .select2-container--default .select2-selection--single,
body.dark-theme .select2-container--default .select2-selection--multiple {
  background: #253351 !important;
  border: 1px solid #2d3a56 !important;
  color: #e8eaf0 !important;
}

body.dark-theme .select2-drop,
body.dark-theme .select2-dropdown {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
}

body.dark-theme .select2-results .select2-highlighted,
body.dark-theme .select2-container--default .select2-results__option--highlighted {
  background: #4ecca3 !important;
}

body.dark-theme .select2-search input {
  background: #253351 !important;
  color: #e8eaf0 !important;
  border: 1px solid #2d3a56 !important;
}

/* -- Footer -- */
body.dark-theme .main-footer {
  background: #16213e !important;
  color: #718096 !important;
  border-top: 1px solid #2d3a56 !important;
}

/* -- POS -- */
body.dark-theme .pos .content-wrapper {
  background: #1a1a2e !important;
}

body.dark-theme .pos #leftdiv {
  background: #1e2a45 !important;
  border: 1px solid #2d3a56 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .pos .list-table {
  color: #e8eaf0 !important;
}

body.dark-theme .pos .list-table thead tr.success th {
  background: #16213e !important;
  color: #a0aec0 !important;
  border-color: #2d3a56 !important;
}

body.dark-theme .pos .totals {
  color: #e8eaf0 !important;
}

body.dark-theme .pos .totals tr.info td {
  background: #16213e !important;
  border-color: #2d3a56 !important;
}

body.dark-theme .pos .totals tr.success td {
  background: rgba(78, 204, 163, 0.1) !important;
  border-color: #2d3a56 !important;
  color: #4ecca3 !important;
}

body.dark-theme .pos #total-payable {
  color: #4ecca3 !important;
  font-size: 22px !important;
}

body.dark-theme .pos #payment,
body.dark-theme .pos #submit-sale {
  background: linear-gradient(135deg, #4ecca3, #38b2ac) !important;
}

body.dark-theme .pos #right-col {
  background: #1a1a2e !important;
}

body.dark-theme .pos .items .item {
  border: 1px solid #2d3a56 !important;
  background: #1e2a45 !important;
}

body.dark-theme .pos .items .item:hover {
  border-color: #4ecca3 !important;
  box-shadow: 0 4px 15px rgba(78, 204, 163, 0.2) !important;
}

body.dark-theme .pos .items .item div {
  color: #e8eaf0 !important;
  background: #1e2a45 !important;
}

body.dark-theme .control-sidebar,
body.dark-theme .control-sidebar-dark {
  background: #16213e !important;
  border-left: 1px solid #2d3a56 !important;
}

body.dark-theme .control-sidebar .tab-content {
  background: #16213e !important;
}

body.dark-theme .control-sidebar-menu>li>a {
  color: #a0aec0 !important;
  border-bottom: 1px solid #2d3a56 !important;
}

body.dark-theme .control-sidebar-menu>li>a:hover,
body.dark-theme .control-sidebar-menu>li>a.active {
  background: #2a3a5c !important;
  color: #4ecca3 !important;
}

body.dark-theme .control-sidebar-subheading {
  color: #e8eaf0 !important;
}

body.dark-theme .control-sidebar-bg {
  background: #16213e !important;
}

/* -- User menu -- */
body.dark-theme .user-menu .user-header {
  background: #16213e !important;
}

body.dark-theme .user-menu .user-header p {
  color: #e8eaf0 !important;
}

body.dark-theme .user-menu .user-footer {
  background: #1e2a45 !important;
  border-top: 1px solid #2d3a56 !important;
}

body.dark-theme .notifications-menu .dropdown-menu>li.header {
  background: #16213e !important;
  color: #a0aec0 !important;
}

body.dark-theme .notifications-menu .dropdown-menu>li.footer>a {
  background: #1e2a45 !important;
  color: #4ecca3 !important;
}

/* -- Misc -- */
body.dark-theme .text-muted {
  color: #718096 !important;
}

body.dark-theme hr {
  border-color: #2d3a56 !important;
}

body.dark-theme .nav-tabs {
  border-bottom-color: #2d3a56 !important;
}

body.dark-theme .nav-tabs>li>a {
  color: #a0aec0 !important;
}

body.dark-theme .nav-tabs>li>a:hover {
  border-color: #2d3a56 !important;
  background: #2a3a5c !important;
}

body.dark-theme .nav-tabs>li.active>a {
  background: #1e2a45 !important;
  color: #4ecca3 !important;
  border-color: #2d3a56 !important;
  border-bottom-color: #1e2a45 !important;
}

body.dark-theme .panel {
  background: #1e2a45 !important;
  border-color: #2d3a56 !important;
}

body.dark-theme .panel-heading {
  background: #16213e !important;
  color: #e8eaf0 !important;
}

body.dark-theme .pagination>li>a {
  background: #1e2a45 !important;
  border-color: #2d3a56 !important;
  color: #a0aec0 !important;
}

body.dark-theme .pagination>li>a:hover,
body.dark-theme .pagination>.active>a {
  background: #4ecca3 !important;
  color: #fff !important;
  border-color: #4ecca3 !important;
}

body.dark-theme .progress {
  background: #253351 !important;
}

body.dark-theme .progress-bar {
  background: #4ecca3 !important;
}

body.dark-theme .clock {
  color: #4ecca3 !important;
}

body.dark-theme ::-webkit-scrollbar-track {
  background: #16213e;
}

body.dark-theme ::-webkit-scrollbar-thumb {
  background: #2d3a56;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: #4ecca3;
}

/* -- Toggle button dark state -- */
body.dark-theme .theme-toggle-btn {
  color: #e8eaf0 !important;
  border-color: #2d3a56 !important;
}

body.dark-theme .theme-toggle-btn:hover {
  background: #2a3a5c !important;
}

/* =============================================
   SECTION 3: MODERN DASHBOARD
   ============================================= */
.dashboard-stats {
  margin-bottom: 25px;
}

.stat-card {
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100px;
  margin-bottom: 20px;
  border: 1px solid #f1f5f9;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 15px;
  flex-shrink: 0;
}

.stat-info .stat-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
}

.stat-info .stat-value {
  color: #1e293b;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Icon Colors */
.icon-blue {
  background: rgba(44, 90, 160, 0.1);
  color: #2c5aa0;
}

.icon-green {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.icon-orange {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.icon-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

/* Dark Mode Dashboard */
body.dark-theme .stat-card {
  background: #1e2a45 !important;
  border-color: #2d3a56 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .stat-info .stat-label {
  color: #a0aec0 !important;
}

body.dark-theme .stat-info .stat-value {
  color: #fff !important;
}

body.dark-theme .icon-blue {
  background: rgba(78, 204, 163, 0.1) !important;
  color: #4ecca3 !important;
}

body.dark-theme .icon-green {
  background: rgba(78, 204, 163, 0.1) !important;
  color: #4ecca3 !important;
}

/* Quick Links Refined "Action Tiles" */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.quick-link-item {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  color: #475569;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.quick-link-item:hover {
  background: #ffffff;
  color: #2c5aa0;
  border-color: #2c5aa0;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(44, 90, 160, 0.08);
}

.quick-link-item i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 20px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  color: #2c5aa0;
}

.quick-link-item:hover i {
  background: #2c5aa0;
  color: #ffffff;
  transform: scale(1.1);
}

.quick-link-item span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Dark Mode Refinement */
body.dark-theme .quick-link-item {
  background: #253351 !important;
  border-color: #2d3a56 !important;
  color: #a0aec0 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .quick-link-item i {
  background: #1e2a45 !important;
  color: #4ecca3 !important;
}

body.dark-theme .quick-link-item:hover {
  background: #253351 !important;
  color: #4ecca3 !important;
  border-color: #4ecca3 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .quick-link-item:hover i {
  background: #4ecca3 !important;
  color: #1a1a2e !important;
}

/* Chart Styling */
.chart-container {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  border: 1px solid #e2e8f0;
}

body.dark-theme .chart-container {
  background: #1e2a45 !important;
  border-color: #2d3a56 !important;
}

/* -- Print (always light) -- */
@media print {

  body,
  .content-wrapper,
  .box,
  .table,
  .modal-content {
    background: #fff !important;
    color: #000 !important;
  }

  .table>thead>tr>th {
    background: #f5f5f5 !important;
    color: #333 !important;
  }

  .theme-toggle-btn {
    display: none !important;
  }
}

/* =============================================
   SECTION 5: DEEP PURPLE THEME
   ============================================= */
body.purple-theme { background: #fdfbff !important; }
body.purple-theme .content-wrapper { background: #fdfbff !important; }

/* Navbar Purple */
body.purple-theme .main-header .navbar { background: #6d28d9 !important; }
body.purple-theme .main-header .logo { background: #5b21b6 !important; }
body.purple-theme .main-header .navbar .sidebar-toggle:hover { background: #5b21b6 !important; }

/* Sidebar Purple */
body.purple-theme .main-sidebar { background: #1e1b4b !important; }
body.purple-theme .sidebar-menu > li.active > a { background: #6d28d9 !important; border-left-color: #a78bfa !important; }
body.purple-theme .sidebar-menu > li:hover > a { background: #4338ca !important; }

/* KPI Cards Purple */
body.purple-theme .stat-card { border-color: #ddd6fe !important; box-shadow: 0 4px 15px rgba(109,40,217,0.05) !important; }
body.purple-theme .icon-blue { background: rgba(109,40,217,0.1) !important; color: #6d28d9 !important; }
body.purple-theme .icon-green { background: rgba(139,92,246,0.1) !important; color: #7c3aed !important; }
body.purple-theme .stat-info .stat-label { color: #6d28d9 !important; }
body.purple-theme .stat-info .stat-value { color: #4c1d95 !important; }

/* Quick Links Purple */
body.purple-theme .quick-link-item { border-color: #ede9fe !important; }
body.purple-theme .quick-link-item i { background: #f5f3ff !important; color: #7c3aed !important; }
body.purple-theme .quick-link-item:hover { border-color: #7c3aed !important; color: #7c3aed !important; box-shadow: 0 10px 20px rgba(124,58,237,0.1) !important; }
body.purple-theme .quick-link-item:hover i { background: #7c3aed !important; color: #fff !important; }

/* POS Purple */
body.purple-theme .pos-container { background: #f5f3ff !important; }
body.purple-theme .pos-sidebar { border-color: #ddd6fe !important; border-right: 1px solid #ddd6fe !important; background: #fff !important; }
body.purple-theme #posTable thead th { background: #ede9fe !important; color: #5b21b6 !important; border-color: #ddd6fe !important; }
body.purple-theme .totals tr.success td { background: #6d28d9 !important; color: #fff !important; }
body.purple-theme #payment, body.purple-theme #submit-sale { background: linear-gradient(135deg, #7c3aed, #6d28d9) !important; box-shadow: 0 4px 12px rgba(109,40,217,0.3) !important; }

/* Product Cards Purple */
body.purple-theme .pos .items .item:hover { border-color: #7c3aed !important; box-shadow: 0 10px 25px rgba(124,58,237,0.15) !important; }
body.purple-theme .pos .items .item .price-tag { background: #7c3aed !important; }

/* Toggle Button Purple */
body.purple-theme .theme-toggle-btn { color: #fff !important; border-color: rgba(255,255,255,0.3) !important; }
body.purple-theme .theme-toggle-btn:hover { background: rgba(255,255,255,0.1) !important; }

/* General Components Purple */
body.purple-theme .box { border-top-color: #ddd6fe !important; }
body.purple-theme .box.box-primary { border-top-color: #7c3aed !important; }
body.purple-theme .box.box-success { border-top-color: #7c3aed !important; }
body.purple-theme .btn-primary { background: #7c3aed !important; border-color: #6d28d9 !important; }
body.purple-theme .btn-primary:hover { background: #6d28d9 !important; }
body.purple-theme .label-primary { background-color: #7c3aed !important; }
body.purple-theme .pagination > .active > a { background-color: #7c3aed !important; border-color: #7c3aed !important; }
body.purple-theme a { color: #7c3aed; }
body.purple-theme a:hover { color: #6d28d9; }

/* Login Page Purple */
body.purple-theme.login-page { 
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important; 
    background-image: radial-gradient(#7c3aed 0.5px, transparent 0.5px), radial-gradient(#7c3aed 0.5px, #ede9fe 0.5px) !important;
    background-size: 20px 20px !important;
    background-position: 0 0, 10px 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
body.purple-theme .login-box-body { 
    background: #fff !important; 
    border-radius: 15px; 
    box-shadow: 0 10px 40px rgba(109,40,217,0.1) !important;
    border: 1px solid #ddd6fe !important;
}
body.purple-theme .login-logo a { color: #5b21b6 !important; font-weight: 700; }
body.purple-theme .login-box-body .btn-primary { 
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important; 
    height: 45px;
    font-weight: 600;
    border: none !important;
}

/* =============================================
   SECTION 6: REPORTS MODERNIZATION
   ============================================= */
.report-header { margin-bottom: 25px; }
.calendar { background: #fff; border-radius: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
body.dark-theme .calendar { background: #1e2a45 !important; border-color: #2d3a56 !important; box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important; }
body.purple-theme .calendar { background: #fff !important; border-color: #ddd6fe !important; box-shadow: 0 4px 15px rgba(109,40,217,0.05) !important; }

.calendar table { width: 100%; border-collapse: separate; border-spacing: 5px; }
.calendar th { text-align: center; padding: 15px; color: #64748b; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
body.dark-theme .calendar th { color: #a0aec0 !important; }
body.purple-theme .calendar th { color: #6d28d9 !important; }

.calendar td { 
    height: 120px; 
    width: 14%; 
    vertical-align: top; 
    padding: 10px; 
    background: #f8fafc; 
    border-radius: 10px; 
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}
body.dark-theme .calendar td { background: rgba(255,255,255,0.02) !important; border-color: #2d3a56 !important; }
body.purple-theme .calendar td { background: #fdfbff !important; border-color: #ede9fe !important; }

.calendar td:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: #2c5aa0; }
body.dark-theme .calendar td:hover { border-color: #4ecca3 !important; }
body.purple-theme .calendar td:hover { border-color: #7c3aed !important; }

.calendar .highlight { background: #eff6ff !important; border-color: #93c5fd !important; }
body.dark-theme .calendar .highlight { background: rgba(78,204,163,0.1) !important; border-color: #4ecca3 !important; }
body.purple-theme .calendar .highlight { background: #f5f3ff !important; border-color: #c084fc !important; }

.calendar .day_num { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 5px; display: block; }
body.dark-theme .calendar .day_num { color: #fff !important; }
body.purple-theme .calendar .day_num { color: #4c1d95 !important; }

.calendar .content { font-size: 12px; color: #64748b; padding: 0 !important; margin-top: 5px; }
body.dark-theme .calendar .content { color: #a0aec0 !important; }

.calendar .content b { display: block; color: #2c5aa0; margin-top: 2px; }
body.dark-theme .calendar .content b { color: #4ecca3 !important; }
body.purple-theme .calendar .content b { color: #7c3aed !important; }

/* =============================================
   SECTION 7: AI AGENT ASSISTANT
   ============================================= */
#agent-container { position: fixed; bottom: 30px; right: 30px; z-index: 10000; }

#agent-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5aa0, #1e3a6e);
    color: #fff;
    border: none;
    box-shadow: 0 5px 25px rgba(44,90,160,0.4);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#agent-toggle:hover { transform: scale(1.1) rotate(5deg); box-shadow: 0 8px 35px rgba(44,90,160,0.5); }
body.dark-theme #agent-toggle { background: linear-gradient(135deg, #4ecca3, #38b2ac); box-shadow: 0 5px 25px rgba(78,204,163,0.3); }
body.purple-theme #agent-toggle { background: linear-gradient(135deg, #7c3aed, #6d28d9); box-shadow: 0 5px 25px rgba(109,40,217,0.3); }

#agent-chat-modal {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}
#agent-chat-modal.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }
body.dark-theme #agent-chat-modal { background: rgba(30, 42, 69, 0.95); border-color: rgba(255,255,255,0.05); color: #fff; box-shadow: 0 15px 50px rgba(0,0,0,0.5); }
body.purple-theme #agent-chat-modal { border-color: #ddd6fe; box-shadow: 0 15px 50px rgba(109,40,217,0.1); }

.agent-header {
    padding: 15px 20px;
    background: #2c5aa0;
    color: #fff;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.agent-actions { display: flex; gap: 15px; }
.agent-actions button { background: none; border: none; color: #fff; cursor: pointer; font-size: 16px; transition: opacity 0.2s; }
.agent-actions button:hover { opacity: 0.7; }
body.dark-theme .agent-header { background: #16213e; }
body.purple-theme .agent-header { background: #6d28d9; }

#agent-chat-modal.expanded {
    width: 80vw;
    height: 85vh;
    bottom: 20px;
    right: 20px;
    max-width: 1200px;
}
#agent-chat-modal.expanded .message { max-width: 95%; }
@media (max-width: 768px) {
    #agent-chat-modal.expanded { width: 95vw; height: 95vh; bottom: 5px; right: 5px; }
}

.agent-header button { background: none; border: none; color: #fff; cursor: pointer; font-size: 18px; }

#agent-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

.message { padding: 12px 18px; border-radius: 15px; font-size: 14px; line-height: 1.5; max-width: 85%; position: relative; }
.message.system { background: #f1f5f9; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.message.user { background: #2c5aa0; color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }

.message-actions { 
    display: flex; 
    gap: 12px; 
    margin-top: 8px; 
    padding-top: 6px; 
    border-top: 1px solid rgba(0,0,0,0.05);
    justify-content: flex-end;
}
.message-actions button { 
    background: none; 
    border: none; 
    color: #94a3b8; 
    cursor: pointer; 
    font-size: 13px; 
    padding: 2px;
    transition: all 0.2s;
}
.message-actions button:hover { color: #2c5aa0; transform: scale(1.1); }
.message-actions button.wa-share:hover { color: #25d366; }

body.dark-theme .message.system { background: #253351; color: #f1f5f9; border: 1px solid rgba(255,255,255,0.05); }
body.dark-theme .message.user { background: #3b82f6; color: #fff; }
body.dark-theme .message-actions { border-top-color: rgba(255,255,255,0.1); }
body.dark-theme .message-actions button:hover { color: #60a5fa; }

body.purple-theme .message.system { background: #f5f3ff; color: #6d28d9; }
body.purple-theme .message.user { background: #7c3aed; color: #fff; }

.message .btn { margin-top: 5px; font-weight: 600; border-radius: 8px; }
body.dark-theme .message.system .btn-primary { background: #4ecca3 !important; color: #1a1a2e !important; border: none !important; }
body.purple-theme .message.system .btn-primary { background: #7c3aed !important; color: #fff !important; border: none !important; }

.agent-input-area { padding: 15px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; background: #fff; }
body.dark-theme .agent-input-area { background: #1e2a45; border-color: #2d3a56; }

#agent-input { flex: 1; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
body.dark-theme #agent-input { background: #253351; border-color: #2d3a56; color: #fff; }

#send-agent { background: #2c5aa0; color: #fff; border: none; border-radius: 10px; width: 40px; height: 36px; cursor: pointer; transition: all 0.2s; }
#send-agent:hover { background: #1e3a6e; }
body.dark-theme #send-agent { background: #4ecca3; color: #1a1a2e; }
body.purple-theme #send-agent { background: #7c3aed; }