@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/open-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/open-sans-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    --navy: #172b4d;
    --navy-deep: #0f203d;
    --blue: #1c77c3;
    --blue-dark: #145d99;
    --yellow: #f7c843;
    --background: #f3f6f9;
    --border: #dce3ea;
    --text: #24364b;
    --muted: #6b7c8f;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --success: #117a55;
    --success-bg: #ecfdf3;
    --warning-bg: #fffaeb;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: "Open Sans", Verdana, Arial, sans-serif;
    line-height: 1.45;
}
a { color: var(--blue); }
button, input { font: inherit; }

.topbar {
    position: relative;
    z-index: 10;
    isolation: isolate;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px max(24px, calc((100vw - 1180px) / 2));
    background: linear-gradient(115deg, #122746 0%, #193c64 56%, #22688f 100%);
    color: #fff;
    box-shadow: 0 2px 9px rgba(0, 0, 0, .16);
}
.topbar::after {
    position: absolute;
    z-index: -2;
    inset: 0;
    background: linear-gradient(90deg, transparent 45%, rgba(255,255,255,.06));
    content: '';
}
.brand-group { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; }
.brand strong { display: block; font-size: 18px; line-height: 1.1; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: #c8d4e4; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.topbar-user { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topbar-user form { margin: 0; }

.portal-page {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 3% 5%, rgba(238,234,174,.46) 0, rgba(238,234,174,0) 23%),
        radial-gradient(circle at 96% 78%, rgba(148,203,233,.46) 0, rgba(148,203,233,0) 30%),
        linear-gradient(145deg, #f8fbfc 0%, #edf5f8 55%, #f7faf8 100%);
}
.portal-page::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(23,43,77,.023) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23,43,77,.023) 1px, transparent 1px);
    background-size: 44px 44px;
    content: '';
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 88%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 88%);
}
.page-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 34px auto 60px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; }
.result-count { color: var(--muted); font-size: 14px; }
.orders-page-heading {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 150px;
    align-items: center;
    margin-bottom: 20px;
    padding: 30px 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(120deg, #142a49 0%, #1b4e73 64%, #63a8c7 100%);
    box-shadow: 0 24px 52px rgba(23,43,77,.17), 0 3px 10px rgba(23,43,77,.08);
}
.orders-page-heading::before { position: absolute; z-index: -2; inset: 0; background: linear-gradient(105deg, rgba(255,255,255,.04), transparent 58%); content: ''; }
.orders-page-heading h1 { position: relative; z-index: 1; color: #fff; font-size: clamp(34px, 5vw, 48px); }
.orders-heading-line { position: relative; z-index: 1; display: block; width: 50px; height: 3px; margin-top: 15px; border-radius: 3px; background: #eeeaae; }
.orders-page-heading .result-count { position: relative; z-index: 2; padding: 8px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.9); background: rgba(12,36,64,.32); backdrop-filter: blur(7px); }
.orders-hero-lemon { position: absolute; z-index: -1; right: 70px; bottom: -272px; width: 510px; max-width: none; opacity: .82; filter: drop-shadow(0 20px 26px rgba(4,19,37,.22)); transform: rotate(-7deg); pointer-events: none; }

.login-panel, .reset-panel { min-width: 0; align-self: center; }
.auth-brand { margin-bottom: 26px; text-align: left; }
.auth-brand h1 { margin: 0; color: var(--navy); font-size: clamp(36px, 4.4vw, 52px); font-weight: 720; line-height: .98; letter-spacing: -.05em; }
.auth-link { display: block; margin-top: 21px; text-align: center; font-size: 14px; }
.public-card-auth .stack-form { gap: 21px; }
.public-card-auth .stack-form label { font-size: 14px; }
.public-card-auth input[type="email"],
.public-card-auth input[type="password"] { min-height: 52px; margin-top: 8px; border-color: #cbd7e1; border-radius: 10px; background: #fbfdff; }
.public-card-auth .button-primary {
    min-height: 50px;
    margin-top: 3px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1b6da9, #2386ca);
    box-shadow: 0 9px 22px rgba(28, 119, 195, .22);
    font-size: 16px;
}
.public-card-auth .button-primary:hover { background: linear-gradient(135deg, #155e94, #1c77b5); }
.login-form-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: -2px; }
.remember-control { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 400 !important; }
.remember-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.login-form-options .auth-link { flex: 0 0 auto; margin: 0; }

.stack-form { display: grid; gap: 18px; }
.stack-form label { color: #35475c; font-size: 13px; font-weight: 650; }
input[type="email"], input[type="password"], input[type="search"] {
    width: 100%;
    margin-top: 7px;
    padding: 11px 13px;
    border: 1px solid #c7d1dc;
    border-radius: 7px;
    outline: none;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 119, 195, .15); }
.field-help { display: block; margin-top: -12px; color: var(--muted); }
.button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 650;
    line-height: 1.2;
    transition: background .15s, border-color .15s, transform .08s;
}
.button:active { transform: translateY(1px); }
.button-primary { background: linear-gradient(135deg, #1b6da9, #2386ca); color: #fff; box-shadow: 0 7px 16px rgba(28,119,195,.16); }
.button-primary:hover { background: linear-gradient(135deg, #155e94, #1c77b5); }
.button-secondary { border-color: #c7d1dc; background: #fff; color: var(--navy); }
.button-secondary:hover { border-color: var(--blue); color: var(--blue-dark); }
.button-quiet { min-height: 34px; border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
.button-quiet:hover { background: rgba(255,255,255,.1); }
.button-small { min-height: 32px; padding: 6px 11px; font-size: 13px; }
.button-block { width: 100%; }

.alert { margin: 0 0 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; }
.alert-danger { border-color: #fecdca; background: var(--danger-bg); color: var(--danger); }
.alert-success { border-color: #abefc6; background: var(--success-bg); color: var(--success); }
.alert-warning { border-color: #fedf89; background: var(--warning-bg); color: #93370d; }
.muted { color: var(--muted); }

.orders-controls { margin-bottom: 20px; padding: 0 18px 18px; border: 1px solid rgba(23,43,77,.08); border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 12px 30px rgba(23,43,77,.08); backdrop-filter: blur(8px); }
.tabs { display: flex; gap: 5px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tabs a { margin-bottom: -1px; padding: 10px 18px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 700; }
.tabs a:hover { color: var(--blue); }
.tabs a.active { border-color: var(--blue); color: var(--navy); }
.search-form { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto; gap: 9px; margin: 0; }
.search-form input { margin: 0; }

.order-list-card { overflow: hidden; border: 1px solid rgba(23,43,77,.09); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 20px 45px rgba(23,43,77,.1); backdrop-filter: blur(8px); }
.order-list-head,
.order-summary { display: grid; grid-template-columns: 1.2fr 1.7fr .8fr .8fr .85fr 55px; align-items: center; gap: 14px; }
.hide-files-column .order-list-head,
.hide-files-column .order-summary { grid-template-columns: 1.2fr 1.7fr .8fr .8fr .85fr; }
.order-list-head { padding: 13px 42px 13px 20px; border-bottom: 1px solid var(--border); color: #63768b; background: linear-gradient(90deg, #f5f9fc, #edf5f9); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.order-accordion { border-bottom: 1px solid var(--border); }
.order-accordion:last-child { border-bottom: 0; }
.order-summary { position: relative; padding: 19px 42px 19px 20px; cursor: pointer; list-style: none; transition: background .15s; }
.order-summary:hover { background: #f8fbfd; }
.order-summary::-webkit-details-marker { display: none; }
.order-accordion:not(.order-accordion-static) > .order-summary::after { content: '›'; position: absolute; top: 50%; right: 17px; color: var(--blue); font-size: 25px; line-height: 1; transform: translateY(-50%); transition: transform .15s; }
.order-accordion[open] > .order-summary::after { transform: translateY(-50%) rotate(90deg); }
.order-accordion[open] > .order-summary { background: linear-gradient(90deg, #f8fbfd, #f1f8fb); }
.order-accordion-static .order-summary { padding-right: 20px; cursor: default; }
.order-accordion-static .order-summary:hover { background: transparent; }
.order-summary > span { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.order-project { color: var(--navy); font-weight: 750; }
.order-files-count { color: var(--blue); font-weight: 750; text-align: center; }
.status-text { display: block; width: fit-content; margin-top: 4px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.status-text.status-active { background: #e8f3ff; color: #075985; }
.status-text.status-delivered { background: var(--success-bg); color: var(--success); }
.order-files-panel { border-top: 1px solid var(--border); background: rgba(247,250,252,.88); }
.files-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.empty-state.compact { padding: 28px 20px; }

.language-pair { white-space: nowrap; font-size: 12px; font-weight: 750; }
.empty-state { padding: 50px 24px; text-align: center; }
.empty-state strong { font-size: 17px; }
.empty-state p { margin: 5px 0 0; color: var(--muted); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.pagination a { font-weight: 650; text-decoration: none; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #edf1f5; }
.file-row:last-child { border-bottom: 0; }
.file-name { min-width: 0; }
.file-name strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.file-download-link { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; color: var(--navy); text-decoration: none; }
.file-download-link:hover strong, .file-download-link:focus-visible strong { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.file-download-link:focus-visible { border-radius: 6px; outline: 3px solid rgba(28,119,195,.16); outline-offset: 3px; }
.file-type-icon {
    position: relative;
    flex: 0 0 31px;
    width: 31px;
    height: 37px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding: 0 2px 5px;
    border: 1px solid #9cabb9;
    border-radius: 4px;
    color: #fff;
    background: #718096;
    box-shadow: 0 3px 8px rgba(23,43,77,.12);
}
.file-type-icon::before { position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-bottom: 1px solid rgba(255,255,255,.65); border-left: 1px solid rgba(255,255,255,.65); background: rgba(255,255,255,.3); content: ''; }
.file-type-icon span { position: relative; z-index: 1; font-size: 8px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.file-type-pdf { border-color: #ca3b35; background: linear-gradient(145deg, #e6534d, #bd2723); }
.file-type-word { border-color: #2269ae; background: linear-gradient(145deg, #3987d3, #175a9d); }
.file-type-sheet { border-color: #1f8153; background: linear-gradient(145deg, #38a66f, #167145); }
.file-type-slides { border-color: #c65825; background: linear-gradient(145deg, #ed7f46, #b8491d); }
.file-type-archive { border-color: #99721c; background: linear-gradient(145deg, #d9ac3f, #886313); }
.file-type-image { border-color: #7351a7; background: linear-gradient(145deg, #9b75d0, #614095); }
.file-type-text { border-color: #607184; background: linear-gradient(145deg, #8393a3, #536578); }
.file-size { color: var(--muted); font-size: 13px; white-space: nowrap; }

.footer { display: grid; justify-items: center; gap: 8px; margin-top: auto; padding: 20px; color: #8795a8; text-align: center; font-size: 12px; }
.portal-page .footer { color: var(--muted); }
.footer-language-links { display: flex; align-items: center; justify-content: center; }
.footer-language-links a { color: inherit; font-weight: 700; letter-spacing: .08em; text-decoration: none; }
.footer-language-links a:hover, .footer-language-links a:focus-visible { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.footer-language-links a[aria-current="page"] { color: var(--blue); }
.footer-language-separator { margin: 0 7px; color: #a4afbc; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
    .topbar { min-height: 72px; padding: 10px 16px; }
    .topbar-user > span { display: none; }
    .page-shell { width: min(100% - 24px, 1180px); margin-top: 24px; }
    .page-heading { align-items: flex-start; }
    .orders-page-heading { min-height: 136px; align-items: center; padding: 25px 26px; }
    .orders-page-heading .result-count { margin-top: 0; }
    .orders-hero-lemon { right: -25px; bottom: -190px; width: 390px; opacity: .68; }
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-form input { grid-column: 1 / -1; }
    .order-list-head { display: none; }
    .order-summary { display: block; padding: 15px 42px 15px 18px; }
    .order-summary > span { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
    .order-summary > span::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
    .order-files-count { text-align: left; }
    .status-text { display: inline-block; margin: 0 0 0 7px; }
    .file-row { grid-template-columns: minmax(0, 1fr) auto; }
    .file-size { display: none; }
}

@media (max-width: 480px) {
    .public-card-auth .auth-brand h1 { font-size: clamp(34px, 12vw, 45px); }
    .login-form-options { align-items: flex-start; flex-direction: column; gap: 11px; }
    .brand small { display: none; }
    .topbar .portrait-thumb { width: 40px; height: 40px; }
    .page-heading { display: block; }
    .result-count { display: block; margin-top: 6px; }
    .orders-page-heading { min-height: 150px; padding: 25px 22px; }
    .orders-page-heading .result-count { display: inline-block; margin-top: 19px; }
    .orders-hero-lemon { right: -120px; bottom: -135px; width: 340px; opacity: .58; }
    .orders-controls { padding: 0 12px 12px; border-radius: 14px; }
    .tabs a { flex: 1; text-align: center; }
}
