.eis-portal {
    --eis-portal-bg: #1f1f1f;
    --eis-portal-panel: #2e2b2b;
    --eis-portal-panel-soft: #383434;
    --eis-portal-field: #585555;
    --eis-portal-text: #ffffff;
    --eis-portal-muted: rgba(255, 255, 255, 0.68);
    --eis-portal-border: rgba(255, 255, 255, 0.1);
    --eis-portal-accent: #ff8112;
    --eis-portal-active: #ff8112;
    --eis-portal-blue: #3d6df2;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    color: var(--eis-portal-text);
    font-family: inherit;
}

.eis-portal,
.eis-portal * {
    box-sizing: border-box;
}

.eis-portal a {
    color: inherit;
}

.eis-portal__shell {
    border-radius: 14px;
    padding: 22px;
    background: var(--eis-portal-bg);
}

.eis-portal--compact .eis-portal__shell {
    max-width: 620px;
}

.eis-portal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.eis-portal__eyebrow {
    margin: 0 0 8px;
    color: var(--eis-portal-active);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.eis-portal__title {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 900;
    line-height: 1.25;
}

.eis-portal__language,
.eis-portal__button,
.eis-portal__panel-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid rgba(255, 129, 18, 0.62);
    border-radius: 999px;
    padding: 8px 16px;
    background: #1e1e1e;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.eis-portal__language:hover,
.eis-portal__button:hover,
.eis-portal__panel-head a:hover,
.eis-portal__language:focus-visible,
.eis-portal__button:focus-visible,
.eis-portal__panel-head a:focus-visible {
    border-color: #ff9a3d;
    background: #262626;
    color: #ffeadb;
    transform: translateY(-1px);
}

.eis-portal__layout {
    display: grid;
    grid-template-columns: minmax(170px, 0.24fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.eis-portal__nav {
    display: grid;
    gap: 8px;
    border-radius: 14px;
    padding: 10px;
    background: var(--eis-portal-panel);
}

.eis-portal__nav-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--eis-portal-muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.eis-portal__nav-link:hover,
.eis-portal__nav-link:focus-visible,
.eis-portal__nav-link.is-active {
    background: rgba(255, 129, 18, 0.14);
    color: #fff;
}

.eis-portal__nav-link.is-active {
    box-shadow: inset 4px 0 0 var(--eis-portal-active);
}

.eis-portal[dir="rtl"] .eis-portal__nav-link.is-active {
    box-shadow: inset -4px 0 0 var(--eis-portal-active);
}

.eis-portal__main,
.eis-portal__content {
    min-width: 0;
}

.eis-portal__content {
    display: grid;
    gap: 18px;
}

.eis-portal__panel {
    border-radius: 14px;
    padding: 22px;
    background: var(--eis-portal-panel);
}

.eis-portal__panel h3,
.eis-portal__panel h4 {
    margin: 0 0 14px;
    color: #fff;
    font-weight: 900;
    line-height: 1.35;
}

.eis-portal__panel h3 {
    font-size: 22px;
}

.eis-portal__panel h4 {
    font-size: 16px;
}

.eis-portal__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.eis-portal__panel-head h3 {
    margin: 0;
}

.eis-portal__muted {
    margin: 0 0 18px;
    color: var(--eis-portal-muted);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.8;
}

.eis-portal__notice {
    margin: 0 0 18px;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.5;
}

.eis-portal__notice--success {
    border: 1px solid rgba(255, 129, 18, 0.45);
    background: rgba(255, 129, 18, 0.12);
    color: #ffeadb;
}

.eis-portal__notice--error {
    border: 1px solid rgba(255, 129, 18, 0.45);
    background: rgba(255, 129, 18, 0.12);
    color: #ffd7bf;
}

.eis-portal__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.eis-portal__stat {
    min-height: 98px;
    border-radius: 14px;
    padding: 18px;
    background: var(--eis-portal-panel);
    box-shadow: inset 4px 0 0 var(--eis-portal-active);
}

.eis-portal[dir="rtl"] .eis-portal__stat {
    box-shadow: inset -4px 0 0 var(--eis-portal-active);
}

.eis-portal__stat strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.eis-portal__stat span {
    display: block;
    color: var(--eis-portal-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.eis-portal__list {
    display: grid;
    gap: 10px;
}

.eis-portal__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 74px;
    border: 1px solid var(--eis-portal-border);
    border-radius: 12px;
    padding: 14px;
    background: var(--eis-portal-panel-soft);
    color: #fff;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.eis-portal__item:hover,
.eis-portal__item:focus-visible {
    border-color: rgba(255, 129, 18, 0.56);
    transform: translateY(-1px);
}

.eis-portal__item--static:hover {
    transform: none;
}

.eis-portal__item strong,
.eis-portal__item small {
    display: block;
}

.eis-portal__item strong {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.4;
}

.eis-portal__item small {
    color: var(--eis-portal-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.eis-portal__badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.eis-portal__badge--submitted,
.eis-portal__badge--reviewing,
.eis-portal__badge--estimating {
    background: rgba(255, 129, 18, 0.18);
    color: #ffd7bf;
}

.eis-portal__badge--in_progress,
.eis-portal__badge--active {
    background: rgba(61, 109, 242, 0.2);
    color: #d9e3ff;
}

.eis-portal__badge--completed,
.eis-portal__badge--closed {
    background: rgba(255, 129, 18, 0.18);
    color: #ffeadb;
}

.eis-portal__badge--needs_info {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.eis-portal__form {
    display: grid;
    gap: 14px;
}

.eis-portal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.eis-portal__form label {
    display: grid;
    gap: 7px;
    margin: 0;
}

.eis-portal__form label span,
.eis-portal__detail-grid span {
    color: var(--eis-portal-muted);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.5;
}

.eis-portal__form input,
.eis-portal__form select,
.eis-portal__form textarea {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 12px;
    background: var(--eis-portal-field);
    color: #f5f5f5;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.eis-portal__form select {
    min-height: 44px;
}

.eis-portal__form input:focus,
.eis-portal__form select:focus,
.eis-portal__form textarea:focus {
    border-color: rgba(255, 129, 18, 0.7);
    background: #625f5f;
    box-shadow: 0 0 0 2px rgba(255, 129, 18, 0.18);
}

.eis-portal__form input[disabled] {
    opacity: 0.72;
}

.eis-portal__form small {
    color: var(--eis-portal-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.eis-portal__form .eis-portal__button {
    width: max-content;
    min-width: 132px;
}

.eis-portal__detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.eis-portal__detail-grid div {
    border-radius: 12px;
    padding: 13px;
    background: var(--eis-portal-panel-soft);
}

.eis-portal__detail-grid strong {
    display: block;
    margin-top: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.5;
}

.eis-portal__description {
    margin: 0 0 18px;
    border-radius: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.85;
}

.eis-portal__description p {
    margin: 0 0 12px;
}

.eis-portal__description p:last-child {
    margin-bottom: 0;
}

.eis-portal__files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.eis-portal__files h4 {
    flex: 1 0 100%;
    margin-bottom: 4px;
}

.eis-portal__files a {
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 129, 18, 0.14);
    color: #ffeadb;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
}

.eis-portal__timeline {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.eis-portal__message {
    border-radius: 12px;
    padding: 14px;
    background: var(--eis-portal-panel-soft);
}

.eis-portal__message--admin {
    border: 1px solid rgba(255, 129, 18, 0.28);
    background: rgba(255, 129, 18, 0.1);
}

.eis-portal__message div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.eis-portal__message strong {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.4;
}

.eis-portal__message span {
    color: var(--eis-portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.eis-portal__message p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.8;
}

.eis-portal__message p:last-child {
    margin-bottom: 0;
}

.eis-portal__empty {
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 18px;
    color: var(--eis-portal-muted);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 860px) {
    .eis-portal__shell {
        padding: 16px;
    }

    .eis-portal__header,
    .eis-portal__panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .eis-portal__layout {
        grid-template-columns: 1fr;
    }

    .eis-portal__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eis-portal__stats,
    .eis-portal__grid,
    .eis-portal__detail-grid {
        grid-template-columns: 1fr;
    }

    .eis-portal__item {
        align-items: flex-start;
        flex-direction: column;
    }

    .eis-portal__message div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

@media (max-width: 520px) {
    .eis-portal__nav {
        grid-template-columns: 1fr;
    }

    .eis-portal__form .eis-portal__button,
    .eis-portal__button,
    .eis-portal__language,
    .eis-portal__panel-head a {
        width: 100%;
    }
}
