/*
 * medpack.css - medPack POC stylesheet
 *
 * Version: 0.1.1
 * Copyright 2025 - 2026: Gateway Checker Corporation.  All Rights Reserved.
 * Confidential and Proprietary.
 *
 * Visually mirrors the Gateway Checker portal: blue header band, green
 * profile context bar, tab strip with folder-style icons, white content area.
 */

/* ------------------------------------------------------------------
 * Base / reset
 * ------------------------------------------------------------------ */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #f3f3f3;
    color: #222;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
}

a { color: #1f5fa8; text-decoration: none; }
a:hover { text-decoration: underline; }

h2, h3, h4 { color: #222; }

/* ------------------------------------------------------------------
 * Header band
 * ------------------------------------------------------------------ */
.gwc-header {
    /* The portal header is a deep navy with a curved white-on-blue wave on
     * the right; we approximate with a flat navy and a subtle gradient. */
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 25%, #1a3a8a 60%, #1a3a8a 100%);
    border-bottom: 1px solid #1a3a8a;
}

.gwc-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.gwc-logo img {
    height: 56px;
    display: block;
}

.gwc-header-right {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.gwc-product-name {
    color: #b6dc63; /* GWC green */
    font-weight: 700;
    font-size: 16px;
}

.gwc-separator {
    color: rgba(255, 255, 255, 0.5);
}

.gwc-user-info, .gwc-profile-name {
    color: #ffffff;
}

.gwc-logout {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: not-allowed;
    margin-left: 8px;
    font-size: 13px;
    opacity: 0.7;
}

.gwc-x { display: inline-block; margin-right: 4px; }

/* ------------------------------------------------------------------
 * Tab strip
 * ------------------------------------------------------------------ */
.gwc-tabs {
    background: #ffffff;
    border-bottom: 1px solid #d6d6d6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gwc-tabs-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

.gwc-tabs-main, .gwc-tabs-util {
    display: flex;
    align-items: stretch;
}

.gwc-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 18px;
    color: #2a6db5;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.gwc-tab:hover {
    background: #f7faff;
    text-decoration: none;
}

.gwc-tab-active {
    color: #b6dc63;
    border-bottom-color: #b6dc63;
}

.gwc-tab-stub {
    color: #95a3b5;
    font-style: italic;
}

.gwc-tab-icon { font-size: 16px; }

.gwc-tabs-util {
    color: #2a6db5;
    gap: 18px;
    align-items: center;
}

.gwc-util-link {
    color: #2a6db5;
    font-size: 13px;
    padding: 8px 4px;
    cursor: default;
    opacity: 0.85;
}

/* ------------------------------------------------------------------
 * Green profile context bar
 * ------------------------------------------------------------------ */
.gwc-context-bar {
    background: #b6dc63;
    color: #ffffff;
    font-weight: 600;
}

.gwc-context-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 24px;
    text-align: right;
    font-size: 13px;
}

/* ------------------------------------------------------------------
 * Content area
 * ------------------------------------------------------------------ */
.gwc-content {
    background: #f3f3f3;
    min-height: calc(100vh - 180px);
}

.gwc-content-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.gwc-page-title {
    margin-top: 0;
    margin-bottom: 4px;
    color: #1a3a8a;
    font-size: 22px;
}

.gwc-page-desc {
    color: #555;
    margin-top: 0;
    margin-bottom: 24px;
}

/* ------------------------------------------------------------------
 * EPCIS upload row
 * ------------------------------------------------------------------ */
.gwc-upload-row {
    background: #ffffff;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gwc-upload-label {
    font-weight: 600;
    color: #444;
    margin-right: 4px;
}

.gwc-upload-row input[type="file"] {
    border: 1px solid #c8c8c8;
    background: #fafafa;
    padding: 6px;
    border-radius: 3px;
    font-size: 13px;
}

.gwc-upload-status {
    margin-left: 12px;
    font-size: 13px;
}

.gwc-upload-status.is-busy { color: #1a3a8a; }
.gwc-upload-status.is-ok   { color: #2e7d32; font-weight: 600; }
.gwc-upload-status.is-err  { color: #b00020; font-weight: 600; }

/* ------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------ */
.gwc-btn-primary {
    background: #1a3a8a;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.gwc-btn-primary:hover:not(:disabled) { background: #15307a; }

.gwc-btn-primary:disabled {
    background: #c0c0c0;
    cursor: not-allowed;
}

.gwc-btn-stub {
    background: #e8e8e8;
    color: #777;
    border: 1px dashed #b9b9b9;
    padding: 8px 14px;
    border-radius: 3px;
    cursor: not-allowed;
    font-size: 13px;
    margin: 0 6px 6px 0;
}

/* Active secondary button: clearly pressable, with a real disabled state.
   Used for Test Mode, derive helpers, Cancel, and other working buttons whose
   availability can depend on input. When disabled it shows the not-allowed
   cursor; when enabled it shows a pointer and darkens on hover. */
.gwc-btn-secondary {
    background: #ffffff;
    color: #1a3a8a;
    border: 1px solid #1a3a8a;
    padding: 8px 14px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    margin: 0 6px 6px 0;
}
.gwc-btn-secondary:hover:not(:disabled) { background: #eef2fb; }
.gwc-btn-secondary:active:not(:disabled) { background: #dfe8f8; }
.gwc-btn-secondary:disabled {
    background: #ececec;
    color: #a0a0a0;
    border-color: #cfcfcf;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------
 * Results panel
 * ------------------------------------------------------------------ */
.gwc-results-panel {
    background: #ffffff;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 18px;
}

.gwc-results-panel h3 {
    margin-top: 0;
    color: #1a3a8a;
    font-size: 16px;
}

.gwc-results-panel.is-ok  { border-left: 4px solid #2e7d32; }
.gwc-results-panel.is-err { border-left: 4px solid #b00020; }

.gwc-results-panel pre {
    background: #f7f7f7;
    padding: 10px;
    border-radius: 3px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.4;
    max-height: 320px;
}

.gwc-tid-callout {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    background: #eef4fb;
    border: 1px solid #c4d6ea;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 600;
}

/* ------------------------------------------------------------------
 * Data table (history)
 * ------------------------------------------------------------------ */
.gwc-history-section h3 {
    color: #1a3a8a;
    font-size: 16px;
    margin-bottom: 6px;
}

.gwc-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #d6d6d6;
    font-size: 13px;
}

.gwc-data-table thead th {
    background: #eaf1fa;
    color: #1a3a8a;
    font-weight: 700;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #c4d6ea;
}

.gwc-data-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.gwc-data-table tbody tr:hover { background: #fafcff; }

.gwc-empty-row td {
    color: #888;
    font-style: italic;
    text-align: center;
}

.gwc-status-ok  { color: #2e7d32; font-weight: 600; }
.gwc-status-err { color: #b00020; font-weight: 600; }

/* ------------------------------------------------------------------
 * Placeholder cards (used by stub tabs)
 * ------------------------------------------------------------------ */
.gwc-placeholder-card {
    background: #ffffff;
    border: 1px dashed #c0c0c0;
    border-radius: 6px;
    padding: 24px;
    max-width: 720px;
}

.gwc-placeholder-badge {
    display: inline-block;
    background: #fff3cd;
    color: #7a5d00;
    border: 1px solid #f0d666;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.gwc-placeholder-card h4 {
    margin-top: 24px;
    margin-bottom: 10px;
    color: #444;
}

.gwc-stub-actions {
    display: flex;
    flex-wrap: wrap;
}
