/* =========================================================
   GLOBAL RESET
========================================================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    padding-bottom: 36px;
}

/* =========================================================
   HEADER
========================================================= */

.header-wrapper {
    padding: 20px;
}

.header {
    background: white;
    height: 120px;
    display: flex;
    align-items: stretch;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative; /* Required for logout button positioning */
}

.logo-section {
    display: flex;
    align-items: center;
}

.thermo {
    background: #ff0d00;
    color: white;
    padding: 100% 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tf {
    font-size: 34px;
    font-weight: bold;
}

.sc {
    font-size: 17px;
    letter-spacing: 14px;
    margin-left: 4px;
}

.ppd {
    margin-left: 55px;
    font-size: 56px;
    font-weight: bold;
    color: #5a2d82;
    display: flex;
    align-items: center;
}

/* =========================================================
   LOGOUT BUTTON
   Auto-injected into every page header via common.js.
   Uses !important to prevent page-level button styles
   (printing.css, kitting.css, qc.css, pickup.css) from
   overriding the size and appearance of this button.
========================================================= */

.logout-btn {
    position: absolute !important;
    top: 50% !important;
    right: 32px !important;
    transform: translateY(-50%) !important;
    background: #cc0000 !important;
    color: white !important;
    border: none !important;
    height: 44px !important;
    width: auto !important;
    padding: 0 22px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s !important;
    z-index: 100 !important;
}

.logout-btn:hover {
    background: #aa0000 !important;
}

/* =========================================================
   BACK BUTTON
========================================================= */

.back-button-container {
    padding: 0 20px;
    margin: 15px 0;
}

#backBtn {
    height: 45px;
    width: 190px;
    border: none;
    border-radius: 8px;
    background: #777;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#backBtn:hover {
    background: #555;
}

/* =========================================================
   FOOTER (Legacy class - kept for compatibility)
========================================================= */

.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    background: #f4f4f4;
    font-size: 13px;
    color: #777;
}

/* =========================================================
   GLOBAL MESSAGE MODAL
========================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: none;
}

.modal-card {
    background: white;
    width: 360px;
    padding: 24px 30px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    animation: fadeIn 0.2s ease-in-out;
}

.modal-card h3 {
    margin-top: 0;
    font-size: 22px;
}

.modal-card p {
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    margin: 12px 0 0 0;
}

.modal-card.success h3 {
    color: #2e7d32;
}

.modal-card.error h3 {
    color: #e53935;
}

.modal-card button {
    margin-top: 28px;
    width: 120px;
    height: 46px;
    border: none;
    border-radius: 8px;
    background: #5a2d82;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.modal-card button:hover {
    background: #4a226e;
}

.modal-card button:focus {
    outline: 3px solid #c5a3e6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1);    }
}

/* =========================================================
   APP FOOTER BAR
   Fixed at bottom of every page
========================================================= */

#appFooter {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #aaa;
    border-top: 1px solid #eee;
    background: white;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-sizing: border-box;
}