/*==================================================
  Font Definitions & Variables
==================================================*/
@font-face {
    font-family: 'Itrex';
    font-style: normal;
    font-weight: 700;
    src: url(/static/fonts/bold.woff2) format('woff2');
}

@font-face {
    font-family: 'Itrex';
    font-style: normal;
    font-weight: 500;
    src: url(/static/fonts/medium.woff2) format('woff2');
}

@font-face {
    font-family: 'Itrex';
    font-style: normal;
    font-weight: 400;
    src: url(/static/fonts/regular.woff2) format('woff2');
}

/*==================================================
  Global Styles & Variables
==================================================*/
:root {
    --primary-color: #4A90E2;
    /* A subtle, professional blue */
    --primary-hover-color: #357ABD;
    --text-color: #333333;
    --label-color: #555555;
    --border-color: #D8D8D8;
    --light-border-color: #EAEAEA;
    --input-bg-color: #FFFFFF;
    --input-focus-bg-color: #F9F9F9;
    --background-color: #F7F8FC;
    --card-background-color: #FFFFFF;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --success-color: #276749;
    --success-bg-color: #f0fdf4;
    --error-color: #9B2C2C;
    --error-bg-color: #FFF5F5;
    --info-color: #2c5282;
    --info-bg-color: #ebf8ff;
    --warning-color: #D69E2E;
    --warning-bg-color: #FFFBEB;
    /* Font family variables matching Tailwind */
    --font-sans: 'Itrex', sans-serif;
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-family: var(--font-sans);
    /* Keep existing variable for compatibility */
    --border-radius: 8px;
    --content-width: 40%;
    /* Unified width for main content blocks */
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    /* Additional font settings from Tailwind */
    /* font-weight: 500;
    letter-spacing: -0.025em; */
}

.hidden {
    display: none !important;
}

/* New Content Wrapper */
.content-wrapper {
    width: var(--content-width);
    margin: 0px auto 40px auto;
    /* Top and bottom margin, centered horizontally */
}

/*==================================================
  Header Styles
==================================================*/
.page-header {
    /* width and margin are removed, controlled by wrapper now */
    background-color: var(--card-background-color);
    box-shadow: var(--card-shadow);
    padding: 16px 32px;
    position: relative;
    z-index: 100;
    border-radius: 0px 0px 8px 8px;
}

.header-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    height: 40px;
}

.logo .logo-link {
    display: block;
    height: 100%;
}

.logo .logo-link .logo-image {
    height: 100% !important;
    width: auto !important;
    object-fit: contain;
    display: block;
}

.language-switcher {
    position: relative;
}

.lang-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--label-color);
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-arrow {
    transition: transform 0.3s ease;
    color: var(--label-color);
}

.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--card-background-color);
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--light-border-color);
}

.language-switcher.open .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--input-focus-bg-color);
}


/*==================================================
  Main Content & Card Styles
==================================================*/
.main-container {
    margin-top: 20px;
    /* Space between header and main content card */
}

/* Unified card style for form and status page */
.investment-form,
.status-card {
    background-color: var(--card-background-color);
    padding: 24px 32px 32px 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-header {
    text-align: center;
}

.form-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--label-color);
}

/*==================================================
  Common Form Elements & Layout
==================================================*/
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--label-color);
}

/* Required field asterisk */
.form-field.is-required label::after,
.how-found-section.is-required .how-found-title::after {
    content: " *";
    color: var(--error-color);
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: #999;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--input-focus-bg-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.button-primary {
    margin-top: 8px;
    padding: 16px 20px;
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.button-primary:hover {
    background-color: var(--primary-hover-color);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.2);
}

.button-primary:disabled {
    background-color: #B0C4DE;
    cursor: not-allowed;
}

.form-footer {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--light-border-color);
}

/*==================================================
  APPLICATION PAGE: Specific Styles
==================================================*/

/* ==================================================
   Co-founders: buttons, items, and collapsible fix
   ================================================== */

/* Базовый стиль кнопок (унифицировано) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
    user-select: none;
}

/* Вторичная (залитая светлая) — для "Add co-founder" */
.btn-secondary {
    background-color: #f3f4f6;
    /* светло-серый */
    color: var(--label-color);
    border-color: var(--light-border-color);
}

.btn-secondary:hover {
    background-color: #e9ecef;
    border-color: var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-secondary:active {
    transform: translateY(1px);
}

/* Текстовая кнопка — для Remove */
.btn-text {
    background: transparent;
    color: var(--label-color);
    border-color: transparent;
    padding: 24px 0 8px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-text:hover {
    color: #111827;
    text-decoration: underline;
}

.btn-text:active {
    transform: translateY(1px);
}

.btn-text.danger {
    color: var(--error-color);
}

.btn-text.danger:hover {
    color: #7f1d1d;
}

/* Иконка (если решите добавить) */
.btn .icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* Карточки сооснователей */
.cofounders-field {
    border-bottom: 1px solid var(--border-color);
    /* border-radius: 12px; */
    padding-bottom: 16px;
    background: #ffffff;
}

.cofounders-field .cofounders-field-header {
    font-size: 1rem;
    color: var(--text-color);
}

.cofounders-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cofounder-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cofounder-item .form-grid {
    gap: 16px 16px;
}

.cofounder-item .cof-input {
    width: 100%;
    padding: 10px 14px;
    /* font-size: inherit; */
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.cofounder-item .cof-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--input-focus-bg-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

/* Мобильная компактность */
@media (max-width: 768px) {
    .btn {
        width: 100%;
    }
}

/* --- Info Block --- */
.info-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background-color: var(--info-bg-color);
    color: var(--info-color);
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid #90cdf4;
}

.info-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--info-color);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.info-checkbox-wrapper label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--info-color);
    cursor: pointer;
}

.info-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Notice (soft warning) --- */
.notice {
    display: block;
    /* icon removed, no need for flex */
    background-color: var(--warning-bg-color);
    /* soft light yellow */
    color: var(--text-color);
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(214, 158, 46, 0.35);
    /* matches --warning-color */
}

.notice--soft {
    /* modifier kept for future variants */
    background-color: var(--warning-bg-color);
}

.notice__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice__title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.notice__list {
    margin-left: 1.2rem;
    display: grid;
    gap: 8px;
    list-style: decimal;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-color);
}

.notice__list li::marker {
    color: var(--warning-color);
    font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .notice {
        padding: 12px;
        gap: 12px;
    }

    .notice__title {
        font-size: 1rem;
        font-weight: 600;
    }

    .notice__list {
        font-size: 0.9rem;
    }
}

/* --- Collapsible Sections --- */
.collapsible {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.collapsible.open {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.collapsible-header {
    background-color: #fafbfd;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid transparent;
}

.collapsible.open .collapsible-header {
    border-bottom-color: var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.collapsible-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
}

.collapsible-header::after {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform-origin: center;
    flex-shrink: 0;
}

.collapsible.open .collapsible-header::after {
    transform: rotate(180deg);
}

.field-counter {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--label-color);
    background-color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--light-border-color);
    line-height: 1.5;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    background-color: var(--card-background-color);
}

.collapsible.open .collapsible-content {
    max-height: 10000px !important;
    padding: 24px 20px;
}

/* --- Input Validation Styles --- */
input.invalid {
    border-color: var(--error-color);
}

input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.2);
}

input.valid {
    border-color: var(--success-color);
}

input.valid:focus {
    box-shadow: 0 0 0 3px rgba(39, 103, 73, 0.2);
}

/* --- Textarea & Select --- */
textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23555555" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

input[type="radio"] {
    accent-color: var(--primary-color);
}

/* --- Custom Multi-select Dropdown --- */
.multi-select-container {
    position: relative;
    width: 100%;
}

.select-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    min-height: 43px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-box:hover,
.select-box.open {
    border-color: var(--primary-color);
}

.select-box.open {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.select-box .placeholder {
    color: #999;
}

.selected-options-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-grow: 1;
}

.selected-pill {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.select-box::after {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.select-box.open::after {
    transform: rotate(180deg);
}

.options-container {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: var(--card-background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.options-container.visible {
    display: block;
}

.options-container label {
    display: block;
    padding: 12px 16px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.options-container label:hover {
    background-color: var(--input-focus-bg-color);
}

.options-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* --- Custom File Upload --- */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-upload-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: #fcfdff;
}

.file-upload-label.has-file {
    border-color: var(--success-color);
    background-color: var(--success-bg-color);
}

.file-upload-label.uploading {
    border-color: var(--warning-color);
    background-color: var(--warning-bg-color);
}

.file-upload-label.error {
    border-color: var(--error-color);
    background-color: var(--error-bg-color);
}

.file-upload-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    stroke-width: 1.5;
    transition: color 0.3s;
}

.file-upload-label.has-file .file-upload-icon {
    color: var(--success-color);
}

.file-upload-label.uploading .file-upload-icon {
    color: var(--warning-color);
}

.file-upload-label.error .file-upload-icon {
    color: var(--error-color);
}

.file-upload-text {
    font-size: 0.9rem;
    color: var(--label-color);
    font-weight: 500;
    transition: color 0.3s;
}

.file-upload-label.has-file .file-upload-text {
    color: var(--success-color);
}

.file-upload-label.uploading .file-upload-text {
    color: var(--warning-color);
}

.file-upload-label.error .file-upload-text {
    color: var(--error-color);
}

.file-hint {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    margin-top: 4px;
}

.file-progress {
    width: 100%;
    height: 4px;
    background-color: var(--light-border-color);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.file-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/*==================================================
  Simplified Questionnaire Section
==================================================*/
.how-found-section {
    padding-top: 24px;
    margin-top: 16px;
    border-top: 1px solid var(--light-border-color);
}

.how-found-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.how-found-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.how-found-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.how-found-group label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
}

.how-found-group input[type="radio"] {
    margin-top: 3px;
    /* Align with first line of text */
}

.how-found-details-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    border-color: var(--light-border-color);
}

/* --- Popups & Success Message (UPDATED) --- */
/* The container now acts as the card */
.submission-result-container {
    background-color: var(--card-background-color);
    padding: 24px 32px 32px 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Remove card styles from the inner block */
.success-message {
    text-align: center;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Adjust the popup inside */
.popup {
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup.success {
    background-color: var(--success-bg-color);
    color: var(--text-color);
    border: 1px solid var(--success-color);
}

.popup.error {
    background-color: var(--error-bg-color);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 550px;
    z-index: 1000;
}

.popup-message {
    font-size: 1.1rem;
    font-weight: 600;
}

.popup-info {
    font-size: 0.9rem;
    line-height: 1.5;
}

.popup-info a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.popup-info a:hover {
    text-decoration: none;
}

.success-icon {
    font-size: 3rem;
    color: #4CAF50;
    line-height: 1;
    margin-bottom: 20px;
}

.success-message h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.success-message p {
    color: var(--label-color);
    line-height: 1.6;
}

/*==================================================
  STATUS PAGE: Specific Styles (TIMELINE FIX)
==================================================*/
#status-result {
    margin-top: 0.5rem;
    border-top: 1px solid var(--light-border-color);
    padding-top: 1.5rem;
}

.result-header {
    margin-bottom: 1.5rem;
    background: var(--background-color);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.result-header p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.result-header p:last-child {
    margin-bottom: 0;
}

.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    background-color: var(--label-color);
}

.status-badge.Submitted,
.status-badge.Under-Review,
.status-badge.Awaiting-IC-Decision,
.status-badge.Due-Diligence-in-Progress {
    background-color: #6b7280;
}

.status-badge.Approved,
.status-badge.Closed {
    background-color: #10b981;
}

.status-badge.Rejected,
.status-badge.Declined {
    background-color: #ef4444;
}

.status-badge.Info-Request,
.status-badge.Meeting-Pitch-Invited,
.status-badge.Meeting-Held,
.status-badge.Term-Sheet-Negotiation {
    background-color: #f59e0b;
}

#status-result h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* **FIXED TIMELINE STYLES** */
.timeline {
    position: relative;
    padding-left: 0px;
    /* Make space for the line and dots */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    /* Position the line inside the padding area */
    top: 5px;
    bottom: 5px;
    width: 3px;
    background-color: var(--light-border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    /* Pull the dot leftwards to sit ON the timeline's ::before line */
    left: 0px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--card-background-color);
    border: 4px solid var(--light-border-color);
    z-index: 1;
    /* Ensure dot is above the line */
}

.timeline-item:first-child .timeline-dot {
    border-color: var(--primary-color);
}

.timeline-content {
    position: relative;
    padding-left: 30px;
    top: -2px;
}

.timeline-status {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--label-color);
}

.error-message-box {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--error-bg-color);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    text-align: center;
}

/*==================================================
  Responsive Design
==================================================*/
@media (max-width: 1280px) {
    .content-wrapper {
        width: 70%;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        width: 100%;
        margin: 0;
        /* Remove horizontal margin */
    }

    .page-header {
        border-radius: 0;
        padding: 16px;
    }

    .main-container {
        padding: 20px 12px 24px 12px;
        /* Add padding for mobile */
    }

    .investment-form,
    .status-card,
    .submission-result-container {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field.full-width {
        grid-column: 1 / -1;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .file-upload-label {
        height: 100px;
    }

    .timeline {
        padding-left: 25px;
    }

    .timeline-dot {
        left: -17px;
    }
}

/* --- Document Examples / Templates --- */
.doc-examples {
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--border-radius);
    padding: 14px;
}

.doc-examples__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.doc-examples__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.doc-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: calc(var(--border-radius) - 2px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.85));
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.doc-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.doc-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 204, 0, 0.18);
    /* мягкий жёлтый */
    color: var(--text-color);
    border: 1px solid rgba(214, 158, 46, 0.35);
    /* акцент под warning */
}

.doc-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: var(--warning-bg-color);
    color: var(--warning-color);
    border-radius: 10px;
    border: 1px solid rgba(214, 158, 46, 0.35);
}

.doc-card__body {
    display: grid;
    gap: 4px;
}

.doc-card__name {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-color);
}

.doc-card__meta {
    font-size: 0.85rem;
    color: var(--muted-color, #6b7280);
}

.doc-examples__hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--muted-color, #6b7280);
}

/* Compact on small screens */
@media (max-width: 768px) {
    .doc-examples {
        padding: 12px;
    }

    .doc-card {
        grid-template-columns: 40px 1fr;
        padding: 10px;
    }

    .doc-card__icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .doc-card__name {
        font-size: 0.95rem;
    }
}

