:root {
    --green: #008a13;
    --green-dark: #006f0f;
    --orange: #f05a24;
    --orange-soft: #fff1e8;
    --bg: #fafafa;
    --card: #ffffff;
    --text: #050505;
    --muted: #777b86;
    --border: #e5e5e5;
    --field: #f7f7f7;
    --error: #d93025;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
}

.top-gradient-inner,
.page {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.page {
    padding: 36px 0 42px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero {
    margin-bottom: 40px;
    padding: 0;
}

.portal-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #008a13;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.05em;
    color: #0a0e1a;
    font-weight: 950;
}

.hero p {
    margin: 0;
    color: #4a5568;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 500;
    max-width: 520px;
}

.layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 26px;
    align-items: start;
    flex: 1 1 auto;
}

.left-stack {
    display: grid;
    gap: 14px;
}

.left-stack {
    position: sticky;
    top: 28px;
    align-self: start;
}

.right-column {
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding-right: 6px;
}

/* Ensure the inner form area stretches nicely */
.right-column .form-card {
    margin-bottom: 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.side-card {
    padding: 20px;
}

.side-card:has(.product-info-section) {
    padding: 0;
}

.side-card:has(.product-info-section) .product-info-section {
    margin: 0;
    border-radius: 14px;
}

.side-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.side-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1a1f2e;
}

.pending-pill {
    padding: 5px 10px;
    background: #ffe5d8;
    color: var(--orange);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    font-size: 13px;
}

.info-label {
    color: #7a7f8b;
}

.info-value {
    font-weight: 800;
    text-align: right;
    font-size: 14px;
    color: #0a0e1a;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.status-label {
    color: #7a7f8b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.status-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
    color: #1a1f2e;
}

.yellow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffb000;
}

.detail-label {
    color: #7a7f8b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 13px 0 6px;
}

.detail-value {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.35;
}

.product-info-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f5f8ff 100%);
    border: 1px solid #e0e8ff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.product-name-value {
    font-weight: 900;
    font-size: 24px;
    line-height: 1.3;
    color: #050505;
    margin-bottom: 8px;
}

.product-description-value {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    color: #2f3541;
    margin-bottom: 0;
}

/* Prominent product amount block */
.product-amount {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.product-amount .amount-label {
    font-size: 11px;
    color: #7a7f8b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-amount .amount-value {
    display: inline-block;
    font-weight: 900;
    font-size: 18px;
    color: var(--green-dark);
    background: linear-gradient(90deg, rgba(0,138,19,0.06), rgba(0,138,19,0.02));
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,138,19,0.08);
}

/* smaller screens tweak */
@media (max-width: 640px) {
    .product-amount .amount-value {
        font-size: 16px;
    }
}

.copy-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eeeeee;
    border-radius: 9px;
    padding: 10px 11px;
    font-weight: 800;
    font-size: 13px;
}

.copy-btn {
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
}

.warning {
    margin-top: 16px;
    background: #ffe2d4;
    border: 1px solid #ffb08c;
    color: var(--orange);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.45;
}

.form-card {
    padding: 26px;
}

.form-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

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

.section-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--border);
    margin: 14px 0 4px;
}

.section-title {
    grid-column: 1 / -1;
    font-size: 16px;
    font-weight: 900;
    margin: 8px 0 4px;
    color: #1a1f2e;
    letter-spacing: -0.01em;
}

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

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

label {
    font-size: 13px;
    font-weight: 800;
    color: #1a1f2e;
    letter-spacing: -0.01em;
}

.required {
    color: var(--error);
}

input,
select,
textarea {
    width: 100%;
    min-height: 39px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--field);
    color: var(--text);
    padding: 10px 13px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    background: #ffffff;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 138, 19, 0.1);
}

textarea {
    min-height: 74px;
    resize: vertical;
}

.hint {
    color: #8a909b;
    font-size: 11px;
    line-height: 1.4;
}

.method-fields {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.method-fields.active {
    display: grid;
}

.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, #f9fbff 0%, #f5f8ff 100%);
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    text-align: center;
    padding: 18px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.upload-box:hover,
.upload-box.dragover {
    border-color: var(--green);
    background: #f4fff6;
}

.upload-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #d9f4dd;
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 900;
}

.upload-main {
    font-size: 14px;
    font-weight: 900;
    color: #1a1f2e;
}

.file-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #f1f1f1;
    font-size: 12px;
}

.remove-file {
    border: 0;
    background: transparent;
    color: var(--error);
    cursor: pointer;
    font-weight: 900;
}

.error-message {
    display: none;
    color: var(--error);
    font-size: 12px;
}

.field.error input,
.field.error select,
.field.error textarea,
.field.error .upload-box {
    border-color: var(--error);
}

.field.error .error-message {
    display: block;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.submit-note {
    color: #7c828d;
    font-size: 12px;
    line-height: 1.45;
}

.submit-btn {
    border: 0;
    background: var(--green);
    color: #ffffff;
    border-radius: 11px;
    min-height: 44px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 138, 19, 0.15);
}

.submit-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 138, 19, 0.25);
}

.success-box {
    display: none;
    margin-top: 16px;
    padding: 13px 15px;
    background: #eaf8ed;
    border: 1px solid #b6e4bd;
    color: var(--green-dark);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}

.form-status {
    display: none;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.form-status[data-variant="info"] {
    display: block;
    background: #eef4ff;
    border: 1px solid #bfd0ff;
    color: #2748aa;
}

.form-status[data-variant="error"] {
    display: block;
    background: #fff0f0;
    border: 1px solid #ffb9b9;
    color: var(--error);
}

.form-status[data-variant="success"] {
    display: block;
    background: #eaf8ed;
    border: 1px solid #b6e4bd;
    color: var(--green-dark);
}

.form-status[data-variant="loading"] {
    display: block;
    background: #fff7ea;
    border: 1px solid #ffd69b;
    color: #8b5600;
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.submit-btn:disabled:hover {
    background: var(--green);
    transform: none;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {

    .top-gradient-inner,
    .subnav-inner,
    .page {
        width: min(100% - 24px, 1100px);
    }

    .page {
        padding-top: 24px;
    }

    h1 {
        font-size: 28px;
    }

    .hero {
        margin-bottom: 24px;
    }

    .left-stack,
    .form-grid,
    .method-fields.active {
        grid-template-columns: 1fr;
    }

    .form-card,
    .side-card {
        padding: 18px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .submit-btn {
        width: 100%;
    }
}