/* =========================
   GLOBAL RESET & BASE
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f6f8;
    margin: 0;
    padding: 0;
    color: #222;
}
/* ===== CONTACT FORM ===== */

.contact-form {
  max-width: 520px;
  margin: 24px auto;
  padding: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 16px;
  padding: 12px 18px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.9;
}
.contact-heading {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 24px 0 12px 0;
  color: #111;
}

/* =========================
   APP CONTAINER
========================= */
.app-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 14px 80px;
}

/* =========================
   HEADER / LOGO PLACEHOLDER
========================= */


.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    
    top: 0;
    z-index: 10;
    text-align: center;
}


.logo-placeholder {
    width: 242px;
    height: 242px;
    border-radius: 8px;
    background: #e1e3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* prevents flex from stretching it */
}

.logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.app-header h1 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

/* =========================
   FORM SECTIONS
========================= */
.input-section {
    background: #ffffff;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.input-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #fff;
}

input:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

/* Readonly (catalog-locked) fields */
input[readonly] {
    background: #f1f3f6;
    color: #555;
}

/* =========================
   BUTTONS
========================= */
button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

button.primary {
    background: #007bff;
    color: #fff;
}

button.secondary {
    background: #6c757d;
    color: #fff;
}

button.danger {
    background: #dc3545;
    color: #fff;
}

button + button {
    margin-top: 8px;
}

/* Inline button row (desktop / tablet) */
.button-row {
    display: flex;
    gap: 10px;
}

.button-row button {
    width: 100%;
}

/* =========================
   UNIT LABEL
========================= */
#unitLabel {
    font-size: 0.8rem;
    color: #666;
    margin: 4px 2px 10px;
}

/* =========================
   TABLE (QUOTE)
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: #222;
    color: #fff;
}

th,
td {
    padding: 10px 8px;
    text-align: left;
    font-size: 0.85rem;
}

th {
    font-weight: 600;
}

tbody tr:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* =========================
   LINE ITEM STATES
========================= */
.overridden td {
    background: #fff3cd;
}

.category-subtotal td {
    background: #f0f0f0;
    font-weight: 700;
    border-top: 2px solid #333;
}

/* =========================
   ACTION BUTTONS IN TABLE
========================= */
.table-actions button {
    font-size: 0.75rem;
    padding: 6px 8px;
    border-radius: 6px;
    margin-right: 4px;
}

.table-actions .edit {
    background: #ffc107;
    color: #222;
}

.table-actions .delete {
    background: #dc3545;
    color: #fff;
}

/* =========================
   TOTAL / SUMMARY
========================= */
#result {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#result h3 {
    margin: 0;
    font-size: 1.2rem;
}

/* =========================
   RESPONSIVE TWEAKS
========================= */
@media (min-width: 768px) {
    .app-container {
        padding: 20px;
    }

    .input-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    th,
    td {
        font-size: 0.9rem;
    }
    body {
    background: linear-gradient(180deg, #f5f6f8 0%, #eef1f5 100%);
}

.input-section {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.input-section:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
h2 {
    font-size: 1.15rem;
    margin: 20px 0 10px;
    font-weight: 700;
    color: #222;
}
.muted {
    font-size: 0.8rem;
    color: #6b7280;
}
button {
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease,
        background-color 0.15s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}
button:active {
    transform: scale(0.96);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
button.primary:active {
    background-color: #0069d9;
}
@keyframes confirmPulse {
    0% { box-shadow: 0 0 0 0 rgba(0,123,255,0.5); }
    100% { box-shadow: 0 0 0 8px rgba(0,123,255,0); }
}

button.primary:focus {
    animation: confirmPulse 0.4s ease;
}
button.danger {
    background: linear-gradient(180deg, #dc3545, #b02a37);
}

button.danger:active {
    background: #a71d2a;
}
tbody tr {
    transition: background-color 0.12s ease;
}

tbody tr:hover {
    background-color: #f7f9fc;
}
.table-actions button {
    transition: transform 0.08s ease;
}

.table-actions button:active {
    transform: scale(0.92);
}
input:focus,
select:focus,
textarea:focus {
    background: #ffffff;
}
#addItemBtn {
    background: linear-gradient(180deg, #007bff, #0056b3);
}

#addItemBtn:active {
    background: #004a99;
}
@media (max-width: 640px) {
  .contact-form {
    padding: 16px;
  }
}
}






