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

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #121826;
  --bg-card: rgba(18, 24, 38, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-teal: #14b8a6;
}

body.redesigned-theme {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: 0.5px;
}

/* Sidebar redone */
body.redesigned-theme .left {
  background: var(--bg-secondary) !important;
  border-right: 1px solid var(--border-color) !important;
  padding-top: 5px;
  width: 240px !important;
}

body.redesigned-theme .left ul li.menu-heading {
  color: var(--text-secondary) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 15px 25px 20px 25px;
  opacity: 0.7;
  border-bottom: none !important;
}

body.redesigned-theme .left ul li a {
  background: transparent !important;
  color: var(--text-secondary) !important;
  padding: 20px 25px !important;
  font-size: 14px !important;
  font-weight: 500;
  border-bottom: none !important;
  transition: all 0.3s ease;
  width: 100% !important;
  display: flex;
  align-items: center;
}

body.redesigned-theme .left ul li a i.fa {
  width: 24px !important;
  font-size: 16px;
  margin-right: 12px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

body.redesigned-theme .left ul li a:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

body.redesigned-theme .left ul li a:hover i.fa {
  color: var(--accent-blue) !important;
}

body.redesigned-theme .left ul li.active a {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
  color: var(--accent-blue) !important;
  border-left: 3px solid var(--accent-blue);
  font-weight: 600;
}

body.redesigned-theme .left ul li.active a i.fa {
  color: var(--accent-blue) !important;
}

/* Right Content Area */
body.redesigned-theme .right {
  margin-left: 240px !important;
  background: var(--bg-primary) !important;
  min-height: 100vh;
  padding: 5px 20px;
}

@media only screen and (max-width: 768px) {
  body.redesigned-theme .left {
    width: 60px !important;
    padding-top: 15px;
  }

  body.redesigned-theme .left ul li.menu-heading {
    display: none;
  }

  body.redesigned-theme .left ul li a {
    padding: 15px !important;
    justify-content: center;
  }

  body.redesigned-theme .left ul li a span {
    display: none;
  }

  body.redesigned-theme .left ul li a i.fa {
    margin-right: 0 !important;
    font-size: 20px;
  }

  body.redesigned-theme .right {
    margin-left: 60px !important;
    padding: 8px;
  }
}

/* Header style overrides */
body.redesigned-theme .right .header {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 5px 0 10px 0 !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  margin-left: 0 !important;
  margin-bottom: 20px;
}

@media only screen and (max-width: 768px) {
  body.redesigned-theme .right .header {
    margin-bottom: 5px !important;
    padding: 2px 0 6px 0 !important;
  }
}

body.redesigned-theme .right .header h4 {
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 20px;
  margin: 0;
}

body.redesigned-theme .right .header ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.redesigned-theme .right .header ul li {
  padding-left: 0 !important;
}

body.redesigned-theme .dropdown-avatar span {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

body.redesigned-theme .dropdown-avatar span:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

body.redesigned-theme .dropdown-avatar .dropdown-toggle {
  color: var(--text-secondary);
  margin-left: 5px;
  cursor: pointer;
}

body.redesigned-theme .dropdown-avatar .dropdown-menu {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
  margin-top: 10px;
  padding: 8px !important;
}

body.redesigned-theme .dropdown-avatar .dropdown-menu li a {
  color: var(--text-primary) !important;
  border-radius: 8px;
  padding: 10px 16px !important;
  font-size: 14px;
  transition: all 0.2s ease;
}

body.redesigned-theme .dropdown-avatar .dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--accent-red) !important;
}

/* Modern Card Redesign */
.redesigned-card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* margin-bottom: 24px; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.redesigned-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.redesigned-card.card-blue::before {
  background: var(--accent-blue);
}

.redesigned-card.card-green::before {
  background: var(--accent-green);
}

.redesigned-card.card-purple::before {
  background: var(--accent-purple);
}

.redesigned-card.card-pink::before {
  background: var(--accent-pink);
}

.redesigned-card.card-orange::before {
  background: var(--accent-orange);
}

.redesigned-card.card-red::before {
  background: var(--accent-red);
}

.redesigned-card.card-teal::before {
  background: var(--accent-teal);
}

.redesigned-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.redesigned-card.card-blue:hover {
  box-shadow: 0 12px 20px -10px rgba(59, 130, 246, 0.3) !important;
}

.redesigned-card.card-green:hover {
  box-shadow: 0 12px 20px -10px rgba(16, 185, 129, 0.3) !important;
}

.redesigned-card.card-purple:hover {
  box-shadow: 0 12px 20px -10px rgba(139, 92, 246, 0.3) !important;
}

.redesigned-card.card-pink:hover {
  box-shadow: 0 12px 20px -10px rgba(236, 72, 153, 0.3) !important;
}

.redesigned-card.card-orange:hover {
  box-shadow: 0 12px 20px -10px rgba(245, 158, 11, 0.3) !important;
}

.redesigned-card.card-red:hover {
  box-shadow: 0 12px 20px -10px rgba(239, 68, 68, 0.3) !important;
}

.redesigned-card.card-teal:hover {
  box-shadow: 0 12px 20px -10px rgba(20, 184, 166, 0.3) !important;
}

.redesigned-card .card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.redesigned-card .card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.redesigned-card .card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
}

.redesigned-card .card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.redesigned-card.card-blue .card-icon-wrapper {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.redesigned-card.card-green .card-icon-wrapper {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.redesigned-card.card-purple .card-icon-wrapper {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.redesigned-card.card-pink .card-icon-wrapper {
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
}

.redesigned-card.card-orange .card-icon-wrapper {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

.redesigned-card.card-red .card-icon-wrapper {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.redesigned-card.card-teal .card-icon-wrapper {
  background: rgba(20, 184, 166, 0.15);
  color: var(--accent-teal);
}

/* Table redone */
.redesigned-table-container {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  /* margin-top: 30px; */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media only screen and (max-width: 768px) {
  .redesigned-table-container {
    padding: 10px !important;
  }
}

.redesigned-table-container h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  /* margin-bottom: 20px; */
  display: flex;
  justify-content: space-between;
  align-items: center;
}



.redesigned-table-container h3 i.fa {
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.redesigned-table-container h3 i.fa:hover {
  color: var(--text-primary);
}

/* Custom Table Styles */
body.redesigned-theme table.table {
  background: transparent !important;
  margin-bottom: 0 !important;
}

body.redesigned-theme table.table thead th {
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  padding: 8px 6px !important;
}

body.redesigned-theme table.table tbody td {
  border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
  border-bottom: none !important;
  color: var(--text-primary) !important;
  padding: 8px 6px !important;
  font-size: 14px !important;
  vertical-align: middle !important;
  background: transparent !important;
}

body.redesigned-theme table.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* DataTables Overrides to match theme */
body.redesigned-theme .dataTables_wrapper {
  color: var(--text-secondary) !important;
}

body.redesigned-theme .dataTables_wrapper .dataTables_length select,
body.redesigned-theme .dataTables_wrapper .dataTables_filter input {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 14px !important;
}

body.redesigned-theme .dataTables_wrapper .dataTables_info {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
}

body.redesigned-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
}

body.redesigned-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--accent-blue) !important;
  color: white !important;
  border-color: var(--accent-blue) !important;
}

body.redesigned-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.redesigned-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--accent-blue) !important;
  color: white !important;
  border-color: var(--accent-blue) !important;
}

/* Redesigned Form Fields & Controls */
body.redesigned-theme label {
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px !important;
}

body.redesigned-theme .form-control {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  height: 42px !important;
  box-shadow: none !important;
  font-family: 'Outfit', sans-serif !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.redesigned-theme .form-control:focus {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2) !important;
}

body.redesigned-theme .btn-success {
  background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-family: 'Outfit', sans-serif !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
  transition: all 0.2s ease !important;
}

body.redesigned-theme .btn-success:hover {
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-1px);
}

body.redesigned-theme .btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-family: 'Outfit', sans-serif !important;
  transition: all 0.2s ease !important;
}

body.redesigned-theme .btn-warning {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d97706 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-family: 'Outfit', sans-serif !important;
  color: white !important;
}

body.redesigned-theme .btn-danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-family: 'Outfit', sans-serif !important;
  color: white !important;
}

/* Remove hardcoded white backgrounds on rows */
body.redesigned-theme .row.table-invoice {
  background-color: transparent !important;
}

/* Modals redesign */
body.redesigned-theme .modal-content {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  color: var(--text-primary) !important;
}

body.redesigned-theme .modal-header {
  border-bottom: 1px solid var(--border-color) !important;
}

body.redesigned-theme .modal-header .modal-title {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

body.redesigned-theme .modal-header .close {
  color: var(--text-primary) !important;
  opacity: 0.8;
}

body.redesigned-theme .modal-footer {
  border-top: 1px solid var(--border-color) !important;
}

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

button.dt-button {
  color: #fff !important;
}