/* Page + panels */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f6f6;
    color: #111;
}

.page {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px 32px;
}

.panel {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px 20px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
}

.panel-tag {
    font-size: 13px;
    color: #666;
}

/* Meta pills */
.meta-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.meta-pill {
    background: #141f2e;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    display: inline-flex;
    gap: 4px;
}

.meta-label {
    opacity: 0.7;
}

.meta-value {
    font-weight: 500;
}

/* Order details grid */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 24px;
    margin-bottom: 12px;
}

.field-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 2px;
}

.field-value {
    font-size: 14px;
}

.field-value.muted {
    color: #999;
}

/* Status banner */
.status-banner {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #141f2e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #00c853;
    display: inline-block;
    margin-right: 6px;
}

.status-text {
    font-weight: 600;
}

.status-sub {
    font-size: 13px;
    opacity: 0.85;
}

/* Grids (div-based table) */
.grid-header,
.grid-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr 0.8fr 0.8fr;
    align-items: center;
}

.grid-header {
    background: #6c1845;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.grid-body {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.grid-row {
    padding: 8px 10px;
    border-top: 1px solid #eee;
    background: #ffffff;
    font-size: 14px;
}

.grid-row:nth-child(odd) {
    background: #fafafa;
}

.col {
    padding-right: 8px;
}

.col.br,
.col.sr {
    text-align: center;
}

.col.edit,
.col.delete {
    text-align: center;
}

/* Buttons */
.primary-button {
    background: #141f2e;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.grid-button {
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

.grid-button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Notes + submit */
.notes-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    margin-top: 4px;
}

.submit-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.modal {
    background: #ffffff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    padding: 16px 18px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.modal-field {
    margin-bottom: 10px;
}

.modal-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
}

.modal-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* Loading / error */
.loading {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: #141f2e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.error {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: #b00020;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.instructions-body {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Responsive for grids ONLY */
@media (max-width: 700px) {
    .grid-header,
    .grid-row {
        grid-template-columns: 2fr 2fr 1fr 1fr 1fr 1fr 1fr;
    }
}



/* ===== BRAND HEADER (updated) ===== */

.brand-header {
    width: 100%;
    margin: 0 auto 16px;
    max-width: 960px; /* match .page width */
}

/* Top bar (now larger text) */
.brand-top {
    background: #6C1845;
    color: #ffffff;
    text-align: center;
    padding: 12px 0;
}

.brand-top-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* Middle bar (logo only) */
.brand-middle {
    background: #f6f6f6;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.brand-logo {
    background: #ddd;
    color: #555;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
}

/* Title bar (now smaller text + reduced height) */
.brand-titlebar {
    background: #141F2E;
    color: #ffffff;
    text-align: center;
    padding: 8px 0;
}

.brand-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 700px) {
    .brand-header {
        max-width: 100%;
    }
}
