@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Main Variables & Design Tokens */
:root {
  --font-family: 'Outfit', sans-serif;
  --bg-main: radial-gradient(circle at 50% 50%, #131520, #0a0b10);
  --bg-glass: rgba(30, 32, 50, 0.45);
  --bg-glass-hover: rgba(40, 43, 68, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --primary-glow: rgba(99, 102, 241, 0.15);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  
  --grad-primary: linear-gradient(135deg, #6366f1, #3b82f6);
  --grad-success: linear-gradient(135deg, #10b981, #059669);
  --grad-danger: linear-gradient(135deg, #ef4444, #dc2626);
  --grad-warning: linear-gradient(135deg, #f59e0b, #d97706);
  --grad-info: linear-gradient(135deg, #06b6d4, #0891b2);
  --grad-sidebar: linear-gradient(180deg, #141624, #0b0c13);
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Overrides */
body {
  background: var(--bg-main) !important;
  color: var(--text-main) !important;
  font-family: var(--font-family) !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .media-heading {
  font-family: var(--font-family) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
}

/* Navbar */
.navbar-inverse {
  background: rgba(19, 21, 32, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass) !important;
  position: relative !important;
  z-index: 1050 !important;
}

.navbar-inverse .navbar-brand img {
  height: 40px !important;
  border-radius: var(--radius-sm);
}

.navbar-inverse .navbar-nav > li > a {
  color: var(--text-muted) !important;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-inverse .navbar-nav > li > a:hover {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: var(--radius-sm);
}

/* Sidebar */
.sidebar {
  background: var(--grad-sidebar) !important;
  border-right: 1px solid var(--border-glass) !important;
}

.sidebar-user {
  border-bottom: 1px solid var(--border-glass) !important;
  padding: 20px 15px;
}

.sidebar-user .media-body span {
  color: var(--text-main) !important;
}

.navigation-main {
  padding: 15px 10px !important;
}

.navigation-main li a {
  color: var(--text-muted) !important;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 15px !important;
  border-radius: var(--radius-md);
  margin-bottom: 5px;
  transition: var(--transition) !important;
}

.navigation-main li a i {
  color: var(--text-muted) !important;
  transition: var(--transition);
}

.navigation-main li a:hover,
.navigation-main li.active > a {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

.navigation-main li a:hover i,
.navigation-main li.active > a i {
  color: #818cf8 !important;
}

/* Cards & Panels */
.panel {
  background: var(--bg-glass) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
  margin-bottom: 24px;
  transition: var(--transition) !important;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.panel-header, .panel-heading {
  border-bottom: 1px solid var(--border-glass) !important;
  padding: 18px 24px !important;
  background: transparent !important;
}

.panel-title {
  font-size: 16px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dashboard Metric Panels */
.bg-blue-400 { background: var(--grad-primary) !important; }
.bg-success-400 { background: var(--grad-success) !important; }
.bg-danger-400 { background: var(--grad-danger) !important; }
.bg-warning-400 { background: var(--grad-warning) !important; }
.bg-info-400 { background: var(--grad-info) !important; }

.panel.has-bg-image {
  background-size: cover;
  border: none !important;
  color: #fff !important;
}

.panel.has-bg-image .enlace {
  color: #fff !important;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  display: block;
}

.panel.has-bg-image h3 {
  color: #fff !important;
  font-weight: 700 !important;
}

/* Buttons */
.btn {
  font-family: var(--font-family) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 20px !important;
  border: none !important;
  transition: var(--transition) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary, .bg-blue {
  background: var(--grad-primary) !important;
  color: #fff !important;
}

.btn-success, .bg-success {
  background: var(--grad-success) !important;
  color: #fff !important;
}

.btn-danger, .bg-danger {
  background: var(--grad-danger) !important;
  color: #fff !important;
}

.btn-warning, .bg-warning {
  background: var(--grad-warning) !important;
  color: #fff !important;
}

.btn-info, .bg-info {
  background: var(--grad-info) !important;
  color: #fff !important;
}

/* Form Controls */
.form-control {
  background: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  height: 44px !important;
  padding: 10px 16px !important;
  font-family: var(--font-family) !important;
  transition: var(--transition) !important;
  box-shadow: none !important;
}

.form-control:focus {
  border-color: var(--border-focus) !important;
  background: rgba(15, 17, 28, 0.8) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.form-group label {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  margin-bottom: 8px !important;
}

/* Tables */
.table {
  color: var(--text-main) !important;
}

.table > theme, .table > thead > tr > th {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 2px solid var(--border-glass) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 14px 16px !important;
}

.table > tbody > tr {
  border-bottom: 1px solid var(--border-glass) !important;
  transition: var(--transition);
}

.table > tbody > tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

.table > tbody > tr > td {
  padding: 14px 16px !important;
  border-top: none !important;
  vertical-align: middle !important;
  color: var(--text-main) !important;
}

/* Datatables Styles */
.dataTables_wrapper {
  padding: 20px 0;
}

.dataTables_filter input {
  background: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  padding: 6px 12px !important;
  margin-left: 10px !important;
}

.dataTables_length select {
  background: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  padding: 6px 12px !important;
}

.dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-glass) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  transition: var(--transition) !important;
}

.dataTables_paginate .paginate_button.current, 
.dataTables_paginate .paginate_button.current:hover {
  background: var(--grad-primary) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Login Page Specific Styling */
.login-container {
  background: var(--bg-main) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-form {
  max-width: 420px;
  width: 100%;
  padding: 40px !important;
  background: var(--bg-glass) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

.login-form img {
  border-radius: 50%;
  border: 4px solid var(--border-glass);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  margin-bottom: 24px;
}

.login-form h5 {
  font-size: 20px !important;
  margin-bottom: 30px !important;
}

/* POS specific styles */
.pos-container {
  background: rgba(15, 17, 28, 0.8) !important;
}

/* Modals */
.modal-content {
  background: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-main) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-glass) !important;
  padding: 20px 24px !important;
}

.modal-footer {
  border-top: 1px solid var(--border-glass) !important;
  padding: 16px 24px !important;
}

.modal-title {
  font-weight: 600 !important;
}

/* Badges / Labels */
.label {
  border-radius: var(--radius-sm) !important;
  padding: 4px 8px !important;
  font-weight: 600 !important;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
  background-color: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  height: 44px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-main) !important;
  line-height: 42px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
}

.select2-dropdown {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
}

/* Dropdown Menu styling */
.dropdown-menu {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  z-index: 9999 !important;
}

.dropdown-menu > li > a {
  color: var(--text-main) !important;
  padding: 10px 20px !important;
  transition: var(--transition) !important;
}

.dropdown-menu > li > a:hover {
  background-color: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

.select2-results__option[aria-selected=true] {
  background-color: var(--primary-glow) !important;
}

.select2-results__option {
  color: var(--text-main) !important;
}

.select2-results__option--highlighted[aria-selected] {
  background: var(--grad-primary) !important;
  color: white !important;
}

/* SweetAlert Dark Theme */
.sweet-alert {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}
.sweet-alert h2 {
  color: var(--text-main) !important;
}
.sweet-alert p {
  color: var(--text-muted) !important;
}
.sweet-alert .sa-icon.sa-error {
  border-color: #ef4444 !important;
}
.sweet-alert .sa-icon.sa-error .sa-line {
  background-color: #ef4444 !important;
}
.sweet-alert .sa-icon.sa-success {
  border-color: #10b981 !important;
}
.sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after {
  background: transparent !important;
}
.sweet-alert .sa-icon.sa-success .sa-line {
  background-color: #10b981 !important;
}
.sweet-alert .sa-icon.sa-success .sa-placeholder {
  border-color: rgba(16, 185, 129, 0.2) !important;
}
.sweet-alert .sa-icon.sa-success .sa-fix {
  background-color: transparent !important;
}
.sweet-alert .sa-icon.sa-warning {
  border-color: #f59e0b !important;
}
.sweet-alert .sa-icon.sa-warning .sa-body, .sweet-alert .sa-icon.sa-warning .sa-dot {
  background-color: #f59e0b !important;
}
.sweet-alert button {
  border-radius: var(--radius-sm) !important;
}
.sweet-alert button.cancel {
  background-color: #374151 !important;
  color: var(--text-main) !important;
}
.sweet-alert button.cancel:hover {
  background-color: #4b5563 !important;
}

.dropdown-menu .divider {
  background-color: var(--border-glass) !important;
}
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.form-group label {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  margin-bottom: 8px !important;
}

/* Tables */
.table {
  color: var(--text-main) !important;
}

.table > theme, .table > thead > tr > th {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 2px solid var(--border-glass) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 14px 16px !important;
}

.table > tbody > tr {
  border-bottom: 1px solid var(--border-glass) !important;
  transition: var(--transition);
}

.table > tbody > tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

.table > tbody > tr > td {
  padding: 14px 16px !important;
  border-top: none !important;
  vertical-align: middle !important;
  color: var(--text-main) !important;
}

/* Datatables Styles */
.dataTables_wrapper {
  padding: 20px 0;
}

.dataTables_filter input {
  background: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  padding: 6px 12px !important;
  margin-left: 10px !important;
}

.dataTables_length select {
  background: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  padding: 6px 12px !important;
}

.dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-glass) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  transition: var(--transition) !important;
}

.dataTables_paginate .paginate_button.current, 
.dataTables_paginate .paginate_button.current:hover {
  background: var(--grad-primary) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Login Page Specific Styling */
.login-container {
  background: var(--bg-main) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-form {
  max-width: 420px;
  width: 100%;
  padding: 40px !important;
  background: var(--bg-glass) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

.login-form img {
  border-radius: 50%;
  border: 4px solid var(--border-glass);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  margin-bottom: 24px;
}

.login-form h5 {
  font-size: 20px !important;
  margin-bottom: 30px !important;
}

/* POS specific styles */
.pos-container {
  background: rgba(15, 17, 28, 0.8) !important;
}

/* Modals */
.modal-content {
  background: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-main) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-glass) !important;
  padding: 20px 24px !important;
}

.modal-footer {
  border-top: 1px solid var(--border-glass) !important;
  padding: 16px 24px !important;
}

.modal-title {
  font-weight: 600 !important;
}

/* Badges / Labels */
.label {
  border-radius: var(--radius-sm) !important;
  padding: 4px 8px !important;
  font-weight: 600 !important;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
  background-color: rgba(15, 17, 28, 0.6) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  height: 44px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-main) !important;
  line-height: 42px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
}

.select2-dropdown {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
}

/* Dropdown Menu styling */
.dropdown-menu {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  z-index: 9999 !important;
}

.dropdown-menu > li > a {
  color: var(--text-main) !important;
  padding: 10px 20px !important;
  transition: var(--transition) !important;
}

.dropdown-menu > li > a:hover {
  background-color: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

.select2-results__option {
  color: var(--text-main) !important;
}

.select2-results__option--highlighted[aria-selected] {
  background: var(--grad-primary) !important;
  color: white !important;
}

.select2-results__option[aria-selected=true] {
  background-color: var(--primary-glow) !important;
}

/* SweetAlert Dark Theme */
.sweet-alert {
  background-color: #191b28 !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}
.sweet-alert h2 {
  color: var(--text-main) !important;
}
.sweet-alert p {
  color: var(--text-muted) !important;
}
.sweet-alert .sa-icon.sa-error {
  border-color: #ef4444 !important;
}
.sweet-alert .sa-icon.sa-error .sa-line {
  background-color: #ef4444 !important;
}
.sweet-alert .sa-icon.sa-success {
  border-color: #10b981 !important;
}
.sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after {
  background: transparent !important;
}
.sweet-alert .sa-icon.sa-success .sa-line {
  background-color: #10b981 !important;
}
.sweet-alert .sa-icon.sa-success .sa-placeholder {
  border-color: rgba(16, 185, 129, 0.2) !important;
}
.sweet-alert .sa-icon.sa-success .sa-fix {
  background-color: transparent !important;
}
.sweet-alert .sa-icon.sa-warning {
  border-color: #f59e0b !important;
}
.sweet-alert .sa-icon.sa-warning .sa-body, .sweet-alert .sa-icon.sa-warning .sa-dot {
  background-color: #f59e0b !important;
}
.sweet-alert button {
  border-radius: var(--radius-sm) !important;
}
.sweet-alert button.cancel {
  background-color: #374151 !important;
  color: var(--text-main) !important;
}
.sweet-alert button.cancel:hover {
  background-color: #4b5563 !important;
}

.dropdown-menu .divider {
  background-color: var(--border-glass) !important;
}


/* =========================================================================
   MODERN POS REDESIGN (FLEXBOX/GRID)
   ========================================================================= */

.pos-modern-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    align-items: flex-start;
}

/* Left Cart Area */
.pos-cart-area {
    flex: 1 1 65%;
    min-width: 300px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    padding: 20px;
}

/* Right Sidebar Totals */
.pos-checkout-sidebar {
    flex: 1 1 30%;
    min-width: 280px;
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    padding: 25px;
    position: sticky;
    top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Header & Search */
.pos-header-modern {
    background: transparent !important;
    border-bottom: 1px solid var(--border-glass) !important;
    padding: 15px 25px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.pos-search-container {
    margin-bottom: 25px;
}
.pos-search-input {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid var(--border-glass) !important;
    color: #fff !important;
    font-size: 16px !important;
    padding: 22px 15px !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}
.pos-search-input:focus {
    border-color: #06b6d4 !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3) !important;
}
.input-group-addon {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid var(--border-glass) !important;
    border-right: none !important;
    color: #06b6d4 !important;
    font-size: 20px;
    border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}

/* Cardify the Table */
.pos-table-cards {
    width: 100%;
    border-collapse: collapse;
}
.pos-table-cards thead {
    display: none;
}
.pos-table-cards tbody {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.pos-table-cards tbody tr {
    display: flex;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    transition: var(--transition);
    align-items: center;
}
.pos-table-cards tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.pos-table-cards tbody td {
    display: flex;
    flex-direction: column;
    border: none !important;
    padding: 5px 10px !important;
    color: #fff;
    flex: 1 1 auto;
    min-width: 80px;
}
.pos-table-cards tbody td::before {
    content: attr(data-label);
    color: #06b6d4;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

/* Specific Cell Adjustments */
.pos-table-cards tbody td[data-label="Producto"] {
    flex: 2 1 100%;
    font-size: 16px;
    font-weight: 600;
}
.pos-table-cards tbody td[data-label="Cant."] input,
.pos-table-cards tbody td[data-label="Descuento"] input,
.pos-table-cards tbody td[data-label="Mano Obra"] input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    text-align: center;
    border-radius: 4px;
    height: 32px;
}
.pos-table-cards tbody td[data-label="Quitar"] {
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
}
.pos-table-cards tbody td[data-label="Quitar"] button {
    color: #ef4444;
    font-size: 18px;
    padding: 5px 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.pos-table-cards tbody td[data-label="Quitar"] button:hover {
    background: #ef4444;
    color: #fff;
}
/* Touchspin buttons */
.bootstrap-touchspin .btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #06b6d4 !important;
}

/* Totals Sidebar Details */
.pos-total-display {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 20px;
}
.pos-total-label {
    font-size: 14px;
    color: #94a3b8;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.pos-total-amount {
    font-size: 46px;
    font-weight: 700;
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    line-height: 1;
}

.pos-totals-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.pos-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #cbd5e1;
}
.pos-detail-label {
    font-weight: 500;
}
.pos-detail-value {
    font-weight: 600;
    font-family: monospace;
    font-size: 15px;
}
.pos-detail-total-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-size: 18px;
    color: #fff;
}

/* Action Buttons */
.pos-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pos-btn-charge {
    background: var(--grad-success) !important;
    border: none !important;
    padding: 15px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3) !important;
    transition: var(--transition) !important;
}
.pos-btn-charge:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5) !important;
}
.pos-btn-cancel {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    padding: 12px !important;
    font-size: 14px !important;
    border-radius: var(--radius-md) !important;
}
.pos-btn-cancel:hover {
    background: #ef4444 !important;
    color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .pos-modern-layout {
        flex-direction: column;
    }
    .pos-cart-area {
        width: 100%;
        flex: 1 1 100%;
    }
    .pos-checkout-sidebar {
        width: 100%;
        flex: 1 1 100%;
        position: relative;
        top: 0;
    }
}

/* Fix DataTables Hover */
table.dataTable tbody tr { background-color: transparent !important; }
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1, table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { background-color: rgba(255, 255, 255, 0.01) !important; }
table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, table.dataTable.display tbody tr:hover, .table-hover > tbody > tr:hover { background-color: rgba(255, 255, 255, 0.06) !important; color: var(--text-main) !important; }


/* Aumentar tamano de X de cierre en modales */
.modal .close {
    font-size: 28px !important;
    opacity: 0.8 !important;
}


/* Z-index datetimepicker */
.bootstrap-datetimepicker-widget {
    z-index: 999999 !important;
}

/* Improve text visibility on dark backgrounds */
input.form-control, 
select.form-control, 
textarea.form-control,
.select2-selection__rendered,
.select2-results__option,
.bootstrap-datetimepicker-widget,
.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th,
.bootstrap-datetimepicker-widget .picker-switch {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Ensure calendar disabled days or out-of-month days are slightly faded but visible */
.bootstrap-datetimepicker-widget table td.old, 
.bootstrap-datetimepicker-widget table td.new {
    color: #a0a0a0 !important;
}

/* Improve placeholder visibility */
::-webkit-input-placeholder { color: #cccccc !important; opacity: 1; }
:-moz-placeholder { color: #cccccc !important; opacity: 1; }
::-moz-placeholder { color: #cccccc !important; opacity: 1; }
:-ms-input-placeholder { color: #cccccc !important; opacity: 1; }


/* OVERRIDE SELECT2 ITEMS TO ALWAYS BE WHITE */
.select2-container--default .select2-results > .select2-results__options,
.select2-container--default .select2-results__option,
.select2-results__option {
    color: #ffffff !important;
    font-weight: 600 !important;
}


/* GLOBAL WHITE TEXT OVERRIDE AS REQUESTED */
body, p, label, span, h1, h2, h3, h4, h5, h6, div, td, th, li, a, .form-control, .select2-selection__rendered, .select2-results__option, .sweet-alert p, .sweet-alert h2, .help-block, .info-box-text, .info-box-number {
    color: #ffffff !important;
    font-weight: 600 !important;
}


/* CARRITO SCROLL */
.pos-products-list {
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}
/* Custom scrollbar for webkit */
.pos-products-list::-webkit-scrollbar {
    width: 6px;
}
.pos-products-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.pos-products-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}
.pos-products-list::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}


/* OVERRIDE MODAL CLOSE BUTTON COLOR */
.modal .close, .modal-header .close {
    color: #ffffff !important;
    text-shadow: 0 1px 0 #000 !important;
    opacity: 1 !important;
}
.modal .close:hover, .modal-header .close:hover {
    color: #ff4d4d !important;
    opacity: 1 !important;
}


/* FIX TABS BACKGROUND */
.nav-tabs > li > a {
    color: var(--text-muted) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-glass) !important;
}
.nav-tabs > li.active > a, 
.nav-tabs > li.active > a:hover, 
.nav-tabs > li.active > a:focus {
    color: #ffffff !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}
