.portal{padding:155px 0 70px;background:#f5f8fd;flex:1}.portal__container{max-width:1372px;margin:auto;padding:0 26px}.portal-top,.portal-top__right{display:flex;align-items:center;gap:24px;justify-content:space-between}.portal-top{margin-bottom:36px;font-size:14px}.portal-link{color:#143b9c;font-weight:600;line-height:1.5}.portal-link:hover{text-decoration:underline}.portal-heading{margin:0 0 32px}.portal h1{font-size:36px;font-weight:700;line-height:1.2;color:#123782;margin:12px 0;overflow-wrap:anywhere}.portal h2{font-size:23px;font-weight:700;line-height:1.3;margin-bottom:12px}.portal h3{font-size:19px;font-weight:700;line-height:1.4}.portal p{line-height:1.6}.portal-heading p,.portal-muted{color:#63718b}.portal-eyebrow{font-size:12px;letter-spacing:1.5px;font-weight:700;color:#335998}.portal-card{background:#fff;border:1px solid #e0e7f2;border-radius:18px;padding:30px;box-shadow:0 8px 24px #183b7210;margin-bottom:28px}.portal-login{display:grid;grid-template-columns:1fr 440px;gap:80px;align-items:center;max-width:1120px;margin:35px auto 70px}.portal-login h1{font-size:46px}.portal-login__intro p{max-width:420px;font-size:19px;color:#62718b}.portal-login__detail{margin-top:32px;max-width:410px;line-height:1.6;color:#62718b;padding-left:20px;border-left:3px solid #164acf}.portal-form{display:flex;flex-direction:column;gap:22px;margin-top:24px}.portal label{display:flex;flex-direction:column;gap:9px;font-size:14px;font-weight:600;line-height:1.5;min-width:0}.portal input,.portal select,.portal textarea{width:100%;min-width:0;background:#f8faff;border:1px solid #d5dfef;border-radius:9px;padding:13px 15px;font-size:15px;color:#17243b;font-weight:400;line-height:1.4}.portal input:focus,.portal select:focus,.portal textarea:focus{outline:2px solid #164acf;outline-offset:2px}.portal textarea{min-height:110px;resize:vertical}.portal-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:#164acf;color:white;font-weight:700;font-size:14px;padding:14px 20px;line-height:1.4;white-space:normal;text-align:center}.portal-btn:hover{background:#123782}.portal-btn:disabled{opacity:.6;cursor:wait}.portal-form>.portal-btn{align-self:flex-start}.portal-login .portal-btn{width:100%}.portal-small{margin-top:24px;font-size:13px;color:#68758a}.portal-small a{color:#164acf}.portal-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px;margin-top:24px}.portal-info dt{color:#6b7890;font-size:13px;margin-bottom:8px}.portal-info dd{font-weight:600;line-height:1.4;overflow-wrap:anywhere}.portal-section-heading{display:flex;align-items:center;gap:14px;margin:38px 0 22px}.portal-section-heading h2{margin:0}.portal-section-heading>span,.portal-badge{display:inline-block;background:#eaf1ff;color:#22488e;font-size:12px;border-radius:20px;padding:6px 10px;line-height:1.4}.portal-courses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.portal-course{display:flex;gap:24px;background:#fff;border:1px solid #e0e7f2;border-radius:18px;padding:24px;align-items:center}.portal-course img{width:150px;height:150px;object-fit:contain;flex-shrink:0}.portal-course h3{margin:14px 0 10px}.portal-course p{color:#66748d;font-size:14px}.portal-course__meta{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12px;color:#67758a;margin-top:18px;line-height:1.5}.portal-empty{padding:48px 30px;border:1px dashed #c9d6ed;border-radius:18px;background:#edf3fd}.portal-empty p{color:#67758a;margin-top:10px}.portal-tabs{display:flex;gap:8px;border-bottom:1px solid #d5dfef;margin-bottom:30px}.portal-tabs a{padding:14px 22px;color:#64738c;font-weight:600;line-height:1.4;border-bottom:3px solid transparent}.portal-tabs a.is-active{color:#164acf;border-color:#164acf}.portal-actions{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:24px}.portal-search{display:flex;gap:12px;align-items:center;flex:1;max-width:650px}.portal-search input{flex:1}.portal-import summary{cursor:pointer;color:#143b9c;font-weight:700;font-size:17px;line-height:1.4}.portal-import p{margin:16px 0;color:#67758a}.portal-import .portal-form{max-width:700px}.portal-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.portal-wide{grid-column:1/-1}.portal-form small{color:#6d7b91;font-weight:400;font-size:12px}.portal-edit{max-width:850px;margin-top:22px}.portal-password{margin-top:32px;border-top:1px solid #e0e7f2;padding-top:24px}.portal-password p{font-size:14px;color:#67758a;margin-bottom:16px}.portal-btn_light{background:#eaf1ff;color:#164acf}.portal-btn_light:hover{background:#dce8ff}.portal-table-wrap{overflow-x:auto;background:#fff;border:1px solid #e0e7f2;border-radius:14px}.portal-table{border-collapse:collapse;width:100%;text-align:left;font-size:14px;line-height:1.5;min-width:750px}.portal-table th{background:#edf3fd;font-size:12px;color:#5a6d8c;font-weight:600;padding:16px}.portal-table td{padding:18px 16px;border-top:1px solid #e8edf5;vertical-align:top;overflow-wrap:anywhere;max-width:420px}.portal-table td>span{display:block;color:#6c7990;font-size:12px;margin-top:4px}.portal-row-actions{display:flex;flex-wrap:wrap;gap:10px 16px;max-width:250px;color:#164acf;font-size:12px}.portal-danger{color:#b73838;font-weight:600;line-height:1.5}.portal-filters{display:flex;gap:16px;align-items:flex-end;margin:30px 0 22px}.portal-filters label{flex:1}.portal-notice,.portal-errors,.portal-banner{border-radius:12px;padding:18px 22px;line-height:1.6;margin-bottom:24px}.portal-notice{background:#e7f5ee;color:#236347}.portal-errors{background:#fff0ef;color:#a13434}.portal-errors ul li{list-style:disc;margin-left:18px}.portal-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#fff4d9;color:#73541a}.portal-pagination{display:flex;justify-content:space-between;margin-top:22px;font-size:13px;color:#6b7890;line-height:1.5}.portal-pagination>div{display:flex;gap:20px}.portal-pagination a{color:#164acf}.portal-footer{padding:26px;display:flex;justify-content:space-between;gap:20px;line-height:1.6;color:#67758a;font-size:12px}.portal-footer a{color:#164acf}.portal [data-result]:empty{display:none}.portal button:focus-visible,.portal a:focus-visible{outline:2px solid #164acf;outline-offset:3px}.header__account{color:#143b9c;font-weight:600;font-size:13px;white-space:nowrap}.header__cta{gap:14px}.menu-open .header__account{color:white}
@media(max-width:1199px){.portal{padding-top:160px}.portal-courses{grid-template-columns:1fr}.portal-login{gap:40px;grid-template-columns:1fr 400px}}
@media(max-width:991px){.portal-login{grid-template-columns:1fr;gap:30px;max-width:620px;margin-top:0}.portal-login h1{font-size:36px}.portal-login__detail{display:none}.portal-info{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-actions{flex-wrap:wrap}.portal-filters{flex-wrap:wrap}.portal-filters label{flex-basis:40%}.header .header__cta{gap:10px}.header .header__button{font-size:11px;padding:11px 9px}}
@media(max-width:560px){.portal__container{padding:0 18px}.portal{padding-top:145px}.portal h1{font-size:28px}.portal-login h1{font-size:32px}.portal-card{padding:22px}.portal-info,.portal-fields{grid-template-columns:1fr}.portal-info{gap:20px}.portal-course{flex-direction:column;align-items:flex-start}.portal-course img{width:120px;height:120px;align-self:center}.portal-form>.portal-btn{width:100%}.portal-top,.portal-top__right{gap:14px;flex-wrap:wrap}.portal-top{font-size:12px}.portal-tabs a{padding:12px;font-size:14px}.portal-search{flex-wrap:wrap;max-width:100%;min-width:0}.portal-search input{flex-basis:100%}.portal-actions>.portal-btn{width:100%}.portal-filters label{flex-basis:100%}.portal-banner,.portal-footer{flex-direction:column;align-items:flex-start}.portal-pagination{gap:12px;flex-wrap:wrap}.portal-login__intro p{font-size:16px}}

.portal .portal-login { display:block; width:100%; max-width:440px; margin:35px auto 70px; }
.portal-login > .portal-card { margin-bottom:0; }

.portal h1.portal-panel-title {
    font-weight:700;
    font-size:clamp(28px, 3vw, 40px);
    line-height:1.1;
    text-transform:uppercase;
    color:var(--blue);
    margin:0;
    overflow-wrap:break-word;
}

.portal-profile-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
@media(max-width:767px) { .portal-profile-fields { grid-template-columns:minmax(0,1fr); } }

.portal-row-actions { display:flex; align-items:center; flex-wrap:nowrap; gap:6px; min-width:170px; }
.portal-row-actions form { margin:0; }
.portal-row-actions > a, .portal-row-actions button {
    position:relative; display:inline-flex; align-items:center; justify-content:center;
    width:38px; height:38px; padding:0; border:0; border-radius:50%;
    background:transparent; color:var(--blue); text-decoration:none;
    transition:background-color .15s ease;
}
.portal-row-actions > a:hover, .portal-row-actions button:hover,
.portal-row-actions > a:focus-visible, .portal-row-actions button:focus-visible { background:#e8f0ff; }
.portal-row-actions .portal-danger { color:#b52d35; }
.portal-row-actions .portal-danger:hover, .portal-row-actions .portal-danger:focus-visible { background:#ffe9ec; }
.portal-action-icon { width:20px; height:20px; flex:0 0 20px; }
.portal-row-actions a:focus-visible, .portal-row-actions button:focus-visible { outline:2px solid var(--middle-blue); outline-offset:2px; }
.portal-row-actions .portal-action-tooltip {
    position:absolute; bottom:calc(100% + 8px); right:0; z-index:30;
    width:max-content; max-width:220px; padding:8px 11px; border-radius:8px;
    background:var(--dark-blue); color:#fff; font-size:12px; font-weight:400;
    line-height:1.4; text-align:center; pointer-events:none;
    box-shadow:0 4px 12px #0e379126; opacity:0; visibility:hidden;
}
.portal-action-tooltip::after { content:""; position:absolute; top:100%; right:14px; border:5px solid transparent; border-top-color:var(--dark-blue); }
.portal-row-actions a:hover .portal-action-tooltip,
.portal-row-actions button:hover .portal-action-tooltip,
.portal-row-actions a:focus-visible .portal-action-tooltip,
.portal-row-actions button:focus-visible .portal-action-tooltip { opacity:1; visibility:visible; }

.portal-table .portal-actions-cell { text-align:right; }
.portal-actions-cell .portal-row-actions { justify-content:flex-end; }
.portal-actions-cell .portal-row-actions { gap:2px; min-width:158px; }
.portal-actions-cell .portal-row-actions {
    width:max-content;
    min-width:0;
    margin-left:auto;
    gap:2px;
}
.portal-actions-cell .portal-row-actions > a,
.portal-actions-cell .portal-row-actions button {
    width:32px;
    height:36px;
    flex-shrink:0;
}
/* Единая высота полей и селектов в кабинете и панели. */
.portal input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.portal select {
    box-sizing:border-box;
    height:49px;
    min-height:49px;
}
.portal select {
    appearance:none;
    -webkit-appearance:none;
    padding:0 42px 0 15px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23143b9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 15px center;
    background-size:16px;
}
.portal-filters > .portal-btn,
.portal-filters > .portal-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    height:49px;
    padding-top:0;
    padding-bottom:0;
}

[data-result].portal-errors { white-space:pre-line; overflow-wrap:break-word; line-height:1.6; }
.portal-select { position:relative; width:100%; min-width:0; }
.portal-select__native { position:absolute; width:1px!important; height:1px!important; min-height:0!important; opacity:0; pointer-events:none; }
.portal-select__trigger { width:100%; height:49px; padding:0 42px 0 15px; border:1px solid #d5dfef; border-radius:9px; background:#f8faff; color:#17243b; font:inherit; font-size:15px; font-weight:400; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.portal-select__trigger::after { content:''; position:absolute; right:17px; top:20px; width:8px; height:8px; border-right:2px solid var(--blue); border-bottom:2px solid var(--blue); transform:rotate(45deg); }
.portal-select__trigger:focus-visible { outline:2px solid var(--middle-blue); outline-offset:2px; }
.portal-select__trigger[aria-invalid=true] { border-color:#b52d35; }
.portal-select__panel { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:50; padding:10px; border:1px solid #d5dfef; border-radius:12px; background:#fff; box-shadow:0 10px 30px #12378220; }
.portal-select__panel[hidden] { display:none; }
.portal-select__list { max-height:240px; overflow-y:auto; margin-top:8px; }
.portal-select__option { display:block; width:100%; padding:10px 12px; border-radius:7px; text-align:left; font-size:14px; font-weight:400; line-height:1.4; white-space:normal; color:#17243b; }
.portal-select__option:hover, .portal-select__option:focus-visible { background:#eef5ff; color:var(--blue); outline:none; }
.portal-select__option[aria-selected=true] { background:#e8f0ff; color:var(--blue); font-weight:600; }
.portal-select__empty { padding:12px; color:#63718b; font-size:14px; }

.portal-select-field { display:flex; flex-direction:column; gap:9px; font-size:14px; font-weight:600; line-height:1.5; min-width:0; }
.portal-filters .portal-select-field { flex:1; }
@media(max-width:991px) { .portal-filters .portal-select-field { flex-basis:40%; } }
@media(max-width:560px) { .portal-filters .portal-select-field { flex-basis:100%; } }
.portal-course h3 { margin-top:0; }

.portal-documents { display:flex; align-items:center; gap:22px; border-color:#d5e2fa; background:linear-gradient(110deg,#fff,#f0f5ff); }
.portal-documents__icon { display:flex; align-items:center; justify-content:center; flex:0 0 58px; width:58px; height:58px; border-radius:14px; background:#e6eeff; color:var(--blue); }
.portal-documents__icon svg { width:30px; height:30px; }
.portal-documents__text { flex:1; min-width:0; }
.portal-documents__text p { color:#63718b; font-size:15px; }
.portal-documents__text > span { display:block; margin-top:8px; color:#74829a; font-size:12px; line-height:1.5; }
.portal-documents__button { flex-shrink:0; gap:12px; }
@media(max-width:767px) {
 .portal-documents { flex-wrap:wrap; align-items:flex-start; gap:16px; }
 .portal-documents__text { flex-basis:calc(100% - 74px); }
 .portal-documents__button { width:100%; }
}

.portal-select__error { display:block; margin-top:6px; font-size:12px; color:#b52d35; font-weight:400; }
.portal-select__error[hidden] { display:none; }
/* Табличные значения целиком в строку; на телефоне прокручивается таблица. */
.portal-table { table-layout:auto; }
.portal-table th, .portal-table td,
.portal-table td strong, .portal-table td span,
.portal-table td button {
    white-space:nowrap;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
}
.portal-table .portal-action-tooltip { white-space:normal; }
/* Не ограничиваем ячейки: длинное название расширяет столбец, а не перекрывает соседний. */
.portal-table td { max-width:none; }

.portal-banner {
    background: #fff;
    color: #173b87;
    border: 2px dashed #173b87;
    border-radius: 6px;
    padding: 18px 20px;
}
 .portal-banner .portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: var(--dark-blue);
    color: var(--white);
    height: 48px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--br-8);
    font-family: var(--main-font-family);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .5s ease, color .5s ease;
}
.portal-banner .portal-btn:hover { background: var(--bold-blue); }
@media (max-width: 1372px) {
    .portal-banner .portal-btn { padding-inline: 16px; }
}
@media (max-width: 991.98px) {
    .portal-banner .portal-btn { height: 38px; min-height: 38px; font-size: 11px; }
}
@media (max-width: 560px) {
    .portal-banner { padding: 16px; gap: 12px; }
}
