/* Global Styles */
:root {
  --primary-color: #4a6fa5;
  --secondary-color: #6b8cae;
  --accent-color: #e67e22;
  --background-color: #f9f9f9;
  --card-color: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e1e1e1;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', 'Segoe UI', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

/* Header */
header {
  background-color: var(--card-color);
  box-shadow: var(--shadow);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
}

.btn-accent:hover {
  opacity: 0.9;
}

/* Card Styles */
.card {
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.02);
}

.table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Dashboard Styles */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-light);
  font-size: 14px;
}

/* OCR Upload Styles */
.upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  margin: 20px 0;
  transition: all 0.3s;
}

.upload-container:hover {
  border-color: var(--primary-color);
}

.upload-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.upload-text {
  margin-bottom: 15px;
  text-align: center;
}

.upload-options {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

/* Nota List Styles */
.nota-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.nota-card {
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s;
}

.nota-card:hover {
  transform: translateY(-5px);
}

.nota-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.nota-content {
  padding: 15px;
}

.nota-merchant {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
}

.nota-date, .nota-total {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 5px;
}

.nota-total {
  font-weight: 600;
  color: var(--accent-color);
}

.nota-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

/* Filter and Search Styles */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.filter-select {
  min-width: 150px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-around;
  }
  
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    width: 100%;
  }
  
  .nota-list {
    grid-template-columns: 1fr;
  }
}

/* Login and Registration Styles */
.auth-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* QA Interface Styles */
.qa-container {
  max-width: 800px;
  margin: 0 auto;
}

.qa-input {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.qa-input input {
  flex: 1;
}

.qa-messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.qa-message {
  padding: 15px;
  border-radius: 8px;
  max-width: 80%;
}

.qa-user {
  align-self: flex-end;
  background-color: var(--primary-color);
  color: white;
}

.qa-system {
  align-self: flex-start;
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
}

/* OCR Edit Styles */
.ocr-edit-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.ocr-image {
  flex: 1;
  max-width: 50%;
}

.ocr-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ocr-form {
  flex: 1;
}

.ocr-field {
  margin-bottom: 15px;
}

.ocr-field-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.ocr-field-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .ocr-edit-container {
    flex-direction: column;
  }
  
  .ocr-image {
    max-width: 100%;
  }
}
