/* ==========================================================================
   eIFU Portal Modern Mobile-First Design System
   Optimized for All Screen Sizes & Mobile WebViews
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --brand: #0D233E;
    --brand-dark: #071526;
    --brand-light: rgba(13, 35, 62, 0.08);
    --brand-glow: rgba(13, 35, 62, 0.2);
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base & Mobile WebView Resets */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-dark);
}

main {
    flex: 1;
}

/* ==========================================================================
   APP HEADER & NAVIGATION (Mobile WebView Friendly)
   ========================================================================== */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    padding-top: env(safe-area-inset-top);
    transition: var(--transition);
}

.app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 16px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.app-brand-logo {
    max-height: 42px;
    max-width: 190px;
    width: auto;
    object-fit: contain;
}

.app-brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--brand);
    line-height: 1.1;
    white-space: nowrap;
}

/* Language Dropdown Pill */
.lang-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    min-height: 42px;
    transition: var(--transition);
}

.lang-pill-btn:hover, .lang-pill-btn:focus {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: var(--text-primary);
}

.lang-dropdown-menu {
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 160px;
    background: #fff;
    margin-top: 8px !important;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.lang-dropdown-item:hover, .lang-dropdown-item.active {
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 600;
}

/* ==========================================================================
   HERO BANNER & SEARCH CONTAINER
   ========================================================================== */

.hero-section {
    position: relative;
    padding: 48px 0 60px;
    background: radial-gradient(circle at 50% 0%, var(--brand-light) 0%, rgba(248, 250, 252, 0.7) 65%, var(--bg-page) 100%);
    text-align: center;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.hero-badge i {
    color: var(--brand);
}

.hero-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(14.5px, 2vw, 17px);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   MODERN APP-LIKE SEARCH CARD
   ========================================================================== */

.search-card-wrapper {
    max-width: 820px;
    margin: -30px auto 40px;
    position: relative;
    z-index: 10;
    padding: 0 16px;
}

.modern-search-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 28px 32px;
    transition: var(--transition);
}

.modern-search-card:hover {
    border-color: var(--border-hover);
}

.search-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.search-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.search-card-title i {
    color: var(--brand);
}

.search-guide-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.search-guide-btn:hover {
    background: var(--brand);
    color: #ffffff;
}

/* Form Grid */
.modern-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.modern-search-grid .col-full {
    grid-column: 1 / -1;
}

/* Modern Input Groups */
.modern-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.modern-input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
    z-index: 2;
}

.modern-floating-input {
    width: 100%;
    height: 56px;
    padding: 20px 16px 6px 46px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.modern-floating-input:focus {
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-light);
}

.modern-floating-input:focus + .modern-floating-label,
.modern-floating-input:not(:placeholder-shown) + .modern-floating-label {
    transform: translateY(-11px) scale(0.78);
    color: var(--brand);
}

.modern-floating-label {
    position: absolute;
    left: 46px;
    top: 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
    transform-origin: 0 0;
    transition: var(--transition);
}

.modern-floating-label .req {
    color: var(--danger);
    font-weight: 700;
}

/* Search Submit Button */
.modern-submit-btn,
.modern-search-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--brand);
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--brand-glow);
    transition: var(--transition);
    margin-top: 18px;
    text-decoration: none;
}

.modern-submit-btn:hover:not(:disabled),
.modern-search-btn:hover:not(:disabled) {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--brand-glow);
    color: #ffffff !important;
}

.modern-submit-btn:active:not(:disabled),
.modern-search-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.modern-submit-btn:disabled,
.modern-search-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    background: #94a3b8;
}

/* Search Trust Badges */
.search-trust-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.search-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.search-trust-item i {
    color: var(--brand);
    font-size: 13px;
}

/* ==========================================================================
   SEARCH RESULTS PAGE (Card-based, App-like)
   ========================================================================== */

.search-results-page {
    padding: 32px 0 60px;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.modern-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modern-back-link:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.query-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--brand-light);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--brand);
    font-weight: 500;
}

/* Result Cards List */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    transition: var(--transition);
    text-decoration: none !important;
    display: block;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand);
    opacity: 0;
    transition: var(--transition);
}

.result-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-card:hover::before {
    opacity: 1;
}

.result-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.result-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.res-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.res-badge-doc {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.res-badge-lang {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.res-badge-rev {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.res-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
}

.res-status-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.result-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.3;
}

.result-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid #edf2f7;
}

.result-meta-item {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-meta-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

.result-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.result-view-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
}

/* Empty State */
.results-empty-card {
    background: #ffffff;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 24px;
    text-align: center;
    margin: 20px 0;
}

.results-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* ==========================================================================
   PRODUCT DETAILS PAGE
   ========================================================================== */

.product-detail-header-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 28px;
}

.product-detail-title {
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.product-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.product-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-chip strong {
    color: var(--text-primary);
}

.document-view-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.doc-info-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.doc-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fef2f2;
    color: #ef4444;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-download-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--brand);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--brand-glow);
    transition: var(--transition);
}

.btn-download-action:hover {
    background: var(--brand-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==========================================================================
   MODAL STYLING (Touch-Friendly)
   ========================================================================== */

.modal-content {
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 20px 24px !important;
}

.modal-title {
    font-weight: 800;
    font-size: 18px;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 16px 24px !important;
}

/* ==========================================================================
   LEGACY ADAPTERS (For Backward Compatibility)
   ========================================================================== */
.dia-bg-gray { background: #959595; border-color: #959595; color: #ffffff; }
.dia-txt-red { color: var(--brand) !important; }
.dia-btn-red { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.dia-btn-red:hover { opacity: 0.9; color: #ffffff; }
.dia-btn-gray { background: #e2e8f0; border-color: #cbd5e1; color: #334155; }
.dia-btn-gray:hover { background: #cbd5e1; color: #1e293b; }

/* ==========================================================================
   PORTAL PACKAGING GUIDE & FOOTER (Mobile & WebView Optimized)
   ========================================================================== */

.portal-guide-section {
    padding: 56px 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.guide-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--brand-light);
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.guide-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.guide-desc {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

.guide-steps-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.guide-step-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.guide-step-card:hover {
    background: #ffffff;
    border-color: var(--brand);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.guide-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guide-step-val {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* Sample Box Card */
.sample-box-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.sample-box-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.sample-box-accent {
    height: 5px;
    width: 100%;
}

.sample-box-inner {
    padding: 22px 24px 20px;
}

.sample-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 14px;
}

.sample-box-brand {
    display: flex;
    align-items: center;
    min-height: 32px;
}

.sample-box-logo {
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
}

.sample-box-brand-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.sample-box-tags {
    display: flex;
    gap: 6px;
}

.sample-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.sample-tag-ivd {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.sample-tag-ce {
    background: #0ea5e918;
    color: #0284c7;
    border: 1px solid #7dd3fc;
}

.sample-box-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sample-box-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 9px 12px;
    position: relative;
    transition: var(--transition);
}

.sample-box-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.sample-box-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sample-box-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sample-box-lbl {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sample-box-val {
    font-size: 13.5px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sample-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #0284c7;
}

.sample-box-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sample-box-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    padding: 6px 4px 2px;
    font-weight: 500;
}

.sample-barcode-area {
    margin-top: 4px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.sample-barcode-bars {
    height: 26px;
    width: 85%;
    margin: 0 auto;
    background: repeating-linear-gradient(90deg, #1e293b, #1e293b 2px, transparent 2px, transparent 4px, #1e293b 4px, #1e293b 6px, transparent 6px, transparent 8px, #1e293b 8px, #1e293b 11px, transparent 11px, transparent 13px, #1e293b 13px, #1e293b 14px, transparent 14px, transparent 17px);
}

.sample-barcode-digits {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 9.5px;
    color: #475569;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Portal Info Section (General Docs & Contact) */
.portal-info-section {
    padding: 52px 0;
    background: var(--bg-page);
}

.portal-card-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.portal-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.portal-head-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.portal-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.portal-doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none !important;
    min-height: 48px;
    transition: var(--transition);
}

.portal-doc-item:hover {
    background: #ffffff;
    border-color: var(--brand);
    color: var(--brand);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.portal-doc-icon {
    font-size: 16px;
    color: var(--brand);
    flex-shrink: 0;
}

.portal-doc-name {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-doc-arrow {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

.portal-doc-item:hover .portal-doc-arrow {
    color: var(--brand);
    transform: translateX(2px);
}

/* Contact Area */
.portal-contact-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.portal-contact-icon {
    font-size: 16px;
    color: var(--brand);
    margin-top: 3px;
    flex-shrink: 0;
}

.portal-contact-info {
    display: flex;
    flex-direction: column;
}

.portal-contact-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.portal-contact-val {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.portal-contact-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.portal-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none !important;
    min-height: 44px;
    transition: var(--transition);
}

.portal-action-pill i {
    color: var(--brand);
    font-size: 13px;
}

.portal-action-pill:hover {
    background: #ffffff;
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* Bottom Footer (Safe-Area Aware) */
.portal-bottom-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 22px 0 max(22px, env(safe-area-inset-bottom));
}

.portal-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.portal-bottom-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.portal-brand-link {
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}

.portal-brand-link:hover {
    text-decoration: underline;
}

.portal-version-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.portal-bottom-link a {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.portal-bottom-link a:hover {
    color: var(--brand);
}

/* ==========================================================================
   RESPONSIVE & MOBILE WEBVIEW SPECIFIC BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
    .app-nav {
        height: 60px;
    }

    .app-brand-logo {
        max-height: 32px;
        max-width: 140px;
    }

    .app-brand-text {
        font-size: 17px;
    }

    .lang-pill-btn {
        padding: 6px 12px;
        min-height: 36px;
        font-size: 12.5px;
    }

    .hero-section {
        padding: 32px 0 45px;
    }

    .search-card-wrapper {
        margin-top: -24px;
        padding: 0 12px;
    }

    .modern-search-card {
        padding: 20px 18px;
        border-radius: var(--radius-lg);
    }

    .modern-search-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modern-floating-input {
        height: 52px;
        font-size: 14px;
    }

    .modern-submit-btn {
        height: 52px;
        font-size: 15px;
    }

    .product-detail-header-card {
        padding: 20px 18px;
    }

    .document-view-card {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .btn-download-action {
        width: 100%;
        height: 48px;
    }

    .sample-box-card {
        margin-bottom: 24px;
    }

    .portal-guide-section {
        padding: 36px 0;
    }

    .guide-title {
        font-size: 21px;
    }

    .portal-info-section {
        padding: 32px 0;
    }

    .portal-card-box {
        padding: 20px 18px;
    }

    .portal-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Extra Small (iPhone SE, small Androids) */
@media (max-width: 480px) {
    .search-trust-row {
        gap: 12px;
    }
    
    .search-trust-item {
        font-size: 11.5px;
    }

    .portal-contact-pills-row {
        flex-direction: column;
    }

    .portal-action-pill {
        width: 100%;
        justify-content: center;
    }
}