* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #020203;
}

.hidden {
  display: none !important;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 600;
}

/* LOGIN */

.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  background-image: url("Mechanical_Engineer_1920X10180.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 10px 30px #0003;
}

.login-card h1 {
  color: #1e3a8a;
  text-align: center;
  font-size: 23px;
}

.login-card > p,
.login-card small {
  display: block;
  text-align: center;
  color: #64748b;
  margin: 12px 0 20px;
}

label {
  display: block;
  font-weight: 600;
  margin: 12px 0 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  background: white;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: #2563eb;
}

.error {
  color: #dc2626;
  margin-top: 12px;
}

/* HEADER */

#appPage {
  max-width: 1500px;
  margin: auto;
  padding: 22px;
}

.topbar {
  background: #1e3a8a;
  color: white;
  padding: 22px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 23px;
  margin-bottom: 7px;
}

.topbar p,
.topbar small {
  color: #dbeafe;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.refresh-btn {
  background: #0f766e;
  color: white;
}

.logout-btn {
  background: #dc2626;
  color: white;
}

/* TABS */

.tabs {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #dbeafe;
  color: #1e3a8a;
}

.tab-btn.active {
  background: #1e3a8a;
  color: white;
}

.tab-content {
  display: block;
}

/* PANELS AND FORMS */

.panel {
  background: white;
  margin-top: 20px;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 3px 12px #0f172a0d;
}

.panel h2 {
  color: #1e3a8a;
  font-size: 20px;
  margin-bottom: 18px;
}

.panel h3 {
  margin-top: 22px;
  color: #334155;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.primary-btn {
  background: #2563eb;
  color: white;
  margin-top: 18px;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.secondary-btn {
  background: #475569;
  color: white;
  margin-top: 12px;
}

.excel-btn {
  background: #15803d;
  color: white;
}

.excel-btn:hover {
  background: #166534;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading h2 {
  margin-bottom: 0;
}

/* TABLES */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

th,
td {
  padding: 11px;
  border: 1px solid #e2e8f0;
  text-align: left;
  font-size: 13px;
}

th {
  background: #eff6ff;
  color: #1e3a8a;
  white-space: nowrap;
}

td input {
  min-width: 100px;
  padding: 8px;
}

.items-table td:first-child {
  text-align: center;
}

/* STATUS AND ACTIONS */

.status {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 12px;
}

.status-pending {
  color: #92400e;
  background: #fef3c7;
}

.status-approved {
  color: #166534;
  background: #dcfce7;
}

.status-rejected {
  color: #991b1b;
  background: #fee2e2;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.approve-btn {
  background: #15803d;
  color: white;
}

.reject-btn {
  background: #dc2626;
  color: white;
}

.edit-btn {
  background: #d97706;
  color: white;
}

.print-btn {
  background: #475569;
  color: white;
}

.delete-row-btn {
  background: #fee2e2;
  color: #991b1b;
}

/* CHALLAN */

.items-heading {
  margin-bottom: 8px;
}

.total-box {
  text-align: right;
  font-size: 18px;
  margin-top: 18px;
  padding: 14px;
  background: #eff6ff;
  border-radius: 7px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* FOOTER */

footer {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  padding: 25px;
}

/* MOBILE */

@media (max-width: 700px) {
  #appPage {
    padding: 12px;
  }

  .topbar {
    padding: 17px;
  }

  .topbar h1 {
    font-size: 19px;
  }
 
  .panel {
    padding: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
  }
}