/* =========================================================
   ISU Cauayan City FabLab — Portal UI v3
   Modernizes authenticated, inquiry, authentication, report,
   order, queue, chat, forecasting, DSS, SMS, and settings pages.
   The public homepage keeps its dedicated home.css design.
   ========================================================= */

:root {
    --portal-green-950: #023b2b;
    --portal-green-900: #064f39;
    --portal-green-800: #087052;
    --portal-green-700: #0b8a61;
    --portal-green-600: #12a574;
    --portal-green-200: #aee7cf;
    --portal-green-100: #dcf5e9;
    --portal-green-50: #f0faf5;
    --portal-gold: #f4c34f;
    --portal-gold-soft: #fff6d8;
    --portal-ink: #123128;
    --portal-muted: #63776f;
    --portal-line: #dce8e2;
    --portal-canvas: #f3f7f5;
    --portal-card: rgba(255, 255, 255, .94);
    --portal-shadow-sm: 0 8px 24px rgba(4, 73, 52, .07);
    --portal-shadow: 0 20px 55px rgba(4, 73, 52, .11);
    --portal-radius-sm: .85rem;
    --portal-radius: 1.25rem;
    --portal-radius-lg: 1.65rem;
}

html { scroll-behavior: smooth; }

body.portal-ui-v3 {
    min-height: 100vh;
    color: var(--portal-ink);
    background:
        radial-gradient(circle at 95% 2%, rgba(18, 165, 116, .08), transparent 27rem),
        radial-gradient(circle at 5% 90%, rgba(244, 195, 79, .07), transparent 23rem),
        var(--portal-canvas);
}

body.portal-ui-v3::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    opacity: .34;
    background-image:
        linear-gradient(rgba(6, 79, 57, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 79, 57, .025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

body.portal-ui-v3 a,
body.portal-ui-v3 button,
body.portal-ui-v3 .form-control,
body.portal-ui-v3 .form-select,
body.portal-ui-v3 .card,
body.portal-ui-v3 .content-card {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease,
        box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

/* Shared page canvas */
body.portal-ui-v3 .dashboard-page,
body.portal-ui-v3 .inquiry-page,
body.portal-ui-v3 .inquiry-thread-page,
body.portal-ui-v3 .order-create-page,
body.portal-ui-v3 .order-details-page,
body.portal-ui-v3 .queue-page,
body.portal-ui-v3 .customer-queue-page,
body.portal-ui-v3 .forecast-page,
body.portal-ui-v3 .sms-page,
body.portal-ui-v3 .report-page,
body.portal-ui-v3 .chat-page {
    position: relative;
    min-height: 100vh;
    padding-top: clamp(1.75rem, 3vw, 3.25rem);
    padding-bottom: 5rem;
    background: transparent;
}

body.portal-ui-v3 .dashboard-page > .container-fluid,
body.portal-ui-v3 .dashboard-page > .container,
body.portal-ui-v3 main > .container,
body.portal-ui-v3 main > .container-fluid {
    max-width: 1600px;
}

/* Page title block */
body.portal-ui-v3 .dashboard-heading {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: center;
    margin-bottom: 1.8rem;
    padding: clamp(1.35rem, 2.6vw, 2.25rem);
    border: 1px solid rgba(8, 112, 82, .13);
    border-radius: var(--portal-radius-lg);
    background:
        linear-gradient(115deg, rgba(255,255,255,.98), rgba(240,250,245,.95)),
        var(--portal-card);
    box-shadow: var(--portal-shadow-sm);
}

body.portal-ui-v3 .dashboard-heading::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -7rem;
    right: -4rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(18,165,116,.16), rgba(18,165,116,0) 70%);
}

body.portal-ui-v3 .dashboard-heading::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -5rem;
    left: 38%;
    width: 15rem;
    height: 9rem;
    transform: rotate(-12deg);
    border-radius: 50%;
    background: rgba(244,195,79,.08);
    filter: blur(8px);
}

body.portal-ui-v3 .dashboard-heading h1,
body.portal-ui-v3 .section-title-row h1,
body.portal-ui-v3 .section-title-row h2 {
    color: var(--portal-ink);
    font-weight: 850;
    letter-spacing: -.048em;
}

body.portal-ui-v3 .dashboard-heading h1 {
    font-size: clamp(1.9rem, 3.5vw, 3.05rem);
}

body.portal-ui-v3 .dashboard-heading p {
    max-width: 850px;
    color: var(--portal-muted);
    line-height: 1.65;
}

body.portal-ui-v3 .eyebrow {
    padding: .36rem .66rem;
    border: 1px solid rgba(11,138,97,.13);
    border-radius: 999px;
    color: var(--portal-green-800) !important;
    background: rgba(220,245,233,.62);
    font-size: .68rem;
    letter-spacing: .14em;
}

/* Cards */
body.portal-ui-v3 .content-card,
body.portal-ui-v3 .metric-card,
body.portal-ui-v3 .service-card,
body.portal-ui-v3 .step-card,
body.portal-ui-v3 .customer-order-card,
body.portal-ui-v3 .queue-job-card,
body.portal-ui-v3 .customer-queue-card,
body.portal-ui-v3 .dss-card,
body.portal-ui-v3 .forecast-service-card,
body.portal-ui-v3 .forecast-readiness-card,
body.portal-ui-v3 .sms-metric-card,
body.portal-ui-v3 .sms-phone-card,
body.portal-ui-v3 .report-filter-card,
body.portal-ui-v3 .report-metric-card,
body.portal-ui-v3 .report-type-card,
body.portal-ui-v3 .empty-state-card,
body.portal-ui-v3 .inquiry-form-card,
body.portal-ui-v3 .inquiry-chat-card,
body.portal-ui-v3 .inquiry-summary,
body.portal-ui-v3 .quotation-summary-card,
body.portal-ui-v3 .quotation-workflow-card,
body.portal-ui-v3 .order-estimate-card,
body.portal-ui-v3 .order-form-section,
body.portal-ui-v3 .queue-summary-card,
body.portal-ui-v3 .card {
    border-color: rgba(6,79,57,.11) !important;
    border-radius: var(--portal-radius) !important;
    background: var(--portal-card);
    box-shadow: var(--portal-shadow-sm);
}

body.portal-ui-v3 .content-card,
body.portal-ui-v3 .metric-card,
body.portal-ui-v3 .dashboard-action-card,
body.portal-ui-v3 .customer-order-card,
body.portal-ui-v3 .queue-job-card,
body.portal-ui-v3 .dss-card,
body.portal-ui-v3 .forecast-service-card,
body.portal-ui-v3 .report-type-card,
body.portal-ui-v3 .service-admin-card {
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

body.portal-ui-v3 .content-card:hover,
body.portal-ui-v3 .customer-order-card:hover,
body.portal-ui-v3 .dashboard-action-card:hover,
body.portal-ui-v3 .service-admin-card:hover,
body.portal-ui-v3 .report-type-card:hover {
    border-color: rgba(11,138,97,.22) !important;
    box-shadow: var(--portal-shadow);
    transform: translateY(-2px);
}

/* Dashboard metric cards */
body.portal-ui-v3 .metric-card {
    min-height: 154px;
    padding: 1.45rem;
    overflow: hidden;
}

body.portal-ui-v3 .metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(var(--portal-green-600), var(--portal-green-800));
}

body.portal-ui-v3 .metric-card::after {
    width: 9rem;
    height: 9rem;
    right: -4.4rem;
    top: -4.7rem;
    background: linear-gradient(145deg, rgba(18,165,116,.12), rgba(244,195,79,.08));
}

body.portal-ui-v3 .metric-card .metric-icon,
body.portal-ui-v3 .dashboard-action-card .metric-icon {
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(11,138,97,.08);
    border-radius: .95rem;
    color: var(--portal-green-800);
    background: linear-gradient(145deg, #e7f8ef, #d7f1e5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

body.portal-ui-v3 .metric-card p {
    margin-top: 1.15rem;
    color: var(--portal-muted);
    font-size: .86rem;
    font-weight: 650;
}

body.portal-ui-v3 .metric-card strong {
    color: var(--portal-green-950);
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 850;
}

body.portal-ui-v3 .dashboard-action-card {
    min-height: 112px;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(6,79,57,.11);
    border-radius: var(--portal-radius);
    background: rgba(255,255,255,.93);
    box-shadow: var(--portal-shadow-sm);
}

body.portal-ui-v3 .dashboard-action-card h2 {
    margin-bottom: .25rem;
    color: var(--portal-ink);
    font-size: 1.02rem;
    font-weight: 800;
}

body.portal-ui-v3 .dashboard-action-card p {
    color: var(--portal-muted);
    line-height: 1.5;
}

body.portal-ui-v3 .dashboard-action-card > i:last-child {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--portal-green-800);
    background: var(--portal-green-50);
}

/* Buttons */
body.portal-ui-v3 .btn {
    min-height: 2.55rem;
    border-radius: .82rem;
    font-weight: 720;
    letter-spacing: -.01em;
}

body.portal-ui-v3 .btn-sm { min-height: 2.05rem; border-radius: .68rem; }
body.portal-ui-v3 .btn-lg { min-height: 3.15rem; border-radius: 1rem; }

body.portal-ui-v3 .btn-isu,
body.portal-ui-v3 .btn-success {
    border-color: var(--portal-green-700);
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-600), var(--portal-green-900));
    box-shadow: 0 10px 24px rgba(6,79,57,.18);
}

body.portal-ui-v3 .btn-isu:hover,
body.portal-ui-v3 .btn-success:hover {
    border-color: var(--portal-green-800);
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-700), var(--portal-green-950));
    transform: translateY(-1px);
}

body.portal-ui-v3 .btn-outline-success {
    border-color: rgba(8,112,82,.38);
    color: var(--portal-green-800);
    background: rgba(255,255,255,.7);
}

body.portal-ui-v3 .btn-outline-success:hover {
    border-color: var(--portal-green-800);
    color: #fff;
    background: var(--portal-green-800);
}

body.portal-ui-v3 .btn-warning {
    border-color: #e8b53d;
    color: #4d3907;
    background: linear-gradient(135deg, #ffda72, #f4bd3d);
}

/* Forms */
body.portal-ui-v3 .form-label {
    margin-bottom: .48rem;
    color: #2b4b40;
    font-size: .82rem;
    font-weight: 760;
}

body.portal-ui-v3 .form-control,
body.portal-ui-v3 .form-select {
    min-height: 3rem;
    padding-inline: .95rem;
    border: 1px solid #d8e5df;
    border-radius: .85rem;
    color: var(--portal-ink);
    background-color: rgba(255,255,255,.96);
    box-shadow: inset 0 1px 2px rgba(4,73,52,.025);
}

body.portal-ui-v3 textarea.form-control { padding-block: .8rem; }

body.portal-ui-v3 .form-control:hover,
body.portal-ui-v3 .form-select:hover { border-color: #bdd6ca; }

body.portal-ui-v3 .form-control:focus,
body.portal-ui-v3 .form-select:focus {
    border-color: var(--portal-green-600);
    background-color: #fff;
    box-shadow: 0 0 0 .24rem rgba(18,165,116,.12), 0 8px 24px rgba(6,79,57,.06);
}

body.portal-ui-v3 .form-text { color: #71847c; font-size: .78rem; }
body.portal-ui-v3 .form-check-input:checked { border-color: var(--portal-green-700); background-color: var(--portal-green-700); }
body.portal-ui-v3 .input-group-text { border-color: #d8e5df; color: var(--portal-green-800); background: var(--portal-green-50); }

body.portal-ui-v3 .order-form-section,
body.portal-ui-v3 fieldset.content-card {
    position: relative;
    overflow: hidden;
}

body.portal-ui-v3 .form-section-number {
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-600), var(--portal-green-900));
    box-shadow: 0 8px 20px rgba(6,79,57,.16);
}

/* Tables */
body.portal-ui-v3 .table-responsive,
body.portal-ui-v3 .table-wrap,
body.portal-ui-v3 .report-preview-table-wrap {
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 7px 22px rgba(4,73,52,.045);
}

body.portal-ui-v3 .table-responsive > .table,
body.portal-ui-v3 .table-wrap > .table,
body.portal-ui-v3 .report-preview-table-wrap > .table { margin-bottom: 0; }

body.portal-ui-v3 .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(240,250,245,.72);
    --bs-table-hover-bg: rgba(220,245,233,.58);
    color: var(--portal-ink);
}

body.portal-ui-v3 .table thead th {
    padding: .9rem 1rem;
    border-bottom: 1px solid #cfe0d8;
    color: #547068;
    background: #f3f9f6;
    font-size: .7rem;
    font-weight: 820;
    letter-spacing: .075em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.portal-ui-v3 .table tbody td {
    padding: .9rem 1rem;
    border-color: #e7efeb;
    vertical-align: middle;
}

body.portal-ui-v3 .table tbody tr:last-child td { border-bottom: 0; }
body.portal-ui-v3 .table tbody tr:hover { background: rgba(240,250,245,.85); }

/* Badges and status */
body.portal-ui-v3 .badge,
body.portal-ui-v3 .status-pill,
body.portal-ui-v3 .report-filter-chip {
    border-radius: 999px !important;
    font-weight: 760;
    letter-spacing: .01em;
}

body.portal-ui-v3 .badge { padding: .46em .72em; }
body.portal-ui-v3 .text-bg-success { background-color: #0b8a61 !important; }
body.portal-ui-v3 .text-bg-warning { color: #594108 !important; background-color: #ffe7a6 !important; }
body.portal-ui-v3 .text-bg-info { color: #075066 !important; background-color: #caedf6 !important; }
body.portal-ui-v3 .text-bg-secondary { background-color: #6c7e77 !important; }
body.portal-ui-v3 .text-bg-danger { background-color: #c94d55 !important; }

/* Alerts */
body.portal-ui-v3 .alert {
    border-width: 1px;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(4,73,52,.07);
}
body.portal-ui-v3 .alert-success { border-color: #bce3d0; color: #07533c; background: #edf9f3; }
body.portal-ui-v3 .alert-warning { border-color: #f3d98c; color: #684d0b; background: #fff9e8; }
body.portal-ui-v3 .alert-danger { border-color: #edc7ca; color: #7b252c; background: #fff3f4; }
body.portal-ui-v3 .alert-info { border-color: #bfdae5; color: #174d60; background: #eff8fb; }

/* Toolbar, filters, tabs */
body.portal-ui-v3 .toolbar,
body.portal-ui-v3 .filter-line,
body.portal-ui-v3 .inquiry-filter-bar,
body.portal-ui-v3 .order-filter-bar,
body.portal-ui-v3 .report-active-filters {
    gap: .65rem;
}

body.portal-ui-v3 .inquiry-filter,
body.portal-ui-v3 .order-filter,
body.portal-ui-v3 .report-filter-chip {
    border-color: #d6e5de;
    color: #456258;
    background: rgba(255,255,255,.88);
    box-shadow: 0 5px 15px rgba(4,73,52,.04);
}

body.portal-ui-v3 .inquiry-filter.active,
body.portal-ui-v3 .order-filter.active,
body.portal-ui-v3 .report-filter-chip.active {
    border-color: var(--portal-green-800);
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-700), var(--portal-green-900));
}

/* Order cards and lists */
body.portal-ui-v3 .customer-order-card,
body.portal-ui-v3 .service-admin-card {
    overflow: hidden;
}

body.portal-ui-v3 .order-card-top,
body.portal-ui-v3 .dss-card-top,
body.portal-ui-v3 .forecast-card-heading,
body.portal-ui-v3 .section-title-row {
    align-items: center;
}

body.portal-ui-v3 .dashboard-order-list > a,
body.portal-ui-v3 .notification-item,
body.portal-ui-v3 .order-file-item,
body.portal-ui-v3 .workflow-file-item {
    border: 1px solid rgba(6,79,57,.08);
    background: linear-gradient(135deg, #f6fcf9, #edf8f3);
}

body.portal-ui-v3 .dashboard-order-list > a:hover,
body.portal-ui-v3 .notification-item:hover,
body.portal-ui-v3 .order-file-item:hover,
body.portal-ui-v3 .workflow-file-item:hover {
    border-color: rgba(11,138,97,.2);
    background: #e7f7ef;
    transform: translateX(2px);
}

body.portal-ui-v3 .order-timeline::before { background: linear-gradient(var(--portal-green-200), #dfe9e4); }
body.portal-ui-v3 .timeline-step.done .timeline-marker,
body.portal-ui-v3 .timeline-step.active .timeline-marker {
    border-color: var(--portal-green-700);
    background: var(--portal-green-700);
    box-shadow: 0 0 0 .32rem rgba(18,165,116,.12);
}

/* Queue */
body.portal-ui-v3 .queue-job-card,
body.portal-ui-v3 .customer-queue-card {
    border-left: 4px solid var(--portal-green-600) !important;
}
body.portal-ui-v3 .queue-job-card.processing,
body.portal-ui-v3 .customer-queue-card.processing { border-left-color: #0b8a5a !important; }
body.portal-ui-v3 .queue-job-card.paused,
body.portal-ui-v3 .customer-queue-card.paused { border-left-color: #4b7ca5 !important; }
body.portal-ui-v3 .queue-time-grid > div {
    border: 1px solid #e0ebe5;
    background: linear-gradient(145deg, #fbfdfc, #f2f8f5);
}

/* Chat and inquiry threads */
body.portal-ui-v3 .chat-shell {
    border-color: rgba(6,79,57,.12);
    border-radius: var(--portal-radius-lg);
    box-shadow: var(--portal-shadow);
}
body.portal-ui-v3 .chat-header {
    background: linear-gradient(135deg, #edf9f3, #e4f5ed);
}
body.portal-ui-v3 .chat-messages {
    background:
        radial-gradient(circle at 12% 8%, rgba(18,165,116,.07), transparent 24rem),
        linear-gradient(180deg, #fbfdfc, #f4faf7);
}
body.portal-ui-v3 .chat-bubble {
    border-color: rgba(6,79,57,.1);
    box-shadow: 0 9px 25px rgba(4,73,52,.07);
}
body.portal-ui-v3 .chat-bubble.mine,
body.portal-ui-v3 .message-row-visitor .message-bubble {
    background: linear-gradient(135deg, var(--portal-green-700), var(--portal-green-950));
}
body.portal-ui-v3 .chat-composer,
body.portal-ui-v3 .inquiry-reply-form { background: rgba(255,255,255,.96); }

/* Forecast, DSS, reports, SMS */
body.portal-ui-v3 .forecast-readiness-card.ready { border-left: 4px solid #0b8a5a !important; }
body.portal-ui-v3 .forecast-readiness-card.waiting { border-left: 4px solid #d4a625 !important; }
body.portal-ui-v3 .dss-card { border-top: 4px solid var(--portal-green-600) !important; }
body.portal-ui-v3 .dss-card.priority-high,
body.portal-ui-v3 .dss-card.priority-critical { border-top-color: #c94d55 !important; }
body.portal-ui-v3 .report-type-card-active {
    border-color: var(--portal-green-600) !important;
    background: linear-gradient(145deg, #f6fffa, #e7f8ef) !important;
    box-shadow: 0 12px 30px rgba(6,79,57,.11) !important;
}
body.portal-ui-v3 .report-preview-summary,
body.portal-ui-v3 .report-active-filters { border-radius: 1rem; }

/* Settings and profile pages */
body.portal-ui-v3 .nav-pills .nav-link {
    border-radius: .8rem;
    color: #526b62;
    font-weight: 720;
}
body.portal-ui-v3 .nav-pills .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-700), var(--portal-green-900));
    box-shadow: 0 8px 20px rgba(6,79,57,.15);
}

/* Authentication */
body.portal-ui-v3 .auth-shell {
    min-height: 100vh;
    background: #fff;
}

body.portal-ui-v3 .auth-visual {
    position: relative;
    isolation: isolate;
    background-image:
        linear-gradient(135deg, rgba(2,59,43,.94), rgba(6,79,57,.74)),
        url('../images/home/fablab-official-banner-v2.png');
    background-size: cover;
    background-position: center;
}

body.portal-ui-v3 .auth-visual::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(244,195,79,.22), transparent 26rem),
        linear-gradient(180deg, transparent 45%, rgba(2,59,43,.54));
}

body.portal-ui-v3 .auth-visual::after { opacity: .07; }
body.portal-ui-v3 .auth-visual-content { padding: 1.5rem; border-left: 3px solid var(--portal-gold); }
body.portal-ui-v3 .auth-visual h1 { text-shadow: 0 10px 30px rgba(0,0,0,.22); }

body.portal-ui-v3 .auth-panel {
    background:
        radial-gradient(circle at 90% 10%, rgba(18,165,116,.08), transparent 20rem),
        linear-gradient(180deg, #fbfdfc, #f2f8f5);
}

body.portal-ui-v3 .auth-card {
    width: min(100%, 570px);
    padding: clamp(1.4rem, 4vw, 2.65rem);
    border: 1px solid rgba(6,79,57,.1);
    border-radius: 1.6rem;
    background: rgba(255,255,255,.95);
    box-shadow: 0 28px 80px rgba(4,73,52,.13);
}

body.portal-ui-v3 .auth-card h2 { font-size: clamp(1.8rem, 3vw, 2.45rem); }
body.portal-ui-v3 .brand-mark.brand-mark-logo { width: 3.5rem; height: 3.5rem; }


/* Compact registration form */
body.portal-ui-v3 .register-auth-panel {
    padding: clamp(1rem, 2.6vw, 2.5rem);
}
body.portal-ui-v3 .register-auth-card {
    width: min(100%, 500px);
    padding: clamp(1.15rem, 2.5vw, 1.75rem);
    border-radius: 1.25rem;
}
body.portal-ui-v3 .register-auth-card .register-brand { margin-bottom: .8rem !important; }
body.portal-ui-v3 .register-auth-card .brand-mark.brand-mark-logo { width: 3rem; height: 3rem; }
body.portal-ui-v3 .register-auth-card .registration-steps > div {
    padding: .5rem .65rem;
    font-size: .82rem;
    line-height: 1.2;
}
body.portal-ui-v3 .register-auth-card .register-title {
    font-size: clamp(1.55rem, 2.5vw, 1.9rem);
    line-height: 1.15;
}
body.portal-ui-v3 .register-auth-card form > .mb-3 { margin-bottom: .75rem !important; }
body.portal-ui-v3 .register-auth-card .form-label { margin-bottom: .35rem; font-size: .85rem; }
body.portal-ui-v3 .register-auth-card .register-control {
    min-height: 2.65rem;
    padding: .55rem .8rem;
    font-size: .95rem;
    border-radius: .72rem;
}
body.portal-ui-v3 .register-auth-card .password-toggle {
    width: 2.2rem;
    height: 2.2rem;
    right: .35rem;
}
body.portal-ui-v3 .register-auth-card .register-password-help {
    font-size: .78rem;
    line-height: 1.3;
}
body.portal-ui-v3 .register-auth-card .verification-option {
    min-height: 3rem;
    padding: .65rem .75rem;
    font-size: .88rem;
    cursor: pointer;
    background: #fff;
}
body.portal-ui-v3 .register-auth-card .verification-option:has(input:checked) {
    border-color: var(--portal-green-600) !important;
    background: #f2fbf6;
}
body.portal-ui-v3 .register-auth-card .register-submit {
    min-height: 2.75rem;
    font-size: .95rem;
}
body.portal-ui-v3 .register-auth-card .register-footer {
    font-size: .88rem;
    line-height: 1.45;
}


/* Compact account verification page */
body.portal-ui-v3 .verify-auth-panel {
    padding: clamp(.9rem, 2.4vw, 2rem);
}
body.portal-ui-v3 .verify-auth-card {
    width: min(100%, 460px);
    padding: clamp(1.05rem, 2.2vw, 1.55rem);
    border-radius: 1.2rem;
}
body.portal-ui-v3 .verify-auth-card .verify-brand { margin-bottom: .7rem !important; }
body.portal-ui-v3 .verify-auth-card .brand-mark.brand-mark-logo { width: 2.8rem; height: 2.8rem; }
body.portal-ui-v3 .verify-auth-card .verification-steps > div {
    padding: .45rem .55rem !important;
    font-size: .78rem;
    line-height: 1.2;
}
body.portal-ui-v3 .verify-auth-card .verify-title {
    font-size: clamp(1.4rem, 2.3vw, 1.7rem);
    line-height: 1.15;
}
body.portal-ui-v3 .verify-auth-card .verify-method-summary {
    font-size: .88rem;
    line-height: 1.3;
}
body.portal-ui-v3 .verify-auth-card .verify-method-summary .small { font-size: .76rem; }
body.portal-ui-v3 .verify-auth-card .form-label {
    margin-bottom: .3rem;
    font-size: .84rem;
}
body.portal-ui-v3 .verify-auth-card .verify-otp-input,
body.portal-ui-v3 .verify-auth-card .verify-email-input {
    min-height: 2.65rem;
    padding: .5rem .7rem;
    border-radius: .72rem;
    font-size: .95rem;
}
body.portal-ui-v3 .verify-auth-card .verify-otp-input {
    max-width: 280px;
    margin-inline: auto;
    font-size: 1.08rem;
}
body.portal-ui-v3 .verify-auth-card .verify-submit {
    min-height: 2.65rem;
    font-size: .92rem;
}
body.portal-ui-v3 .verify-auth-card .verify-actions .btn-link {
    padding: .3rem .45rem;
    font-size: .8rem;
}
body.portal-ui-v3 .verify-auth-card .verify-footer { font-size: .82rem; }

/* Top navigation for staff and non-sidebar protected pages */
body.portal-ui-v3 .app-navbar {
    position: sticky;
    z-index: 1025;
    top: 0;
    padding: .72rem 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(110deg, var(--portal-green-900), var(--portal-green-950));
    box-shadow: 0 10px 32px rgba(2,59,43,.18);
    backdrop-filter: blur(12px);
}
body.portal-ui-v3 .app-navbar .navbar-brand { letter-spacing: -.02em; }
body.portal-ui-v3 .app-navbar .btn-light { color: var(--portal-green-900); }

/* Sidebars refinements */
body.portal-ui-v3.admin-sidebar-layout .admin-sidebar,
body.portal-ui-v3.customer-sidebar-layout .customer-sidebar {
    border-right: 1px solid rgba(255,255,255,.09);
    box-shadow: 20px 0 60px rgba(2,59,43,.16);
}

body.portal-ui-v3 .admin-brand-mark,
body.portal-ui-v3 .customer-brand-mark {
    overflow: hidden;
    padding: 0;
    border-radius: 50% !important;
    background: #fff !important;
}

body.portal-ui-v3 .admin-nav-tab,
body.portal-ui-v3 .customer-nav-tab { border-radius: .82rem; }

body.portal-ui-v3 .admin-nav-tab.active,
body.portal-ui-v3 .customer-nav-tab.active {
    background: linear-gradient(135deg, rgba(24,168,117,.74), rgba(8,112,82,.43));
    box-shadow: inset 3px 0 0 var(--portal-gold), 0 10px 24px rgba(0,0,0,.12);
}

/* Scroll-to-top control */
.portal-scroll-top {
    position: fixed;
    z-index: 1030;
    right: 1.15rem;
    bottom: 1.15rem;
    width: 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: .9rem;
    color: #fff;
    background: linear-gradient(135deg, var(--portal-green-700), var(--portal-green-950));
    box-shadow: 0 14px 32px rgba(2,59,43,.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(.8rem);
}
.portal-scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.portal-scroll-top:hover { color: #fff; transform: translateY(-2px); }

/* Entry motion */
@keyframes portalFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
body.portal-ui-v3 main > .container > *,
body.portal-ui-v3 main > .container-fluid > * {
    animation: portalFadeUp .42s ease both;
}
body.portal-ui-v3 main > .container > *:nth-child(2),
body.portal-ui-v3 main > .container-fluid > *:nth-child(2) { animation-delay: .04s; }
body.portal-ui-v3 main > .container > *:nth-child(3),
body.portal-ui-v3 main > .container-fluid > *:nth-child(3) { animation-delay: .08s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body.portal-ui-v3 *,
    body.portal-ui-v3 *::before,
    body.portal-ui-v3 *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 991.98px) {
    body.portal-ui-v3 .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.35rem;
    }
    body.portal-ui-v3 .dashboard-heading > .d-flex,
    body.portal-ui-v3 .dashboard-heading .toolbar { width: 100%; }
    body.portal-ui-v3 .dashboard-heading .btn { flex: 1 1 auto; }
    body.portal-ui-v3 .content-card { padding: 1.35rem; }
    .portal-scroll-top { bottom: 1rem; right: .8rem; }
}

@media (max-width: 575.98px) {
    body.portal-ui-v3 .dashboard-page,
    body.portal-ui-v3 .inquiry-page,
    body.portal-ui-v3 .order-create-page,
    body.portal-ui-v3 .order-details-page,
    body.portal-ui-v3 .queue-page,
    body.portal-ui-v3 .forecast-page,
    body.portal-ui-v3 .sms-page,
    body.portal-ui-v3 .report-page,
    body.portal-ui-v3 .chat-page { padding-top: 1rem; padding-bottom: 3.5rem; }

    body.portal-ui-v3 .dashboard-heading { border-radius: 1.15rem; }
    body.portal-ui-v3 .dashboard-heading h1 { font-size: 1.75rem; }
    body.portal-ui-v3 .metric-card { min-height: 138px; padding: 1.15rem; }
    body.portal-ui-v3 .content-card,
    body.portal-ui-v3 .auth-card { padding: 1.15rem; border-radius: 1.1rem !important; }
    body.portal-ui-v3 .register-auth-panel { min-height: 100vh; padding: .65rem; align-items: start; }
    body.portal-ui-v3 .register-auth-card { width: 100%; padding: .9rem; border-radius: .95rem !important; box-shadow: 0 14px 36px rgba(4,73,52,.09); }
    body.portal-ui-v3 .register-auth-card .register-brand { margin-bottom: .65rem !important; }
    body.portal-ui-v3 .register-auth-card .brand-mark.brand-mark-logo { width: 2.55rem; height: 2.55rem; }
    body.portal-ui-v3 .register-auth-card .brand-link strong { font-size: .95rem; }
    body.portal-ui-v3 .register-auth-card .brand-link small { font-size: .75rem; }
    body.portal-ui-v3 .register-auth-card .registration-steps { margin-bottom: .75rem !important; gap: .4rem !important; }
    body.portal-ui-v3 .register-auth-card .registration-steps > div { padding: .42rem .35rem; font-size: .72rem; }
    body.portal-ui-v3 .register-auth-card .register-title { margin-bottom: .75rem !important; font-size: 1.35rem; }
    body.portal-ui-v3 .register-auth-card form > .mb-3 { margin-bottom: .62rem !important; }
    body.portal-ui-v3 .register-auth-card .register-control { min-height: 2.5rem; padding: .5rem .7rem; font-size: .9rem; }
    body.portal-ui-v3 .register-auth-card .register-password-row { --bs-gutter-y: .6rem; }
    body.portal-ui-v3 .register-auth-card .register-password-help { margin-bottom: .7rem !important; font-size: .72rem; }
    body.portal-ui-v3 .register-auth-card .verification-methods { margin-bottom: .75rem !important; }
    body.portal-ui-v3 .register-auth-card .verification-options { --bs-gutter-x: .45rem; }
    body.portal-ui-v3 .register-auth-card .verification-option { min-height: 2.7rem; padding: .5rem .55rem; font-size: .78rem; }
    body.portal-ui-v3 .register-auth-card .register-submit { min-height: 2.55rem; font-size: .9rem; }
    body.portal-ui-v3 .register-auth-card .register-footer { margin-top: .75rem !important; font-size: .78rem; }

    body.portal-ui-v3 .verify-auth-panel { min-height: 100vh; padding: .6rem; align-items: start; }
    body.portal-ui-v3 .verify-auth-card { width: 100%; padding: .85rem; border-radius: .95rem !important; box-shadow: 0 14px 36px rgba(4,73,52,.09); }
    body.portal-ui-v3 .verify-auth-card .verify-brand { margin-bottom: .55rem !important; }
    body.portal-ui-v3 .verify-auth-card .brand-mark.brand-mark-logo { width: 2.4rem; height: 2.4rem; }
    body.portal-ui-v3 .verify-auth-card .brand-link strong { font-size: .92rem; }
    body.portal-ui-v3 .verify-auth-card .brand-link small { font-size: .72rem; }
    body.portal-ui-v3 .verify-auth-card .verification-steps { gap: .35rem !important; margin-bottom: .65rem !important; }
    body.portal-ui-v3 .verify-auth-card .verification-steps > div { padding: .38rem .3rem !important; font-size: .68rem; }
    body.portal-ui-v3 .verify-auth-card .verify-title { margin-bottom: .65rem !important; font-size: 1.22rem; }
    body.portal-ui-v3 .verify-auth-card .verify-method-summary { padding: .55rem !important; margin-bottom: .65rem !important; font-size: .8rem; }
    body.portal-ui-v3 .verify-auth-card .verify-method-summary .small { font-size: .68rem; }
    body.portal-ui-v3 .verify-auth-card .verify-otp-input,
    body.portal-ui-v3 .verify-auth-card .verify-email-input { min-height: 2.45rem; padding: .45rem .6rem; font-size: .88rem; }
    body.portal-ui-v3 .verify-auth-card .verify-otp-input { max-width: 240px; font-size: 1rem; }
    body.portal-ui-v3 .verify-auth-card .verify-submit { min-height: 2.5rem; font-size: .88rem; }
    body.portal-ui-v3 .verify-auth-card .verify-actions { margin-top: .4rem !important; }
    body.portal-ui-v3 .verify-auth-card .verify-actions .btn-link { padding: .2rem .35rem; font-size: .74rem; }
    body.portal-ui-v3 .verify-auth-card .verify-footer { margin-top: .65rem !important; font-size: .76rem; }

    body.portal-ui-v3 .table thead th,
    body.portal-ui-v3 .table tbody td { padding: .75rem; }
    body.portal-ui-v3 .chat-header,
    body.portal-ui-v3 .chat-composer { padding: 1rem; }
    body.portal-ui-v3 .chat-messages { padding: 1rem; }
    body.portal-ui-v3 .chat-bubble { width: 90%; }
}
