/* Elite Paint Voucher Entry System - Main Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Serif Bengali', serif;
  background: #f5f5f5;
  color: #333;
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Particulars Grid Styles */
.particulars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.particular-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
}

.particular-input {
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Inter', 'Noto Serif Bengali', sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.particular-input:focus {
  outline: none;
  border-color: #1e40af;
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.particular-input::placeholder {
  color: #94a3b8;
}

.particular-amount-input {
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Inter', 'Noto Serif Bengali', sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  text-align: right;
}

.particular-amount-input:focus {
  outline: none;
  border-color: #1e40af;
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.particular-total-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.particular-total-row label {
  margin: 0;
  font-size: 13px;
}

.particular-total-row input {
  width: 180px;
  text-align: right;
  font-weight: 600;
  background: #eef2ff;
}

.amount-words {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.suggestions {
  list-style: none;
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  max-height: 150px;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  width: 100%;
  display: none;
}

.suggestions li {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.suggestions li:hover {
  background: #f0f0f0;
}

.suggestions li:last-child {
  border-bottom: none;
}

.form-group:has(.suggestions li) .suggestions {
  display: block;
}

.auto-btn {
  align-self: flex-start;
  padding: 8px 12px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 4px;
  transition: background 0.2s ease;
}

.auto-btn:hover {
  background: #e0e0e0;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-small {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #667eea;
  color: white;
  margin-right: 10px;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  background: #667eea;
  color: white;
  margin-right: 5px;
}

.btn-small:hover {
  background: #5568d3;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Voucher Preview */
.voucher-preview {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.preview-header h3 {
  margin: 0;
}

.voucher-canvas {
  width: 8.3in;
  height: 5.65in;
  background: white;
  border: 1px solid #ddd;
  position: relative;
  font-family: 'Noto Serif Bengali', serif;
  overflow: hidden;
  margin: 20px auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  page-break-after: always;
}

/* History Table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.history-table thead {
  background: #f5f5f5;
}

.history-table th,
.history-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #ddd;
}

.history-table th {
  font-weight: bold;
  color: #555;
}

.history-table tbody tr:hover {
  background: #f9f9f9;
}

/* Settings */
.settings-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.settings-section h3 {
  margin-bottom: 15px;
  color: #333;
}

.settings-section p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

/* Report Styles */
.report-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #eee;
}

.report-section h3 {
  margin-bottom: 15px;
  color: #333;
}

/* Print Styles */
@media print {
  body {
    background: white;
    margin: 0;
    padding: 0;
  }

  .header,
  .nav-tabs,
  .auth-container,
  .form-actions,
  .preview-header,
  .logout-btn,
  .navigation {
    display: none;
  }

  .voucher-canvas {
    margin: 0;
    border: none;
    box-shadow: none;
    page-break-after: always;
  }

  .content {
    padding: 0;
    box-shadow: none;
    background: white;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    gap: 15px;
  }

  .user-info {
    flex-direction: column;
    gap: 10px;
  }

  .nav-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .nav-tabs button {
    white-space: nowrap;
  }

  .history-table {
    font-size: 12px;
  }

  .history-table th,
  .history-table td {
    padding: 8px;
  }
}

/* Utilities */
.loading {
  text-align: center;
  padding: 40px;
}

.error {
  background: #ffebee;
  color: #d32f2f;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #ef5350;
}

.success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #4caf50;
}
