/* General Body and Header Styles */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f4f7f6; /* Softer background color */
  margin: 0;
  padding: 0;
  color: #2d3748; /* Darker text for better readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  background-color: #ffffff;
  color: #1a202c;
  text-align: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-logo {
  width: 140px; /* Increased logo size for better presence */
  height: auto;
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
}

header h1 {
  margin: 0;
  font-size: 1.75rem; /* Adjusted font size */
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* Main Container Styles */
.container {
  max-width: 1200px;
  margin: 2.5rem auto;
  background-color: #ffffff;
  padding: 2.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); /* Softer, more modern shadow */
  border-radius: 12px;
}

/* Form Element Styles */
.form-container {
  display: flex;
  flex-direction: column;
}

.form-container label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
  color: #4a5568; /* Softer label color */
  font-size: 0.9rem;
}

.form-container input,
.form-container select {
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e0;
  border-radius: 8px; /* More rounded inputs */
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 1rem;
  background-color: #fdfdff;
}

.form-container input:focus,
.form-container select:focus {
  border-color: #005a9e; /* Alfamart Blue on focus */
  box-shadow: 0 0 0 3px rgba(0, 90, 158, 0.2);
  outline: none;
}

/* ======================= KODE YANG DIPERBARUI ======================= */
/* Menghilangkan panah dropdown untuk select yang di-disable */
select[disabled] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #e9ecef !important;
    cursor: not-allowed;
}
/* ======================= AKHIR DARI PERUBAHAN ======================= */

/* Section Titles */
.section-title {
  color: #e53e3e; /* Alfamart Red */
  border-bottom: 2px solid #ffc107; /* Alfamart Yellow */
  padding-bottom: 8px;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

table {
  table-layout: fixed !important; 
  width: 100% !important; 
  border-collapse: collapse;
}

.col-no { width: 35px; text-align: center; }
.col-jenis-pekerjaan { width: 30%; }
.col-satuan { width: 45px; }
.col-volume { width: 7%; }
.col-harga { width: 13%; }
.col-total { width: 13%; }
.col-total-harga { width: 14%; }
.col-aksi { width: 80px; }

table th,
table td {
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  word-wrap: break-word;
  hyphens: auto;
}

table thead th {
  background-color: #fce4e4;
  font-weight: 700;
  color: #d61027;
  text-transform: uppercase;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 8px 3px;
}

table tbody tr:nth-child(even) {
  background-color: #fcfdff;
}

table tbody td {
  padding: 6px 3px;
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: normal;
}

table tbody td input,
table tbody td select {
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    min-height: 32px;
    line-height: 1.2;
    white-space: normal;
    height: auto; 
}

table tbody td input[type="text"],
table tbody td select {
    padding: 5px 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: center;
}

table tbody td input:focus,
table tbody td select:focus {
    border-color: #005a9e;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 90, 158, 0.2);
    outline: none;
}

.auto-filled {
    background-color: #e9ecef !important; /* Abu-abu muda */
    cursor: not-allowed;
    color: #6c757d;
}

.kondisional-input {
    background-color: #fffde7 !important; /* Kuning muda */
}

.col-jenis-pekerjaan {
  text-align: left !important;
  padding: 10px 8px !important;
}

.col-harga input,
.col-total input,
.col-total-harga input {
  text-align: right;
  font-family: 'Courier New', monospace;
}

/* Button Styles */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.form-container button {
  background-color: #e53e3e;
  color: white;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.form-container button:hover {
  background-color: #c53030;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-container button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-container button[type="reset"] {
    background-color: #6c757d;
}

.form-container button[type="reset"]:hover {
    background-color: #5a6268;
}

.add-row-btn {
  background-color: #005a9e !important;
  margin-top: 1rem !important;
  padding: 0.6rem 1rem !important;
  flex: none !important;
  align-self: flex-start;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.add-row-btn:hover {
  background-color: #004a80 !important;
}

.delete-row-btn {
    background-color: #f1f3f5 !important;
    color: #e53e3e !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
}

.delete-row-btn:hover {
    background-color: #e53e3e !important;
    color: white !important;
}

/* Grand Total Box */
.grand-total-box {
  background-color: #fff9e6;
  color: #1a202c;
  border: 1px solid #ffc107;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: right;
  margin-top: 2.5rem;
}

.grand-total-box span {
  font-size: 1.5rem;
  font-weight: 700;
}

#grand-total-amount {
    color: #e53e3e;
    margin-left: 1rem;
}

/* Back Button */
.back-btn {
  color: #005a9e;
  text-decoration: none;
  font-size: 1rem;
  display: inline-block;
  margin-top: 2rem;
  cursor: pointer;
  transition: color 0.3s;
  font-weight: 500;
}

.back-btn:hover {
  color: #e53e3e;
}

/* Message Display Area */
#message {
  margin: 25px auto;
  max-width: 1200px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.btn-logout-form {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-logout-form:hover {
    background-color: #c53030;
}


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

  header {
    flex-direction: column;
    padding: 1.5rem;
    height: auto;
  }
  
  header h1 {
    font-size: 1.5rem;
    margin-top: 1rem;
    text-align: center;
  }

  .header-logo {
    position: static;
    transform: none;
    margin: 0 auto;
    width: 120px;
    left: auto;
  }
  
  .table-container {
      -webkit-overflow-scrolling: touch;
  }

  table {
      min-width: 880px;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .form-container button {
    padding: 10px 15px;
    font-size: 1rem;
  }

  .back-btn {
    margin-top: 20px;
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .grand-total-box {
    padding: 15px;
  }
  
  .grand-total-box span {
    font-size: 1.5rem;
  }

  #nomor-ulok-container {
    flex-direction: column;
    gap: 8px !important;
    align-items: stretch !important;
  }

  #nomor-ulok-container > * {
    flex: 1 1 100% !important;
    text-align: center;
  }
}

/* Aturan untuk membuat dropdown rata kiri */
table tbody td select.jenis-pekerjaan {
    text-align: left;
    -moz-text-align-last: left; /* Khusus untuk Firefox */
    text-align-last: left;
}