/* ------------------------------------------------------------
   SGAccount Branded Custom Stylesheet
   Version: 1.1.0
   ------------------------------------------------------------
   ✦ Brand Palette:
     - Primary: Teal Blue (#00bfa6 → #0069d9)
     - Accent: Coral (#ff6f61)
     - Neutral: Soft Gray (#f4f6f9)
   ✦ Highlights:
     - Unified teal-blue gradient accents
     - Soft shadows and micro-interactions
     - Accounting-optimized legibility
     - Polished dark-mode integration
------------------------------------------------------------ */

/* ===== Base Typography ===== */
body {
  font-family: "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  background-color: #f4f6f9;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 0.95rem;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #004b77;
}

/* ===== Brand Gradient ===== */
:root {
  --brand-start: #00bfa6;
  --brand-end: #0069d9;
  --brand-accent: #ff6f61;
  --brand-dark: #003b5f;
}

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transition: all 0.25s ease-in-out;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  border: none;
  font-weight: 500;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #00a895, #005cbf);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  border: none;
}
.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
}
.btn-info {
  background: linear-gradient(135deg, #17a2b8, #117a8b);
  border: none;
}

/* ===== Tables ===== */
table.dataTable thead {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
}
table.dataTable tbody tr:hover {
  background-color: rgba(0, 191, 166, 0.05);
}
table img.img-circle {
  border: 2px solid var(--brand-start);
  box-shadow: 0 0 6px rgba(0, 191, 166, 0.3);
}

/* ===== Sidebar ===== */
.main-sidebar {
  background: linear-gradient(
    180deg,
    var(--brand-end) 0%,
    var(--brand-dark) 100%
  );
}
.brand-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.nav-sidebar .nav-link {
  color: #cfd8dc;
  transition: all 0.25s ease;
}
.nav-sidebar .nav-link.active,
.nav-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.nav-sidebar .nav-header {
  color: #9aa9b5;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* ===== Navbar ===== */
.main-header.navbar {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}
.main-header.navbar .nav-link {
  color: #004b77;
  font-weight: 500;
}
.navbar-light .navbar-nav .nav-link:hover {
  color: var(--brand-end);
}

/* ===== User Dropdown ===== */
.user-menu .dropdown-menu {
  border-radius: 0.75rem;
  overflow: hidden;
}
.user-header {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
}

/* ===== Modals ===== */
.modal-content {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.modal-header {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: white;
  border-bottom: none;
}
.modal-footer {
  border-top: none;
  background-color: #f9f9f9;
}

/* ===== Forms ===== */
.form-control {
  border-radius: 0.5rem;
  border: 1px solid #dcdcdc;
  box-shadow: none !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--brand-start);
  box-shadow: 0 0 4px rgba(0, 191, 166, 0.25);
}

/* ===== Toasts / Alerts ===== */
.alert {
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
}
.alert-success {
  background: var(--brand-start);
  color: #fff;
}
.alert-danger {
  background: #e74c3c;
  color: #fff;
}
.alert-info {
  background: var(--brand-end);
  color: #fff;
}

/* ===== Footer ===== */
.main-footer {
  background-color: #fff;
  border-top: 1px solid #dee2e6;
  font-size: 0.9rem;
  color: #666;
}

/* ===== Dark Mode ===== */
body.dark-mode {
  background-color: #101018 !important;
  color: #e0e0e0;
}
body.dark-mode .main-header.navbar {
  background-color: #1f1f2e !important;
  color: #fff;
}
body.dark-mode .main-sidebar {
  background: linear-gradient(180deg, #003c54 0%, #000b14 100%) !important;
}
body.dark-mode .content-wrapper {
  background-color: #181820 !important;
}
body.dark-mode .card {
  background-color: #1c1c29 !important;
  color: #e0e0e0 !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}
body.dark-mode .table thead {
  background: linear-gradient(90deg, #008f7a, #004b77) !important;
}
body.dark-mode .form-control {
  background-color: #2a2a3d !important;
  border-color: #3a3a50 !important;
  color: #fff !important;
}
body.dark-mode .nav-sidebar .nav-link {
  color: #a0a0c0;
}
body.dark-mode .nav-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ===== Transitions & Effects ===== */
* {
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.spinner-border {
  width: 3rem;
  height: 3rem;
}
.rounded-xl {
  border-radius: 1rem !important;
}
.shadow-soft {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* ===== Dashboard Card Color Utility ===== */
.card-income {
  border-left: 6px solid #00bfa6;
}
.card-expense {
  border-left: 6px solid #ff6f61;
}
.card-profit {
  border-left: 6px solid #007bff;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 767.98px) {
  .main-sidebar {
    font-size: 0.9rem;
  }
  .main-header.navbar {
    padding: 0.5rem 1rem;
  }
  .card {
    border-radius: 0.75rem;
  }
}
@media print {
  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .sidebar,
  .navbar,
  .btn,
  .modal,
  .dataTables_wrapper {
    display: none !important;
  }
  table {
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}
@media print {
  .btn,
  .navbar,
  .sidebar,
  .content-header,
  .footer,
  .card-header {
    display: none !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
  body {
    background: #fff;
  }
}
