* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    /* Color Palette */
    --primary: #2e2f57;
    --primary-dark: #161085;
    --success: #20644e;
    --success-dark: #04583e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #25416e;
    
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-card: #000000;
    
    --text-primary: #ffffff;
    --text-secondary: #64748b;
    --text-light: #ffffff;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: black;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* ====== HEADER ====== */
  .header {
   background-color: rgb(5, 1, 1);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
  }
  
  .header-content {
    position: relative;
    z-index: 1;
  }
  
  .header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
  }
  
  .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
  }
  
  /* ====== SECTIONS ====== */
  section {
    padding: 30px;
  }
  
  .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
  }
  
  /* ====== INPUT SECTIONS ====== */
  .setup-section,
  .expense-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
  }
  
  .input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
  }
  
  .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
  }
  
  input[type="number"],
  input[type="text"],
  select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  
  input[type="number"]:focus,
  input[type="text"]:focus,
  select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }
  
  select {
    cursor: pointer;
  }
  
  /* ====== BUTTONS ====== */
  .btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    white-space: nowrap;
    min-width: 140px;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .btn-success {
    background: var(--success);
    color: white;
  }
  
  .btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    min-width: auto;
  }
  
  .btn-edit {
    background: var(--info);
    color: white;
  }
  
  .btn-edit:hover {
    background: #2563eb;
  }
  
  .btn-delete {
    background: var(--danger);
    color: white;
  }
  
  .btn-delete:hover {
    background: #dc2626;
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  /* ====== DASHBOARD CARDS ====== */
  .dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
    background: var(--bg-primary);
  }
  
  .card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
  }
  
  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
  }
  
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  
  .card:hover::before {
    width: 100%;
    opacity: 0.05;
  }
  
  .card-icon {
    font-size: 2.5rem;
    filter: grayscale(0.2);
    transition: var(--transition);
  }
  
  .card:hover .card-icon {
    transform: scale(1.1);
    filter: grayscale(0);
  }
  
  .card-content {
    flex: 1;
  }
  
  .card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  
  .card-value small {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
  }
  
  /* Card Color Variations */
  .card-balance::before { background: #6366f1; }
  .card-savings::before { background: #10b981; }
  .card-expense::before { background: #ef4444; }
  .card-available::before { background: #8b5cf6; }
  .card-daily::before { background: #f59e0b; }
  .card-survival::before { background: #06b6d4; }
  
  /* ====== CHART SECTION ====== */
  .chart-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
  }
  
  .chart-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 500px;
    margin: 0 auto;
  }
  
  #expenseChart {
    max-height: 400px;
  }
  
  /* ====== TABLE SECTION ====== */
  .table-section {
    background: var(--bg-primary);
  }
  
  .table-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
  }
  
  #expenseTable {
    width: 100%;
    border-collapse: collapse;
  }
  
  #expenseTable thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
  }
  
  #expenseTable th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  #expenseTable tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
  }
  
  #expenseTable tbody tr:hover {
    background: var(--bg-primary);
  }
  
  #expenseTable td {
    padding: 16px;
    font-size: 0.9375rem;
  }
  
  .red-row {
    background: #fee2e2 !important;
    border-left: 4px solid var(--danger);
  }
  
  .red-row:hover {
    background: #fecaca !important;
  }
  
  #expenseTable tbody tr td:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }
  
  /* ====== EMPTY STATE ====== */
  #expenseTable tbody:empty::after {
    content: 'No expenses recorded yet. Add your first expense above!';
    display: block;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-style: italic;
  }

/* ====== TOAST NOTIFICATION ====== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.error {
  background: #ef4444;
}

  
  /* ====== RESPONSIVE DESIGN ====== */
  @media (max-width: 768px) {
    body {
      padding: 10px;
    }
  
    .container {
      border-radius: 16px;
    }
  
    .header {
      padding: 30px 20px;
    }
  
    .header h1 {
      font-size: 2rem;
    }
  
    section {
      padding: 20px;
    }
  
    .input-grid {
      grid-template-columns: 1fr;
    }
  
    .btn {
      width: 100%;
    }
  
    .dashboard {
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 20px;
    }
  
    .section-title {
      font-size: 1.25rem;
    }
  
    .card-value {
      font-size: 1.5rem;
    }
  
    .table-container {
      overflow-x: auto;
    }
  
    #expenseTable {
      font-size: 0.875rem;
    }
  
    #expenseTable th,
    #expenseTable td {
      padding: 12px 8px;
    }
  
    #expenseTable tbody tr td:last-child {
      flex-direction: column;
      gap: 4px;
    }
  
    .btn-small {
      width: 100%;
    }
  }
  
  @media (max-width: 480px) {
    .header h1 {
      font-size: 1.5rem;
    }
  
    .subtitle {
      font-size: 0.875rem;
    }
  
    .card {
      padding: 16px;
    }
  
    .card-icon {
      font-size: 2rem;
    }
  
    .chart-container {
      padding: 20px;
    }
  }
  
  /* ====== ANIMATIONS ====== */
  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .card {
    animation: slideInUp 0.5s ease-out backwards;
  }
  
  .card:nth-child(1) { animation-delay: 0.05s; }
  .card:nth-child(2) { animation-delay: 0.1s; }
  .card:nth-child(3) { animation-delay: 0.15s; }
  .card:nth-child(4) { animation-delay: 0.2s; }
  .card:nth-child(5) { animation-delay: 0.25s; }
  .card:nth-child(6) { animation-delay: 0.3s; }
  
  /* ====== SCROLLBAR STYLING ====== */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--bg-primary);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
  }