.app-root-font {
    font-family: "Segoe UI", "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}

html,
body {
    font-family: "Segoe UI", "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.home-button {
    position: static;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

body {
    background-color: #f8f9fa;
}

.page-container {
    margin-top: 12px;
    position: relative;
    padding-top: 0;
}

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

.top-logout-form {
    margin: 0;
}

.top-user-control-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.top-user-actions {
    display: inline-flex;
    align-items: center;
}

.top-icon-btn {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.top-icon-btn::after {
    display: none;
}

.notification-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #f8f9fa;
}

.notification-menu-dropdown {
    width: min(380px, calc(100vw - 32px));
    border: none;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.notification-menu-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 6px;
}

.notification-menu-title {
    font-weight: 800;
    color: #111827;
}

.notification-menu-subtitle {
    color: #6b7280;
    font-size: 0.86rem;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    color: #111827;
}

.notification-item:hover {
    background: #f8fafc;
    color: #111827;
}

.notification-item.is-read {
    opacity: 0.72;
}

.notification-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #e0f2fe;
    color: #0369a1;
}

.notification-item-warning .notification-icon {
    background: #fef3c7;
    color: #b45309;
}

.notification-item-danger .notification-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.notification-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.notification-title {
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
    text-decoration: none;
}

.notification-title:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.notification-detail {
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.35;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.notification-actions form {
    margin: 0;
}

.notification-action-btn {
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0;
}

.notification-action-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.notification-empty {
    color: #6b7280;
    padding: 18px 12px;
    text-align: center;
}

.account-menu-btn {
    flex-shrink: 0;
}

.account-menu-dropdown {
    min-width: 220px;
    border: none;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.account-menu-dropdown .dropdown-item {
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
}

.account-menu-dropdown .dropdown-item:active {
    background: #eef2ff;
    color: #4338ca;
}

.account-menu-dropdown .dropdown-divider {
    margin: 8px 0;
}

.page-card,
.card {
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border: none;
    border-radius: 10px;
}

.btn {
    border-radius: 25px;
    padding: 10px 22px;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.btn-primary:hover:not(:disabled):not(.disabled),
.btn-primary:focus:not(:disabled):not(.disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    border-color: transparent;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.alert {
    border-radius: 8px;
    border: none;
}

.flash-stack {
    margin-bottom: 16px;
}

.floating-notification-stack {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 20px;
    z-index: 1070;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    pointer-events: none;
}

.floating-notification-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    pointer-events: auto;
}

.floating-notification-success {
    background: rgba(17, 24, 39, 0.94);
}

.floating-notification-warning {
    background: rgba(146, 64, 14, 0.95);
}

.floating-notification-error {
    background: rgba(127, 29, 29, 0.96);
}

.floating-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.floating-notification-message {
    font-weight: 600;
}

.floating-notification-close {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #f9fafb;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    opacity: 0.9;
    cursor: pointer;
}

.floating-notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.dismissible-alert-panel {
    position: relative;
    padding-right: 46px;
}

.dismissible-alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    color: #475569;
    width: auto;
    height: auto;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.dismissible-alert-close:hover {
    background: transparent;
    color: #111827;
}

.floating-download-bar {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 20px;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(17, 24, 39, 0.94);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
}

.floating-download-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.floating-download-message {
    font-weight: 600;
}

.floating-download-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.floating-download-close {
    border: none;
    background: transparent;
    color: #f9fafb;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.85;
}

.floating-download-close:hover {
    opacity: 1;
}

.report-progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-progress-overlay.is-visible {
    display: flex;
}

.report-progress-card {
    width: min(580px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    padding: 24px;
}

.report-progress-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.report-progress-message {
    color: #4b5563;
    margin-bottom: 14px;
}

.report-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: #4b5563;
    font-size: 0.92rem;
}

.report-progress-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.report-progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    padding: 6px 8px;
}

.report-progress-step.is-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.report-progress-step.is-complete {
    background: #dcfce7;
    color: #15803d;
}

.report-progress-detail {
    margin-top: 12px;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.45;
}

@media (max-width: 520px) {
    .report-progress-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.workspace-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.workspace-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 180px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.workspace-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.workspace-tab.is-active {
    background: linear-gradient(135deg, #0f766e 0%, #155e75 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

@media (max-width: 767px) {
    .workspace-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .workspace-tab {
        width: 100%;
    }
}

.report-progress-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}

.report-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.2s ease;
}

.report-progress-fill.is-indeterminate {
    width: 35%;
    animation: report-progress-indeterminate 1.1s ease-in-out infinite;
}

@keyframes report-progress-indeterminate {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(320%);
    }
}

.upload-size-summary {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #334155;
    font-size: 0.95rem;
}

.upload-size-summary.is-warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.upload-size-summary.is-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.section-title {
    color: #495057;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.rg-status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rg-status-neutral {
    background: #f3f4f6;
    color: #4b5563;
}

.rg-status-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.rg-status-green {
    background: #d1fae5;
    color: #065f46;
}

.rg-status-orange {
    background: #ffedd5;
    color: #c2410c;
}

.rg-status-amber {
    background: #fef3c7;
    color: #b45309;
}

.rg-status-red {
    background: #fee2e2;
    color: #991b1b;
}

.rg-stack-wrap {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .top-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .top-user-control-group {
        margin-left: auto;
    }

    .btn {
        width: auto;
        max-width: 100%;
    }

    .floating-download-bar {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .floating-download-actions {
        width: 100%;
        justify-content: center;
        position: relative;
        padding-right: 28px;
    }

    .floating-download-actions .btn {
        margin: 0 auto;
    }

    .floating-download-actions .floating-download-close {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .floating-notification-stack {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .floating-notification-bar {
        align-items: flex-start;
    }

    .rg-stack-wrap {
        overflow: visible;
    }

    .rg-stack-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    .rg-stack-table thead {
        display: none;
    }

    .rg-stack-table,
    .rg-stack-table tbody,
    .rg-stack-table tr,
    .rg-stack-table td {
        display: block;
        width: 100%;
    }

    .rg-stack-table tbody {
        background: #f8f9fa;
    }

    .rg-stack-table tr {
        border: none;
        border-top: 1px solid #e9ecef;
        background: #f8f9fa;
        margin-bottom: 0;
        padding: 0;
        box-shadow: none;
        text-align: left;
    }

    .rg-stack-table tbody tr:first-child {
        border-top: none;
    }

    .rg-stack-table td {
        border: none;
        padding: 8px 12px;
        background: transparent !important;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
        text-align: left !important;
    }

    .rg-stack-table td:first-child {
        padding-top: 12px;
    }

    .rg-stack-table td:last-child {
        padding-bottom: 12px;
    }

    .rg-stack-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.78rem;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-bottom: 4px;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        text-align: left !important;
    }

    .rg-stack-table td[colspan] {
        text-align: center !important;
        padding: 14px 12px;
    }

    .rg-stack-table td[colspan]::before {
        content: none;
    }
}
