@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
/* =========================
     GLOBAL RESET
========================= */
* {
  margin: 0;
  padding: 0;
}
p {
  margin-bottom: 0 !important;
}
/* =========================================
     PLACEHOLDER STYLES / INPUT / LABEL 
============================================ */
::placeholder {
  font-size: 0.8rem;
  color: var(--text-color-40) !important;
}
input,
textarea {
  padding: 0.7rem !important;
  border: 1px solid var(--text-color-30) !important;
  font-size: 0.8rem !important;
}
input:focus,
textarea:focus {
  border: 0.5px solid var(--secondary-color-100) !important; /* keep layout stable */
  box-shadow: 0 0 0 0.5px var(--secondary-color-100) !important;
  outline: none !important;
}
::placeholder {
  font-size: 0.7rem;
}
label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--secondary-color-100);
}
/* ================================================
   CUSTOM CHOICES.JS ARROW USING ICONIFY
   ================================================ */

/* Remove default arrow */
.choices[data-type*="select-one"]::after {
  display: none !important;
  content: none !important;
}

/* Add custom Iconify chevron arrow */
.choices[data-type*="select-one"] .choices__inner::after {
  content: "";
  background: url("https://api.iconify.design/mdi/chevron-down.svg?color=%23555")
    no-repeat center;
  background-size: 20px 20px;
  width: 18px;
  height: 18px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Flip arrow when dropdown is open */
.choices[data-type*="select-one"].is-open .choices__inner::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Add padding so text doesn't overlap the arrow */
.choices__inner {
  padding-right: 40px !important;
  position: relative;
}

/* ================================================
   YOUR EXISTING CHOICE STYLES (unchanged)
   ================================================ */
.choices__inner {
  background-color: var(--primary-color-100) !important;
  border-radius: 0.3rem !important;
  padding: 0.7rem !important;
  border: 1px solid var(--text-color-40) !important;
  box-shadow: none !important;
  font-size: 0.8rem !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.choices__list--dropdown {
  background-color: var(--primary-color-100) !important;
  min-width: 160px !important;
  border: none !important;
  box-shadow: var(--shadow-light);
}
.choices__item--selectable {
  font-size: 0.7rem !important;
  border: none !important;
  color: var(--text-color-60);
}

/* ================================================
   CHOICE SEARCH ICON STYLE
   ================================================ */
.choices[data-type*="select-one"] .choices__input {
  padding-right: 30px;
  background-image: url("https://cdn-icons-png.flaticon.com/512/622/622669.png");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px 13px;
}

@media (max-width: 768px) {
  .choices__item--selectable {
    color: var(--text-color-60);
    font-size: smaller;
  }
}

/*==================================
        WEBKIT STYLING
 ================================= */
::-webkit-scrollbar {
  width: 0.2rem;
  height: 0.2rem;
}
::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color-100);
}
::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}
/* =========================
     VARIABLE COLORS
========================= */
:root {
  --text-color-100: #000000;
  --text-color-90: #1a1a1a;
  --text-color-80: #333333;
  --text-color-70: #4d4d4d;
  --text-color-60: #666666;
  --text-color-50: #808080;
  --text-color-40: #999999;
  --text-color-30: #b3b3b3;
  --text-color-20: #cccccc;
  --text-color-10: #e6e6e6;
  --primary-color-100: #ffffff;
  --primary-color-90: #f9f9f9;
  --primary-color-80: #f9fafb;
  --primary-color-70: #ebebeb;
  --primary-color-60: #e6e6e6;
  --primary-color-50: #d9d9d9;
  --primary-color-40: #cccccc;
  --primary-color-30: #bfbfbf;
  --primary-color-20: #b3b3b3;
  --primary-color-10: #a6a6a6;
  --secondary-color-100: #2b3d4f;
  --secondary-color-90: #3c5166;
  --secondary-color-80: #4d6780;
  --secondary-color-70: #5f7c99;
  --secondary-color-60: #708fb0;
  --secondary-color-50: #809fc0;
  --secondary-color-40: #99b3cc;
  --secondary-color-30: #b3c6d9;
  --secondary-color-20: #ccd9e6;
  --secondary-color-10: #e6edf2;
  --tertiary-color-100: #e6b800;
  --tertiary-color-90: #f2c200;
  --tertiary-color-80: #ffcc00;
  --tertiary-color-70: #ffd633;
  --tertiary-color-60: #ffdf66;
  --tertiary-color-50: #ffe680;
  --tertiary-color-40: #ffec99;
  --tertiary-color-30: #fff2b3;
  --tertiary-color-20: #fff8cc;
  --tertiary-color-10: #fffbe6;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #1f9f9f;
  --font-main: "Poppins", sans-serif;
  --shadow-light: 0 1px 2px rgba(200, 200, 200, 0.278);
  --shadow-medium: 0 3px 6px rgba(180, 180, 180, 0.5);
  --shadow-dark: 0 5px 12px rgba(150, 150, 150, 0.6);
}
body {
  overflow-x: hidden;
  background-color: var(--primary-color-100);
  font-family: var(--font-main) !important;
  color: var(--text-color-100);
}

/*==================================
            Side Bar
 ================================= */
.side_bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 200px;
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
  background-color: var(--primary-color-100);
  overflow-y: auto;
  z-index: 100;
}

.side_bar_options {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.side_bar_options a {
  text-decoration: none;
  color: var(--text-color-50);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.3rem;
  transition: all 0.3s ease-in-out;
  font-size: 0.85rem;
  font-weight: 400;
}
.side_bar_options a:hover {
  background-color: var(--primary-color-70);
}
.active_side_bar {
  background-color: var(--secondary-color-100);
  color: var(--primary-color-100) !important;
}
.side_bar_suboptions {
  display: flex;
  flex-direction: column;
  margin-left: 1.5rem;
  font-weight: 500;
}
.side_bar_suboptions a {
  font-size: 0.8rem;
}

/*==================================
            Main Bar
 ================================= */
.main_bar {
  background-color: var(--primary-color-80);
  max-width: 100%;
  margin-left: 200px;
  flex: 1;
  padding-top: 5rem; /* top-nav height */
}
.top_nav {
  position: fixed;
  top: 0;
  left: calc(200px + 0.5rem);
  right: 0.5rem;
  height: 5rem;
  z-index: 99;
  background-color: var(--primary-color-80) !important;
  border-radius: 1rem;
}

.sidebar-collapsed {
  width: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.4s ease;
}
.sidebar-collapsed .nav-bars a {
  opacity: 0;
  transition: opacity 0.4s;
  transition: all 0.4s ease;
}
.mobile-side-toggle {
  display: none;
}
/*=========================================
            Main Bar Responsiveness
 ========================================== */
@media (max-width: 1150px) {
  .main_bar {
    margin-left: 0 !important;
    position: relative;
  }
  .top_nav {
    left: 0 !important;
    width: 100% !important;
    padding: 0 1rem;
  }
  .side_bar {
    position: fixed;
    width: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    transition: all 0.4s ease;
    background-color: var(--primary-color-100);
  }
  .side_bar.side_bar_open {
    width: 250px !important;
    padding: 0 1rem !important;
    overflow: auto;
  }
  .side_bar .side_bar a {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .side_bar.side_bar_open .side_bar a {
    opacity: 1;
  }
  .mobile-side-toggle {
    display: block;
  }
  .mobile-side-toggle button {
    background-color: transparent !important;
    border: 1px solid var(--text-color-70) !important;
    border-radius: 0.3rem;
  }
}
.notification_bell {
  padding: 0.5rem;
  background-color: var(--primary-color-90);
  border-radius: 50%;
}
.header_title img {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 50%;
}
.header_title p:nth-child(1) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color-100);
}
.header_title p:nth-child(2) {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-color-50);
}
.active_side_bar {
  background-color: var(--secondary-color-100) !important;
  color: var(--primary-color-100) !important;
  font-weight: 500 !important;
}
/* Active state for sub-navigation items */
.side_bar_suboptions a.active_sub_item {
  background-color: var(--secondary-color-50) !important;
  color: var(--primary-color-100) !important;
  font-weight: 500 !important;
}

/*=========================================
            Loguot Button Styles
 ========================================== */
.logout_btn button:nth-child(1) {
  background-color: transparent;
  color: var(--text-color-70);
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--primary-color-50);
  border-radius: 0.3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease-in-out;
}
.logout_btn button:nth-child(2) {
  background-color: var(--error-color);
  color: var(--primary-color-100);
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease-in-out;
}
.logout_btn button:nth-child(1):hover {
  background-color: var(--primary-color-80);
}
.logout_btn button:nth-child(2):hover {
  background-color: rgb(198, 8, 8);
}
/*=========================================
            Page Header Styles
 ========================================== */
.page_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.page_header button {
  background-color: var(--secondary-color-100);
  color: var(--primary-color-100);
  padding: 0.5rem 1rem;
  border-radius: 10rem;
  font-size: 0.7rem;
  border: 1px solid #000 !important;
  transition: all 0.3s ease-in-out;
}
.page_header button:hover {
  background-color: var(--secondary-color-70);
  cursor: pointer;
}
.page_header p:nth-child(1) {
  font-size: 1.3rem;
  font-weight: 600;
}
.page_header p:nth-child(2) {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-color-30);
}
/*=========================================
            Modal Form Button Styles
 ========================================== */
.formButton button:nth-child(2) {
  background-color: var(--secondary-color-80);
  color: var(--primary-color-100);
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  border: none;
  transition: all 0.3s ease-in-out;
}
.formButton button:nth-child(1) {
  background-color: var(--primary-color-100);
  color: var(--text-color-70);
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  border: 1px solid var(--primary-color-50);
  transition: all 0.3s ease-in-out;
}
.formButton button:nth-child(2):hover {
  background-color: var(--secondary-color-100);
}
.formButton button:nth-child(1):hover {
  background-color: var(--primary-color-80);
  color: var(--text-color-70);
}
/*=============================================
          Number Input Spin Button Removal
 ============================================== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*=============================================
          Action Modal Styles
 ============================================== */

/*=============================================
          Text truncate
 ============================================== */
.ellipsis {
  max-width: 200px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
@media (max-width: 1000px) {
  .ellipsis {
    max-width: 120px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}
/*=============================================
          Sentence truncate
 ============================================== */
.text_truncate {
  display: -webkit-box; /* Needed for WebKit (Chrome, Safari) */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* Number of lines to show */
  overflow: hidden;
  text-overflow: ellipsis;
}
.text_truncate_two {
  display: -webkit-box; /* Needed for WebKit (Chrome, Safari) */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* Number of lines to show */
  overflow: hidden;
  text-overflow: ellipsis;
}

/*=============================================
          Action Style
 ============================================== */
.action {
  position: absolute;
  margin: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color-100) 0%,
    var(--primary-color-90) 100%
  );
  border: 1px solid var(--primary-color-40);
  border-radius: 12px;
  min-width: fit-content;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.action a {
  color: var(--text-color-70);
  text-decoration: none;
  font-size: 0.8rem !important;
  font-weight: 500;
  padding: 0.8rem 1.2rem;
  margin: 0;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.action a:hover {
  background: var(--primary-color-50);
  color: var(--secondary-color-100);
}

.action a.delete_project_btn:hover {
  background: linear-gradient(
    135deg,
    rgba(220, 53, 69, 0.1) 0%,
    rgba(220, 53, 69, 0.15) 100%
  );
  color: var(--error-color);
}

.action a .iconify {
  transition: all 0.3s ease;
}

/*=========================================
            Delete Button Styles
 ========================================== */
.delete_btn button:nth-child(1) {
  background-color: transparent;
  color: var(--text-color-70);
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--primary-color-50);
  border-radius: 0.3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease-in-out;
}
.delete_btn button:nth-child(2) {
  background-color: var(--error-color);
  color: var(--primary-color-100);
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease-in-out;
}
.delete_btn button:nth-child(1):hover {
  background-color: var(--primary-color-80);
}
.delete_btn button:nth-child(2):hover {
  background-color: rgb(198, 8, 8);
}

.search-wrap {
  max-width: 220px;
  width: 100%;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 12px;
  font-size: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: box-shadow 150ms ease, border-color 150ms ease;
  background: #fff;
  color: #111;
}

/* subtle focus */
.search-input:focus {
  border-color: #6aa0ff;
  box-shadow: 0 6px 18px rgba(106, 160, 255, 0.15);
}

input[type="checkbox"] {
  appearance: none; /* Remove default style */
  -webkit-appearance: none;
  width: 5px;
  height: 5px;
  border: 2px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

input[type="checkbox"]:checked {
  background-color: var(--secondary-color-100);
  border-color: var(--secondary-color-50);
  position: relative;
}

input[type="checkbox"]:checked::after {
  content: "✔";
  color: white;
  font-size: 12px;
  position: absolute;
  top: 0;
  left: 5px;
}

/*=========================================
        SUMMARY CARD RESPONSIVE STYLES
 ========================================== */
/* Universal Summary Card Styles - Can be used on Income, Expense, and Report pages */
.summary_item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.6rem;
  background-color: var(--primary-color-90);
  transition: all 0.3s ease;
}

.summary_item:hover {
  background-color: var(--primary-color-80);
  transform: translateY(-2px);
}

.summary_content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.summary_label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-color-60);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary_value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color-90);
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
  max-width: 100%;
}

/* Income specific styling */
.summary_value.income_value {
  color: var(--secondary-color-80);
}

/* Expense specific styling */
.summary_value.expense_value {
  color: #dc3545;
}

/* Responsive Summary Layout */
@media (max-width: 768px) {
  .summary_item {
    padding: 1rem 0.75rem;
    gap: 0.75rem;
  }

  .summary_label {
    font-size: 0.7rem;
  }

  .summary_value {
    font-size: 1.2rem;
  }

  .summary_icon {
    width: 3rem !important;
    height: 3rem !important;
  }
}

@media (max-width: 480px) {
  .summary_item {
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
  }

  .summary_label {
    font-size: 0.65rem;
  }

  .summary_value {
    font-size: 1rem;
  }

  .summary_icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
}

/* Custom Tooltip Styles for Financial Values */
.tooltip {
  font-family: "Monaco", "Menlo", monospace;
}

.tooltip .tooltip-inner {
  background-color: #1a1a1a;
  color: #28a745;
  border: 1px solid #28a745;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 300px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #28a745;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #28a745;
}

/* Income specific tooltip styling */
.tooltip.income-tooltip .tooltip-inner {
  color: var(--secondary-color-80);
  border-color: var(--secondary-color-80);
}

.tooltip.income-tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--secondary-color-80);
}

.tooltip.income-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--secondary-color-80);
}

/* Expense specific tooltip styling */
.tooltip.expense-tooltip .tooltip-inner {
  color: #dc3545;
  border-color: #dc3545;
}

.tooltip.expense-tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #dc3545;
}

.tooltip.expense-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #dc3545;
}
