.portal-body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background-color: #0D1126;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.portal-body[data-theme="light"] {
    background-color: #f3f4f6;
    color: #020617;
}

.portal-body {
    --portal-surface: #1A224C;
    --portal-surface-soft: #0D1126;
    --portal-border-subtle: rgba(38, 51, 115, 0.5);
    --portal-border-strong: rgba(38, 51, 115, 0.85);
    --portal-accent: #31439B;
    --portal-accent-soft: rgba(49, 67, 155, 0.16);
    --portal-accent-strong: #31439B;
    --portal-muted: #94a3b8;
    --portal-input-bg: #0D1126;
    --portal-input-border: rgba(38, 51, 115, 0.7);
    --portal-input-border-focus: #3b82f6;
    --portal-danger: #f97373;
}

.portal-body[data-theme="light"] {
    --portal-surface: #ffffff;
    --portal-surface-soft: #f9fafb;
    --portal-border-subtle: rgba(209, 213, 219, 0.8);
    --portal-border-strong: rgba(148, 163, 184, 0.85);
    --portal-accent: #2563eb;
    --portal-accent-soft: rgba(37, 99, 235, 0.06);
    --portal-accent-strong: #1d4ed8;
    --portal-muted: #6b7280;
    --portal-input-bg: #ffffff;
    --portal-input-border: rgba(209, 213, 219, 0.9);
    --portal-input-border-focus: #2563eb;
    --portal-danger: #b91c1c;
}

.portal-header {
    padding: 1.5rem 1.25rem 0.75rem;
}

.portal-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-logo {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--portal-accent);
}

.portal-main {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1.5rem 1.25rem 2rem;
}

.portal-login-wrapper {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 0;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--portal-border-subtle);
    background-color: var(--portal-surface);
}

.tv-body {
    background-color: #f3f4f6;
    color: #020617;
    overflow: hidden;
}

.tv-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.75rem;
    box-sizing: border-box;
}

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

.tv-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tv-logo img {
    height: 56px;
    width: auto;
    display: block;
}

.tv-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #4b5563;
}

.tv-clock {
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background-color: #e5edff;
}

.tv-sound-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background-color: #ffffff;
    color: #111827;
    font-size: 0.78rem;
    cursor: pointer;
}

.tv-sound-button i {
    font-size: 0.85rem;
}

.tv-sound-button span {
    white-space: nowrap;
}

.tv-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 0;
    overflow: hidden;
}

.tv-main--center {
    justify-content: center;
    align-items: center;
}

.tv-auth-card {
    max-width: 420px;
    width: 100%;
    padding: 1.75rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.tv-auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.tv-auth-card p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.tv-auth-error {
    margin-bottom: 0.9rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(248, 113, 113, 0.85);
    background: #fef2f2;
    font-size: 0.85rem;
    color: #b91c1c;
}

.tv-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tv-auth-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
}

.tv-auth-form input[type="password"] {
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(209, 213, 219, 0.9);
    font-size: 0.93rem;
    box-sizing: border-box;
}

.tv-auth-form input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.tv-auth-form button {
    margin-top: 0.4rem;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.tv-auth-form button:active {
    transform: translateY(1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.tv-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    color: #6b7280;
}

.tv-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5edff;
    color: #1d4ed8;
    font-size: 1.4rem;
}

.tv-empty-state h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
}

.tv-empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.tv-cards-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: none;
    margin: 0;
    align-content: center;
    justify-content: center;
}

.tv-cards-grid--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tv-card {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.2);
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.tv-cards-grid--6 .tv-card {
    padding: 0.75rem 0.85rem 0.9rem;
}

.tv-card--highlighted {
    background-color: #fefce8;
}

.tv-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.tv-card-protocol span {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.1rem;
}

.tv-card-protocol strong {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.tv-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tv-card-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.tv-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5563;
    font-weight: 600;
}

.tv-card-value {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
}

.tv-card-marquee {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    max-width: 100%;
}

.tv-card-marquee-inner {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.tv-card-status .portal-status-badge {
    font-size: 0.78rem;
}

@media (max-width: 1024px) {
    .tv-shell {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .tv-cards-grid--2,
    .tv-cards-grid--multi {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .tv-shell {
        padding: 1rem 1rem 1.25rem;
    }

    .tv-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tv-main--center {
        align-items: stretch;
    }

    .tv-auth-card {
        max-width: 100%;
    }
}

.portal-login-hero {
    position: relative;
    padding: 2rem 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #e5e7eb;
}

.portal-body[data-theme="light"] .portal-login-hero {
    color: #0f172a;
}

.portal-login-hero-header h1 {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
}

.portal-login-hero-header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--portal-muted);
}

.portal-login-highlight {
    margin-top: 1.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background-color: #0D1126;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-body[data-theme="light"] .portal-login-highlight {
    background-color: #e5edff;
}

.portal-login-highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(49, 67, 155, 0.22);
    color: #e5e7eb;
    font-size: 0.9rem;
}

.portal-body[data-theme="light"] .portal-login-highlight-icon {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.portal-login-highlight-text {
    font-size: 0.85rem;
}

.portal-login-highlight-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.portal-login-footer {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: var(--portal-muted);
}

.portal-login-footer span {
    opacity: 0.9;
}

.portal-login-footer-badge {
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.portal-login-form-panel {
    padding: 2rem 2.25rem 2.25rem;
    background: var(--portal-surface-soft);
    border-left: 1px solid var(--portal-border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-login-form-header {
    margin-bottom: 1.75rem;
}

.portal-login-form-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
}

.portal-login-form-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--portal-muted);
}

.portal-auth-form {
    width: 100%;
}

.portal-auth-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.portal-auth-form input[type="text"],
.portal-auth-form input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid var(--portal-input-border);
    box-sizing: border-box;
    background-color: var(--portal-input-bg);
    color: inherit;
    font-size: 0.93rem;
}

.portal-body[data-theme="light"] .portal-auth-form input[type="text"],
.portal-body[data-theme="light"] .portal-auth-form input[type="password"] {
    background-color: var(--portal-input-bg);
}

.portal-auth-form input[type="text"]:focus,
.portal-auth-form input[type="password"]:focus {
    outline: none;
    border-color: var(--portal-input-border-focus);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.portal-form-group {
    margin-bottom: 1rem;
}

.portal-form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--portal-muted);
}

.portal-form-group-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.portal-form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.portal-form-actions--wide-gap {
    gap: 0.9rem;
}

.portal-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-form-grid--user-form {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
}

.portal-form-group--span-2 {
    grid-column: span 2;
}

.portal-form-group--full {
    grid-column: 1 / -1;
}

.portal-input-with-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.portal-input-with-button .portal-report-date-input {
    flex: 1;
}

.portal-report-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-report-filter-box {
    margin-top: 0.5rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--portal-border-subtle);
    background-color: var(--portal-surface-soft);
}

.portal-report-filter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.portal-report-filter-fields .portal-form-group {
    flex: 1;
    min-width: 0;
}

.portal-report-filter-fields .portal-report-date-input {
    max-width: 100%;
}

.portal-report-date-input {
    width: 100%;
    max-width: 220px;
    padding: 0.5rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid var(--portal-input-border);
    background-color: var(--portal-input-bg);
    color: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.portal-form-grid .portal-report-date-input {
    max-width: 100%;
}

.portal-report-filter-actions {
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .portal-report-filter-fields {
        flex-direction: column;
    }

    .portal-report-date-input {
        max-width: 100%;
    }

    .portal-report-filter-actions {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .portal-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.portal-button-primary {
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    border: none;
    background-color: var(--portal-accent);
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    text-decoration: none;
}

.portal-button-primary span {
    font-size: 1.0rem;
}

.portal-button-primary:active {
    transform: translateY(1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.portal-button-secondary {
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--portal-border-subtle);
    background-color: transparent;
    color: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.portal-button-danger {
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.85);
    background-color: rgba(248, 113, 113, 0.2);
    color: #fecaca;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 8px 18px rgba(248, 113, 113, 0.25);
    text-decoration: none;
}

.portal-button-danger span {
    font-size: 1.0rem;
}

.portal-button-danger:active {
    transform: translateY(1px);
    box-shadow: 0 6px 18px rgba(248, 113, 113, 0.3);
}

.portal-body[data-theme="light"] .portal-button-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    box-shadow: 0 8px 18px rgba(248, 113, 113, 0.28);
}

.portal-form-error {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--portal-danger);
}

.portal-form-error-global {
    margin-bottom: 0.9rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(248, 113, 113, 0.8);
    background: rgba(248, 113, 113, 0.1);
    font-size: 0.8rem;
}

.portal-dashboard h2 {
    margin-top: 0;
}

.portal-page-header {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-page-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}

.portal-page-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--portal-muted);
}

.portal-page-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-section-header--stack {
    align-items: flex-start;
}

.portal-section-chips--inline {
    margin-top: 0.25rem;
}

.portal-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.portal-section-header h3 {
    margin: 0;
    font-size: 1rem;
}

.portal-section-caption {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--portal-muted);
}

.portal-section-text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--portal-muted);
}

.portal-section-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.portal-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--portal-border-subtle);
    font-size: 0.78rem;
    background-color: rgba(15, 23, 42, 0.55);
}

.portal-chip i {
    font-size: 0.8rem;
}

.portal-body[data-theme="light"] .portal-chip {
    background-color: #f9fafb;
}

.portal-link-inline {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: var(--portal-accent);
    text-decoration: none;
}

.portal-link-inline i {
    font-size: 0.8rem;
}

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

.portal-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-card {
    border-radius: 0.9rem;
    border: 1px solid var(--portal-border-subtle);
    background-color: var(--portal-surface);
    padding: 1rem 1rem 1.1rem;
    display: flex;
    align-items: center;
    min-height: 92px;
}

.portal-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.portal-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--portal-accent-soft);
    color: var(--portal-accent);
    font-size: 1.25rem;
}

.portal-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}

.portal-card-meta {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--portal-muted);
}

.portal-card-number {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 700;
}

.portal-card-title {
    margin: 0.1rem 0 0;
    font-size: 0.9rem;
    color: var(--portal-muted);
}

.portal-card--soft {
    background-color: var(--portal-surface-soft);
}

.portal-card-placeholder {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--portal-muted);
}

.portal-table-wrapper {
    border-radius: 0.9rem;
    border: 1px solid var(--portal-border-subtle);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.portal-table-wrapper--elevated {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4);
}

.portal-body[data-theme="light"] .portal-table-wrapper--elevated {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .portal-table {
        min-width: 640px;
    }
}

.portal-table th,
.portal-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--portal-border-subtle);
}

.portal-table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--portal-muted);
    background: rgba(15, 23, 42, 0.7);
}

.portal-body[data-theme="light"] .portal-table th {
    background: #f3f4f6;
}

.portal-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35);
}

.portal-body[data-theme="light"] .portal-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.portal-table-pagination {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
}

.portal-table-pagination nav {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    border-radius: 999px;
    padding: 0.1rem;
    background-color: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--portal-border-subtle);
}

.portal-body[data-theme="light"] .portal-table-pagination nav {
    background-color: #f9fafb;
}

.portal-table-pagination nav span,
.portal-table-pagination nav a {
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    color: inherit;
}

.portal-table-pagination nav span[aria-current="page"] {
    background-color: var(--portal-accent-soft);
    color: #e5e7eb;
}

.portal-body[data-theme="light"] .portal-table-pagination nav span[aria-current="page"] {
    color: #111827;
}

.portal-table-pagination nav a:hover {
    background-color: rgba(148, 163, 184, 0.25);
}

.portal-body[data-theme="light"] .portal-table-pagination nav a:hover {
    background-color: #e5e7eb;
}

.portal-table-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--portal-muted);
    display: none;
}

.portal-mobile-cards {
    display: none;
}

.portal-mobile-card {
    border-radius: 0.9rem;
    border: 1px solid var(--portal-border-subtle);
    background-color: var(--portal-surface);
    padding: 0.8rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.portal-mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.portal-mobile-card-id {
    font-weight: 600;
}

.portal-mobile-card-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.portal-mobile-card-row {
    display: flex;
    gap: 0.25rem;
    font-size: 0.82rem;
}

.portal-mobile-card-label {
    font-weight: 500;
    color: var(--portal-muted);
}

.portal-mobile-card-footer {
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--portal-muted);
}

@media (max-width: 640px) {
    .portal-table-wrapper--mobile-hidden {
        display: none;
    }

    .portal-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }
}

.portal-empty-state {
    margin-top: 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px dashed var(--portal-border-subtle);
    background-color: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.portal-body[data-theme="light"] .portal-empty-state {
    background-color: #f9fafb;
}

.portal-empty-state-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--portal-accent-soft);
    color: var(--portal-accent);
    font-size: 0.95rem;
}

.portal-empty-state-title {
    margin: 0 0 0.1rem;
    font-size: 0.95rem;
}

.portal-empty-state-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--portal-muted);
}

.portal-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.portal-status-badge-open {
    background-color: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.portal-status-badge-in_progress {
    background-color: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.55);
    color: #facc15;
}

.portal-status-badge-closed {
    background-color: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.75);
    color: #e5e7eb;
}

.portal-body[data-theme="light"] .portal-status-badge-open {
    background-color: #dcfce7;
    border-color: rgba(22, 163, 74, 0.5);
    color: #166534;
}

.portal-body[data-theme="light"] .portal-status-badge-in_progress {
    background-color: #fef9c3;
    border-color: rgba(202, 138, 4, 0.55);
    color: #92400e;
}

.portal-body[data-theme="light"] .portal-status-badge-closed {
    background-color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.8);
    color: #111827;
}

.portal-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background-color: rgba(37, 99, 235, 0.12);
    color: #bfdbfe;
}

.portal-body[data-theme="light"] .portal-type-pill {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.portal-type-pill-problem {
    background-color: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
}

.portal-body[data-theme="light"] .portal-type-pill-problem {
    background-color: #fee2e2;
    color: #b91c1c;
}

.portal-type-pill-deliver {
    background-color: rgba(59, 130, 246, 0.16);
    color: #1d4ed8;
}

.portal-body[data-theme="light"] .portal-type-pill-deliver {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.portal-type-pill-request {
    background-color: rgba(234, 179, 8, 0.18);
    color: #92400e;
}

.portal-body[data-theme="light"] .portal-type-pill-request {
    background-color: #fef9c3;
    color: #92400e;
}

.portal-type-pill-pickup {
    background-color: rgba(168, 85, 247, 0.18);
    color: #6b21a8;
}

.portal-body[data-theme="light"] .portal-type-pill-pickup {
    background-color: #f3e8ff;
    color: #6b21a8;
}

@media (max-width: 900px) {
    .portal-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .portal-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.portal-shell {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: 240px;
    background-color: #0D1126;
    border-right: 1px solid rgba(38, 51, 115, 0.55);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portal-body[data-theme="light"] .portal-sidebar {
    background-color: #ffffff;
    border-right-color: var(--portal-border-subtle);
}

.portal-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-sidebar-logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.portal-body[data-theme="light"] .portal-sidebar-logo {
    color: #0f172a;
}

.portal-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.portal-sidebar-user {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.85rem;
}

.portal-sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--portal-accent-soft);
    color: var(--portal-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.portal-sidebar-backdrop {
    display: none;
}

.portal-sidebar-user-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.portal-sidebar-user-text strong {
    font-size: 0.85rem;
}

.portal-sidebar-user-text span {
    font-size: 0.75rem;
    color: var(--portal-muted);
}

.portal-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.7rem;
    color: #cbd5f5;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.portal-sidebar-item-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
}

.portal-sidebar-item:hover {
    background-color: rgba(15, 23, 42, 0.12);
    transform: translateX(2px);
}

.portal-sidebar-item.is-active {
    background-color: var(--portal-accent-soft);
    color: #e5e7eb;
    border-left: 3px solid var(--portal-accent-strong);
}

.portal-body[data-theme="light"] .portal-sidebar-item {
    color: #0f172a;
}

.portal-body[data-theme="light"] .portal-sidebar-item.is-active {
    color: #0f172a;
}

.portal-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-topbar {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background-color: #1A224C;
}

.portal-body[data-theme="light"] .portal-topbar {
    background-color: #f9fafb;
}

.portal-topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
}

.portal-topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.portal-topbar-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--portal-border-strong);
    background-color: rgba(15, 23, 42, 0.65);
    font-size: 0.8rem;
    max-width: 100%;
}

.portal-body[data-theme="light"] .portal-badge {
    background-color: #ffffff;
}

.portal-badge span {
    color: var(--portal-muted);
}

.portal-badge strong {
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-topbar-user {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.45);
    font-size: 0.78rem;
}

.portal-body[data-theme="light"] .portal-topbar-user {
    background-color: #ffffff;
}

.portal-topbar-user-name {
    white-space: nowrap;
    max-width: 160px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.portal-icon-button {
    border: 1px solid var(--portal-border-subtle);
    background: rgba(15, 23, 42, 0.75);
    color: inherit;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
}

.portal-body[data-theme="light"] .portal-icon-button {
    background: #ffffff;
}

 .portal-icon-button i {
    pointer-events: none;
}

.portal-topbar-logout {
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.8);
    background: transparent;
    color: #fecaca;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.portal-user-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.portal-user-action-button {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}

.portal-user-action-button--edit {
    background-color: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.7);
    color: #fbbf24;
}

.portal-body[data-theme="light"] .portal-user-action-button--edit {
    background-color: #fffbeb;
    color: #92400e;
}

.portal-user-action-button--delete {
    background-color: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
}

.portal-body[data-theme="light"] .portal-user-action-button--delete {
    background-color: #fef2f2;
    color: #b91c1c;
}

.portal-user-action-button i {
    pointer-events: none;
}

.portal-users-actions-top {
    margin-top: 0.9rem;
    justify-content: flex-start;
}

.portal-users-actions-top .portal-button-primary {
    max-width: 260px;
}

@media (max-width: 640px) {
    .portal-users-actions-top {
        justify-content: center;
    }

    .portal-users-actions-top .portal-button-primary {
        width: 100%;
        justify-content: center;
    }
}

.portal-topbar-menu-toggle {
    display: none;
}

.portal-topbar-action-label {
    display: none;
}

.portal-topbar-right-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-topbar-actions-toggle {
    display: none;
}

.portal-actions-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 60;
    display: none;
}

.portal-actions-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    max-width: 100%;
    background-color: var(--portal-surface);
    border-left: 1px solid var(--portal-border-strong);
    box-shadow: 0 0 40px rgba(15, 23, 42, 0.8);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 65;
    display: flex;
    flex-direction: column;
}

.portal-actions-panel-inner {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    box-sizing: border-box;
}

.portal-actions-panel-header {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.portal-actions-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.portal-actions-button {
    width: 100%;
    border-radius: 0.65rem;
    border: 1px solid var(--portal-border-subtle);
    background: rgba(15, 23, 42, 0.75);
    color: inherit;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    text-decoration: none;
}

.portal-actions-button-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
}

.portal-actions-button:hover {
    text-decoration: none;
}

@media (max-width: 900px) {
    .portal-badge strong {
        max-width: 160px;
    }
}

.portal-body.portal-actions-open .portal-actions-panel-backdrop {
    display: block;
}

.portal-body.portal-actions-open .portal-actions-panel {
    transform: translateX(0);
}

.portal-content {
    flex: 1;
    padding: 1.25rem 1.5rem 1.75rem;
    max-width: 100%;
    box-sizing: border-box;
}

.portal-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 40;
}

.portal-modal-backdrop.is-open {
    display: flex;
}

.portal-modal {
    max-width: 480px;
    width: 100%;
    border-radius: 1rem;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border-strong);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.65);
    padding: 1.25rem 1.25rem 1.25rem;
}

.portal-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-modal-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.portal-modal-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--portal-muted);
}

.portal-modal-form {
    margin-top: 1rem;
}

.portal-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.portal-modal-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0.7rem;
    border: 1px solid var(--portal-border-subtle);
    background-color: var(--portal-surface-soft);
    color: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.portal-modal-option input[type="radio"] {
    width: 16px;
    height: 16px;
}

.portal-modal-option span {
    font-size: 0.9rem;
}

.portal-modal-actions {
    margin-top: 1.1rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.portal-modal-close {
    border: none;
    background: transparent;
    color: var(--portal-muted);
    cursor: pointer;
    padding: 0.15rem;
    border-radius: 999px;
}

.portal-modal-close:hover {
    color: #e5e7eb;
}

.portal-modal-option:hover {
    background-color: var(--portal-accent-soft);
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.portal-modal-option:has(input[type="radio"]:checked) {
    background-color: var(--portal-accent-soft);
    border-color: var(--portal-accent-strong);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7);
}

.portal-modal-option:focus-visible {
    outline: 2px solid var(--portal-accent);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .portal-shell {
        flex-direction: column;
    }

    .portal-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .portal-body.portal-sidebar-open .portal-sidebar {
        transform: translateX(0);
    }

    .portal-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.7);
        z-index: 40;
        display: none;
    }

    .portal-body.portal-sidebar-open .portal-sidebar-backdrop {
        display: block;
    }

    .portal-main-area {
        min-height: 100vh;
    }

    .portal-topbar-menu-toggle {
        display: inline-flex;
    }

    .portal-topbar-change-company {
        display: none;
    }

    .portal-topbar-main {
        gap: 0.75rem;
    }

    .portal-topbar-right {
        gap: 0.4rem;
    }

    .portal-topbar-right-desktop {
        display: none;
    }

    .portal-topbar-actions-toggle {
        display: inline-flex;
    }
}

@media (max-width: 900px) {
    .portal-main {
        padding-top: 0.75rem;
    }

    .portal-login-wrapper {
        border-radius: 1.25rem;
        grid-template-columns: minmax(0, 1fr);
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.5);
    }

    .portal-login-hero {
        padding-bottom: 1.75rem;
    }

    .portal-login-form-panel {
        border-left: none;
        border-top: 1px solid var(--portal-border-subtle);
        padding-top: 1.75rem;
    }
}

@media (max-width: 640px) {
    .portal-header {
        padding: 1.15rem 1rem 0.5rem;
    }

    .portal-main {
        padding: 1rem 1rem 1.5rem;
    }

    .portal-login-hero {
        padding: 1.5rem 1.5rem 1.5rem;
    }

    .portal-login-form-panel {
        padding: 1.5rem;
    }

    .portal-login-footer {
        margin-top: 1.3rem;
    }
}
