/* style.css - Clean, Mobile-First App Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f1f5f9;
  color: #1e293b;
  line-height: 1.5;
  font-size: 15px;
}

/* Login Page Styling */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-badge {
  display: inline-block;
  background-color: #e0e7ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.login-header p {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

/* Navigation */
.navbar {
  background-color: #0f172a;
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.badge-admin {
  background-color: #f59e0b;
  color: #ffffff;
}

.badge-user {
  background-color: #3b82f6;
  color: #ffffff;
}

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

.user-greeting {
  font-size: 12px;
  color: #cbd5e1;
  display: none;
}

@media (min-width: 600px) {
  .user-greeting {
    display: inline;
  }
}

/* Container */
.container {
  padding: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.page-title-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .page-title-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.page-title-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.subtitle {
  font-size: 13px;
  color: #64748b;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Forms & Buttons */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.btn-outline {
  background-color: transparent;
  color: #f8fafc;
  border: 1px solid #475569;
}

.btn-block {
  width: 100%;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Filter Card */
.filter-card {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

.form-group-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  .form-group-inline {
    flex-direction: row;
    align-items: center;
  }
  .form-group-inline select {
    width: auto;
    flex-grow: 1;
  }
}

.officer-notice {
  background-color: #eff6ff;
  color: #1e40af;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  background: #ffffff;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.kpi-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  color: #0f172a;
}

.text-primary { color: #2563eb; }
.text-warning { color: #d97706; }
.text-success { color: #16a34a; }

/* Records List */
.record-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-card {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.serial-no {
  font-weight: 700;
  color: #64748b;
  font-size: 13px;
}

.officer-tag {
  font-size: 12px;
  font-weight: 600;
  background-color: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  color: #334155;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.status-pending { background-color: #fef3c7; color: #b45309; }
.status-reviewed { background-color: #e0e7ff; color: #4338ca; }
.status-paid { background-color: #dcfce7; color: #15803d; }
.status-waived { background-color: #f1f5f9; color: #64748b; }

.client-name {
  font-size: 16px;
  margin-bottom: 8px;
  color: #0f172a;
}

.remarks-box {
  background-color: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
  font-size: 13px;
  color: #334155;
  margin-bottom: 12px;
}

.remarks-box strong {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.fine-amt {
  font-weight: 700;
  color: #dc2626;
  font-size: 15px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
}

.login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}

.text-muted {
  color: #64748b;
}

/* Print Styles */
@media print {
  .navbar, .filter-card, .action-buttons, .modal {
    display: none !important;
  }
  body {
    background: white;
  }
  .record-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    margin-bottom: 12px;
  }
}
