/* Split button dropdown styles for platform selection */
.split-btn {
  background: #f3faff;
  color: #1a2a4f;
  border: 2px solid #b6c7e6;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 7px 0 0 7px;
  cursor: pointer;
  outline: none;
  font-size: 1em;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-arrow {
  background: #e3f2fd;
  color: #1a2a4f;
  border: 2px solid #b6c7e6;
  border-left: none;
  border-radius: 0 7px 7px 0;
  width: 38px;
  text-align: center;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.18s, color 0.18s;
}
.split-arrow:focus {
  box-shadow: 0 0 0 2px #1976d2;
}
.split-arrow.open {
  background: #b6c7e6;
}
.split-dropdown {
  display: inline-flex;
  position: relative;
  font-size: 1em;
  
}
.split-main, .split-toggle {
  background: #f3faff;
  color: #1a2a4f;
  border: 2px solid #b6c7e6;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 7px 0 0 7px;
  cursor: pointer;
  outline: none;
  font-size: 1em;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.split-toggle {
  border-radius: 0 7px 7px 0;
  border-left: none;
  width: 38px;
  text-align: center;
  background: #e3f2fd;
}
.split-main:focus, .split-toggle:focus {
  box-shadow: 0 0 0 2px #1976d2;
}
.split-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 47%;
  background: linear-gradient(90deg, #fffbe6 0%, #e3f2fd 100%);
  border: 2px solid #b6c7e6;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 2px 8px rgba(58,123,213,0.08);
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0;
}
.split-menu li {
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.18s;
  font-size: 1em;
}
.split-menu li:hover {
  background: #062164;
  color: #fafafa;
}
.split-dropdown.open .split-menu {
  display: block;
}

/* --- Custom Grouped Inputs for Dashboard Sections --- */
.input-group-row {
  display: flex;
  gap: 24px;
  margin-bottom: 22px;
}

.input-group-row .form-row {
  flex: 1;
}

/* For triple input row (Expense section) */
.input-group-row.triple {
  gap: 18px;
}

.input-group-row.triple .form-row {
  flex: 1 1 0;
}

body {
  background-color: #f6f8fa;
  font-family: 'Inter', sans-serif;
  color: #1f2937;
}

/* Tech Dropdown */
.dashboard-dropdown {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0 28px 0;
}

.dashboard-dropdown select {
  font-size: 1.18rem;
  padding: 12px 24px;
  border-radius: 14px;
  border: 2px solid #2196f3;
  background: linear-gradient(98deg, #eaf6ff 70%, #edf5f8 100%);
  color: #073078;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.12);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.dashboard-dropdown select:focus {
  border-color: #3ec6fd;
  outline: none;
  box-shadow: 0 0 10px #3ec6fd66;
}

/* Glassy section transitions */
.section-container {
  display: none;
  animation: fadeInTech 0.42s cubic-bezier(0.68, 0.32, 0.39, 0.86);
}

.section-container.active {
  display: block;
}

@keyframes fadeInTech {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Styling for AI/Automation */
#invoice-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(42, 65, 92, 0.13);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

#invoice-modal .luxury-invoice {
  background: linear-gradient(100deg, #ffffff 75%, #eaf6ff 100%);
  border-radius: 24px;
  max-width: 600px;
  width: 97%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 42px 28px 28px 28px;
  box-shadow: 0 6px 24px rgba(33, 150, 243, 0.18), 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  font-family: 'Inter', sans-serif;
}

#invoice-modal .luxury-invoice h2 {
  color: #154A91;
  font-size: 2.3rem;
  font-weight: 700;
  border-bottom: 2px solid #2196f3;
  padding-bottom: 8px;
  margin-bottom: 14px;
  text-align: left;
  letter-spacing: 1.2px;
}

#invoice-modal .luxury-invoice .invoice-section {
  margin-bottom: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e0e7ef;
}

#invoice-modal .luxury-invoice .invoice-label {
  color: #1976d2;
  font-weight: 600;
  font-size: 1.06rem;
}

#invoice-modal .luxury-invoice .invoice-value {
  color: #1a2332;
  font-weight: 500;
}

#invoice-modal .luxury-invoice .invoice-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

#close-invoice-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: #154A91;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.16);
  transition: background 0.2s;
}

#close-invoice-modal:hover {
  background-color: #fbaf42;
  color: #154A91;
  box-shadow: 0 7px 20px rgba(251, 175, 66, 0.7);
  outline: none;
}

/* Headings */
h2 {
  border-bottom: 3px solid #fa923f;
  padding-bottom: 8px;
  color: #173d67;
  letter-spacing: 0.03em;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 32px;
}

/* Messages/Alerts */
.message {
  margin: 24px 0;
  max-width: 300px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  color: #155724;
  background-color: #d4edda;
  border: 2px solid #c3e6cb;
  box-sizing: border-box;
}



/* Card layout for forms/outputs */
.form-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(33, 57, 135, 0.1);
  padding-top: 30px;
  padding-bottom: 10px;
  padding-left: 0px;
  padding-right: 33px;
  max-width: 100%;
}

.custom-date {
  background: #f3faff !important;
  color: #1a2a4f;
  border: 2px solid #fbaf42;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1.08em;
  font-weight: 600;
  outline: none;
  box-shadow: 0 2px 8px rgba(251, 175, 66, 0.08);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  max-width: 100%;
}

.table-card {
  background-color: #e3f2fd;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(33, 150, 243, 0.10), 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 38px 33px;
  margin-bottom: 42px;
  border: 1px solid #e0e7ef;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #2196f3 #eaf6ff;
}

/* Custom scrollbar for Webkit browsers */
.table-card::-webkit-scrollbar {
  height: 8px;
}

.table-card::-webkit-scrollbar-thumb {
  background: #2196f3;
  border-radius: 8px;
}

.table-card::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 8px;
}

/* Form row grid */
.form-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 22px;
}

.form-row label {
  text-align: right;
  font-weight: 600;
  color: #1976d2;
  padding-right: 8px;
}

/* Inputs/Selects/Textareas with cyber accent */
.form-row input,
.form-row select,
.form-row textarea {
  font-size: 0.92rem;
  padding: 7px 10px;
  border-radius: 7px;
  border: 2px solid #ccd5db;
  background: #f3faff;
  color: #21314b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  min-height: 28px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #fa923f;
  box-shadow: 0 0 8px #fa923f44;
  outline: none;
}

/* Checkbox & radio */
.form-row input[type="checkbox"],
.form-row input[type="radio"] {
  width: 22px;
  height: 22px;
  accent-color: #fa923f;
  margin: 0;
}

@media (max-width:700px){
  .form-row input[type="checkbox"],
  .form-row input[type="radio"] {
    width: auto;
    margin: auto;
  }
}

/* Tech Button */
.sub-end-button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}


#sub-button,
.form-row #sub-button {
  background-color: #154A91;
  color: #fff;
  font-weight: 700;
  font-size: 1.1em;
  padding: 15px 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.26);
  transition: background-position 0.3s, box-shadow 0.3s;
  background-size: 220% 100%;
  background-position: right center;
  letter-spacing: 0.04em;
  text-align: center;
}

#sub-button:hover,
#sub-button:focus,
.form-row #sub-button:hover,
.form-row #sub-button:focus,
#inv-button:hover,
#inv-button:focus {
  background-color: #fbaf42;
  color: #154A91;
  box-shadow: 0 7px 20px rgba(251, 175, 66, 0.7);
  outline: none;
}

#inv-button {
  background-color: #154A91;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 15px 10px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.26);
  transition: background-position 0.3s, box-shadow 0.3s;
  background-size: 220% 100%;
  background-position: left center;
  letter-spacing: 0.04em;
}


/* Modern Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
  font-size: 1rem;
  color: #1a2332;
  font-family: inherit;
  table-layout: fixed;
  word-wrap: break-word;
  box-shadow: 0 7px 28px rgba(33, 150, 243, 0.08);
  border-radius: 16px;
  background: linear-gradient(90deg, #f5faff 85%, #eaf6ff 100%);
}

thead tr {
  background-color: #ffe082;;
  color: #01247d;
  font-weight: 700;
  border-radius: 15px 15px 0 0;
  letter-spacing: 0.01em;
}

thead th {
  padding: 10px 15px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}

tbody tr {
  background-color: #eaf6ff;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.05);
  transition: background 0.3s;
}

tbody tr:hover {
  background: linear-gradient(90deg, #bcdbff 80%, #eaf6ff 100%);
}

tbody td {
  padding: 18px 16px;
  color: #1a2332;
}

tbody tr:not(:last-child) td {
  border-bottom: 1px solid #e0e7ef;
}

/* Responsive adjustments */


/* Tooltip (Tech style) */
label[title] {
  position: relative;
  cursor: help;
}

label[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -28px;
  left: 0;
  background: #2196f3;
  color: #fff;
  font-size: 0.88rem;
  padding: 5px 8px;
  border-radius: 7px;
  white-space: nowrap;
  box-shadow: 0 3px 11px rgba(33, 150, 243, 0.18);
  z-index: 10;
}

/* nav-bar */
.hori-selector {
  background-color: #f6f8fa;
}

.hori-selector .right,
.hori-selector .left {
  background-color: #f6f8fa;
}

#navbarSupportedContent>ul>li.active>a {
  color: black;
}

/* --- Responsive Design for Dashboard --- */
@media (max-width: 1200px) {

  .form-card,
  .table-card {
    padding: 28px 12px;
  }

  h2 {
    font-size: 1.7rem;
    margin-bottom: 22px;
  }
}

@media (max-width: 900px) {
  .input-group-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-row label {
    text-align: left;
    padding-right: 0;
    margin-bottom: 6px;
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-dropdown select {
    font-size: 1rem;
    padding: 10px 14px;
  }
}

@media (max-width: 700px) {

  .form-card,
  .table-card {
    padding: 30px 20px;
    margin-bottom: 22px;
  }

  h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }

  .message {
    max-width: 90vw;
    font-size: 0.98rem;
    padding: 10px 8px;
  }

  .dashboard-dropdown {
    margin: 18px 0 14px 0;
  }

  .dashboard-dropdown select {
    font-size: 0.95rem;
    padding: 8px 10px;
  }

  table {
    font-size: 0.92rem;
    border-radius: 8px;
    box-shadow: none;
    min-width: 480px;
  }

  thead th,
  tbody td {
    padding: 8px 6px;
  }

  #invoice-modal .luxury-invoice {
    padding: 18px 8px 8px 8px;
    border-radius: 12px;
    max-width: 98vw;
  }

  #invoice-modal .luxury-invoice h2 {
    font-size: 1.1rem;
    padding-bottom: 3px;
    margin-bottom: 7px;
  }

  #close-invoice-modal {
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
   font-size: 0.95rem;
        min-height: 34px;
        padding: 8px 8px;
        max-width: 97%;
        margin-left: auto;
        text-align: center;
        margin-right: auto;
  }

  .sub-end-button {
    justify-content: center;
  }

  #expense-category-dropdown{
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  #sub-button,
  #inv-button {
    font-size: 0.85rem;
    padding: 10px 18px;
    border-radius: 40px;
  }

  .pay-button{
    width: 50%;
    margin-left: auto;
    margin-right: auto;
  }

  .table-card {
    overflow-x: auto;
  }

  table {
    min-width: 480px;
    font-size: 0.78rem;
    width: 100%;
    display: table;
    table-layout: auto;
  }

  thead th,
  tbody td {
    font-size: 0.78rem;
    padding: 6px 4px;
    min-width: 90px;
    word-break: break-word;
  }

  thead th:first-child,
  tbody td:first-child {
    min-width: 120px;
  }

  thead th:last-child,
  tbody td:last-child {
    min-width: 100px;
  }

  .invoice-row {
    flex-direction: column;
    gap: 2px;
  }

  /* Hide less important columns on very small screens */
  @media (max-width: 480px) {

    thead th:nth-child(n+5),
    tbody td:nth-child(n+5) {
      display: none;
    }
  }
}

@media (max-width: 480px) {

  .form-card,
  .table-card {
    padding: 6px 2px;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 1rem;
  }

  .message {
    font-size: 0.9rem;
    padding: 6px 4px;
  }

  #invoice-modal .luxury-invoice {
    padding: 8px 2px 2px 2px;
    border-radius: 7px;
  }

  #close-invoice-modal {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

}

/* NAVBAR responsiveness */
@media (max-width: 768px) {
  .hori-selector {
    width: 100%;
  }
  #navbarSupportedContent > ul > li > a {
    font-size: 1em;
  padding-bottom: 10px;
  margin-top: -3px;
  }
}