:root {
  --bp-green: #009b48;
  --bp-yellow: #ffd300;
  --bp-light-green: #e8f5e9;
  --dark-bg: #1a1a1a;
  --card-bg: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --border-color: #404040;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
header {
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-link {
  color: var(--bp-green);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--bp-green), var(--bp-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.full-width {
  grid-column: span 2;
}

/* Upload Section */
.upload-area {
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--bp-green);
  background: rgba(0, 155, 72, 0.1);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--bp-green);
}

/* Processing Status */
.status-bar {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: none;
}

.progress {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bp-green), var(--bp-yellow));
  width: 0%;
  transition: width 0.3s ease;
}

/* Receipts Table */
.receipts-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

th {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--bp-green);
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

/* Buttons */
.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  font-size: 1rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--bp-green);
  color: white;
  width: 100%;
  margin-top: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  margin-right: 1rem;
}

.btn-danger {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
  padding: 0.5rem;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* Invoice Page Styles */
.invoice-page {
  background: white;
  color: #333;
  min-height: 100vh;
  padding: 4rem;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 2rem;
}

.company-info h2 {
  color: var(--bp-green);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
}

.invoice-table th {
  background: #f8f9fa;
  color: #333;
  border-bottom: 2px solid #eee;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.invoice-table td {
  border-bottom: 1px solid #eee;
  color: #555;
}

.total-section {
  text-align: right;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .main-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

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

  .full-width {
    grid-column: span 1;
  }

  /* Responsive Table */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
  }

  td {
    border: none;
    position: relative;
    padding: 0.5rem 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
  }

  /* Hide row number on mobile */
  td.row-number {
    display: none;
  }

  td.row-action {
    text-align: right;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
  }

  td.row-action::before {
    display: none;
  }

  .receipts-container {
    padding: 1rem;
  }

  .btn-secondary {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }
  .no-print {
    display: none;
  }
  .invoice-page {
    padding: 0;
  }
}
