/* ==========================================================================
   HENLEY HII TALENT - ADMINISTRATIVE PORTAL DESIGN SYSTEM
   ========================================================================== */

/* 1. BRANDING TOKENS & VARIABLES */
:root {
    --bg-dark: #080c14;
    --bg-dark-accent: #0f172a;
    --color-teal: #0ea5e9;
    --color-teal-glow: rgba(14, 165, 233, 0.35);
    --color-teal-dim: rgba(14, 165, 233, 0.12);
    --color-gold: #fbbf24;
    --color-gold-glow: rgba(251, 191, 36, 0.3);
    --color-text-primary: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-red: #ef4444;
    --color-green: #22c55e;
    
    /* Glassmorphism Configuration */
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-bg-hover: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-hover: rgba(14, 165, 233, 0.3);
    --glass-blur: blur(16px);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', var(--font-sans);
    
    /* Global Transitions */
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);

    color-scheme: dark;
}

/* 2. BASE RESET & SCROLLBAR */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--color-text-primary);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f1d;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* 3. GLOWING BACKGROUND ORBS */
.glow-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0c1222 0%, var(--bg-dark) 100%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    mix-blend-mode: screen;
    pointer-events: none;
}

.orb-1 {
    top: -15%;
    left: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--color-teal) 0%, transparent 70%);
    animation: orb-float 25s infinite alternate ease-in-out;
}

.orb-2 {
    bottom: -15%;
    right: -15%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, var(--color-gold) 0%, transparent 70%);
    animation: orb-float-reverse 30s infinite alternate ease-in-out;
    opacity: 0.12;
}

.orb-3 {
    top: 35%;
    left: 35%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation: orb-float-slow 35s infinite alternate ease-in-out;
    opacity: 0.08;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5vw, 5vh) scale(1.08); }
}
@keyframes orb-float-reverse {
    0% { transform: translate(0, 0) scale(1.08); }
    100% { transform: translate(-5vw, -5vh) scale(1); }
}
@keyframes orb-float-slow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-3vw, 3vh) rotate(90deg); }
}

/* 4. GLASS PANEL COMPONENT */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* 5. DYNAMIC PRESET BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-teal), #0284c7);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--color-teal);
    color: var(--color-teal);
}

.btn-outline:hover {
    background: var(--color-teal-dim);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.btn-mini {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: 20px;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-icon-only {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
    padding: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-icon-only:hover:not(:disabled) {
    color: var(--color-text-primary);
}

.btn-icon-only:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 6. AUTH LOGIN SCREEN STYLE */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    text-align: center;
}

.login-header {
    margin-bottom: 2.2rem;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    align-items: center;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, white, var(--color-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtext {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 0.25em;
    margin-top: 0.15rem;
}

.login-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    margin-bottom: 0.4rem;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* 7. FORM SYSTEM STYLES */
.input-group {
    margin-bottom: 1.35rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.input-group label i {
    margin-right: 0.25rem;
    color: var(--color-teal);
}

.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 10px var(--color-teal-dim);
    background: rgba(15, 23, 42, 0.95);
}

.input-group input::placeholder {
    color: var(--color-text-muted);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 2.75rem;
}

.password-wrapper .btn-icon-only {
    position: absolute;
    right: 0.8rem;
    color: var(--color-text-muted);
}

.input-helper {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

.required {
    color: var(--color-red);
    margin-left: 2px;
}

/* 8. ALERTS BOX */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    text-align: left;
}

.error-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.error-alert i {
    color: var(--color-red);
    font-size: 1rem;
    margin-top: 2px;
}

.alert-text {
    flex-grow: 1;
}

.info-alert {
    background: rgba(251, 191, 36, 0.08);
    border: 1.5px solid rgba(251, 191, 36, 0.2);
    color: #fef08a;
}

.info-alert i {
    color: var(--color-gold);
    font-size: 1rem;
    margin-top: 2px;
}

/* Google Sign-in SSO container styling */
#google-signin-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 2rem 0;
    width: 100%;
}

#google-signin-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    transition: var(--transition-smooth);
}

#google-signin-btn > div {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sso-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sso-divider::before,
.sso-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.sso-divider span {
    padding: 0 0.75rem;
}

.hidden {
    display: none !important;
}

.login-footer {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.login-footer p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.login-footer p i {
    color: var(--color-teal);
    margin-right: 3px;
}

/* 9. PORTAL CONTAINER LAYOUT */
.portal-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.75rem;
    margin-bottom: 2rem;
    border-radius: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.header-brand .logo {
    margin-bottom: 0;
}

.header-brand .logo-text {
    font-size: 1.3rem;
}

.header-brand .logo-subtext {
    font-size: 0.7rem;
}

.console-tag {
    background: var(--color-teal-dim);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: var(--color-teal);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.user-control {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.user-badge {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.user-badge i {
    color: var(--color-gold);
}

/* 10. GENERATOR BOARD */
.generator-panel {
    padding: 2.5rem;
    border-radius: 20px;
}

.panel-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.panel-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-primary);
}

.text-gold {
    color: var(--color-gold) !important;
}

.panel-header p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

/* Tab Selectors */
.document-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2.2rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.doc-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-smooth);
}

.doc-tab-btn i {
    font-size: 1.3rem;
}

.doc-tab-btn .tab-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.doc-tab-btn:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.doc-tab-btn.active {
    background: var(--bg-dark-accent);
    border-color: rgba(14, 165, 233, 0.25);
    color: var(--color-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 2.2rem;
}

.form-section h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--color-gold);
}

.section-flex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-flex-header h3 {
    margin-bottom: 0;
}

/* Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3-col {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.25rem;
}

/* Line Items Table System */
.items-table-header {
    display: grid;
    grid-template-columns: 1fr 90px 140px 50px;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.02em;
}

.items-container {
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 90px 140px 50px;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.item-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.item-row input {
    width: 100%;
    background: rgba(8, 12, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--color-text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.item-row input:focus {
    border-color: var(--color-teal);
    background: rgba(8, 12, 20, 0.95);
}

.item-row .col-qty input {
    text-align: center;
}

.item-row .col-price input {
    text-align: right;
}

.delete-row-btn {
    color: var(--color-text-muted);
}

.delete-row-btn:hover:not(:disabled) {
    color: var(--color-red);
}

.subtotal-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 1.25rem 1rem 0;
    font-size: 0.95rem;
}

.subtotal-bar span {
    color: var(--color-text-secondary);
}

.subtotal-bar strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-gold);
    font-weight: 700;
}

.action-footer {
    margin-top: 1rem;
}

/* 11. INTERACTIVE MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.modal-card {
    width: 100%;
    max-width: 500px;
    padding: 3rem 2.5rem;
    text-align: center;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.modal-state {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Spinner Animation */
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glowing-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top: 3px solid var(--color-teal);
    border-right: 3px solid var(--color-teal);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    box-shadow: 0 0 20px var(--color-teal-dim);
}

.spinner-icon {
    position: absolute;
    font-size: 1.8rem;
    color: var(--color-gold);
    animation: pulse 1.8s infinite ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; color: var(--color-teal); }
}

.modal-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Status Loading Steps */
.status-steps {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-align: left;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.35;
    transition: var(--transition-smooth);
}

.status-step .step-bullet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
}

.status-step .step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.status-step.active {
    opacity: 1;
}

.status-step.active .step-bullet {
    background: var(--color-teal);
    box-shadow: 0 0 10px var(--color-teal-glow);
}

.status-step.active .step-label {
    color: var(--color-text-primary);
    font-weight: 600;
}

.status-step.completed .step-bullet {
    background: var(--color-green);
    content: "\f00c";
}

/* Success Card Elements */
.success-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.15);
}

.success-check-icon {
    font-size: 2.2rem;
    color: var(--color-green);
}

.animate-pop {
    animation: pop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.doc-number-info {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem !important;
    display: inline-block;
    margin-bottom: 1.5rem !important;
}

.doc-number-info strong {
    font-family: monospace;
    color: var(--color-teal);
    margin-left: 4px;
}

.email-delivery-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.18);
    color: #bae6fd;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 2rem;
    text-align: left;
    line-height: 1.4;
}

.email-delivery-banner i {
    color: var(--color-teal);
    font-size: 1rem;
    flex-shrink: 0;
}

.success-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.success-actions-grid .btn {
    border-radius: 12px;
    padding: 0.85rem;
    font-size: 0.925rem;
}

.text-red {
    color: var(--color-red) !important;
}

.text-white {
    color: white !important;
}

.modal-footer-close {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

/* Error Card Elements */
.error-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}

.error-cross-icon {
    font-size: 2.2rem;
    color: var(--color-red);
}

.text-red {
    color: var(--color-red) !important;
}

/* 12. RESPONSIVENESS */
@media (max-width: 850px) {
    .grid-2-col, .grid-3-col {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 650px) {
    body {
        padding: 0.5rem;
    }
    
    .portal-wrapper {
        padding: 0.5rem;
    }
    
    .portal-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1rem;
        text-align: center;
    }
    
    .header-brand {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-control {
        flex-direction: column;
        gap: 0.6rem;
        width: 100%;
    }
    
    .user-badge {
        justify-content: center;
    }
    
    .generator-panel {
        padding: 1.25rem 1rem;
    }
    
    .document-type-selector {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .items-table-header {
        display: none; /* Hide header on mobile, stack items instead */
    }
    
    .item-row {
        grid-template-columns: 1fr;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 1rem;
        background: rgba(15, 23, 42, 0.4);
        margin-bottom: 0.5rem;
    }
    
    .item-row .col-qty, .item-row .col-price {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .item-row .col-qty::before {
        content: "Qty:";
        font-size: 0.8rem;
        color: var(--color-text-secondary);
        width: 60px;
    }
    
    .item-row .col-price::before {
        content: "Price (RM):";
        font-size: 0.8rem;
        color: var(--color-text-secondary);
        width: 80px;
    }
    
    .item-row .col-action {
        text-align: right;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 0.5rem;
    }
}
