/* =======================
   GLOBAL STYLES
======================= */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #16a34a;
  --danger: #dc2626;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: image();
  color: var(--text);
}

/* =======================
   HEADER
======================= */

header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 30px;
  background: #0f172a;
  color: white;
}

.logo-header {
  height: 40px;
}

header h1 {
  font-size: 20px;
  margin: 0;
}

.back-btn {
  margin-left: auto;
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 8px;
}

/* =======================
   MAIN
======================= */

main {
  max-width: 1200px;
  margin: auto;
  padding: 25px;
}

/* =======================
   CARDS & SECTIONS
======================= */

.card,
.form-section,
.table-section {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

h2 {
  margin-top: 0;
  font-size: 18px;
}

/* =======================
   FORMS
======================= */

form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

input,
select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  flex: 1 1 220px;
}

/* =======================
   BUTTONS
======================= */

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

button[type="submit"] {
  background: var(--primary);
  color: white;
}

.addBtn {
  background: var(--success);
  color: white;
}

.removeBtn {
  background: var(--danger);
  color: white;
}

/* =======================
   TABLES
======================= */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #0f172a;
  color: white;
}

th, td {
  padding: 12px;
  text-align: left;
}

tbody tr:nth-child(even) {
  background: #f9fafb;
}
tbody tr:hover {
  background: #e0e7ff;
}
/* style.css */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f6fa;
}
.login-container {
  max-width: 400px;
  width: 100%;
  padding: 30px;
  text-align: center;
}
.login-container h2 {
  margin-bottom: 20px;
  color: #2f3640;
}
.login-container input, 
.login-container button {
  margin-bottom: 15px;
}
.login-container button {
  background-color: #2f3640;
  color: #fff;
  cursor: pointer;
}
.login-container button:hover {
  background-color: #353b48;
}
/* Specific layout for the login form */
#loginForm {
  display: flex;
  flex-direction: column; /* Stacks elements vertically */
  gap: 15px;              /* Adds space between inputs and button */
}

#loginForm input, 
#loginForm button {
  width: 100%;            /* Ensures they take up the full width of the card */
  flex: none;             /* Overrides the flex: 1 1 220px from your global styles */
  margin-bottom: 0;       /* Uses the gap property instead for spacing */
}

.summary-box {
  background: #f5f7fa;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  display: flex;
  gap: 20px;
  font-size: 15px;
}
.summary-box b {
  color: #1a237e;
}
.filter-bar {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
}
/* 🔥 Black Whole Bill Highlight */
.bwb-row {
  background-color: #fff3cd; /* light yellow */
  color: #856404;
  font-weight: bold;
}
/* 🔥 Black Whole Bill Highlight */
.expense-row {
  background-color: #fff3cd;
}
.expense-row td {
  font-weight: bold;
}
a{
  text-decoration: none;
  display: inline-block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: bold;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(7, 7, 14, 0.616);
  transition: all 0.25s ease;
  color: white;
}
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  width: 260px;
  background: #0f172a;
  color: white;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 30px;
}

.sidebar-logo img {
  width: 40px;
}

.sidebar nav a {
  display: block;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 14px;
  transition: 0.2s;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}
.main-content {
  margin-left: 260px;
  width: calc(100% - 260px);
  display: flex;
  flex-direction: column;
}
.topbar {
  background: white;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.3s;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .menu-btn {
    display: block;
  }
}
