/* TEIQue Scoring Engine Styles */
.teique-section {
    padding: var(--spacing-narrow-l) 0;
}

.teique-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-narrow-l);
    margin-bottom: var(--spacing-narrow-l);
}

.teique-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.teique-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.teique-title {
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    color: var(--color-primary-full);
    line-height: var(--line-height-tight);
}

.description-section {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    padding: var(--spacing-narrow-l);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-standard-l);
}

.description-text {
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-black);
    line-height: var(--line-height-normal);
    margin-bottom: var(--spacing-narrow-l);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-narrow-l);
}

.step {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-narrow-s);
}

.step-number {
    font-family: var(--font-inter);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-content);
    color: var(--color-primary-full);
    line-height: var(--line-height-normal);
}

.step-text {
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-black);
    line-height: var(--line-height-normal);
}

.main-content-area {
    display: flex;
    gap: var(--spacing-standard-m);
    align-items: flex-start;
}

.upload-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-narrow-l);
}

.upload-area {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    padding: var(--spacing-narrow-m);
    box-shadow: var(--shadow-inner);
}

.upload-zone {
    border: 3px dashed var(--color-primary-full);
    border-radius: var(--radius-small);
    padding: var(--spacing-standard-l) var(--spacing-narrow-l);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    background: rgba(37, 157, 213, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-narrow-s);
}

.upload-icon {
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-bold);
    font-size: 36px;
    color: var(--color-primary-full);
    line-height: var(--line-height-normal);
}

.upload-text {
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-title-large);
    color: var(--color-primary-full);
    line-height: var(--line-height-tight);
    text-align: center;
}

.score-button {
    background: linear-gradient(180deg, #cccccc 0%, #979797 100%);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-standard);
    padding: var(--spacing-narrow-s) var(--spacing-standard-m);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    line-height: var(--line-height-tight);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    align-self: center;
}

.score-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* Upload options (boolean toggles) */
.upload-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-standard-s);
    flex-wrap: nowrap;
    width: 100%;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-narrow-m);
    cursor: pointer;
    user-select: none;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--color-light-gray);
    border-radius: 24px;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.05);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-slider {
    background: var(--color-primary-gradient);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    font-family: var(--font-inter);
    font-size: var(--font-size-content);
    color: var(--color-black);
}

.toggle-label.muted {
    color: var(--color-gray);
}

/* Important information list */
.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-standard-s);
}

.info-list ul {
    list-style: disc;
    padding-left: var(--spacing-narrow-l);
    margin: 0;
}

.info-list li {
    margin-bottom: var(--spacing-narrow-s);
    font-family: var(--font-inter);
    font-size: var(--font-size-content);
    color: var(--color-black);
    line-height: var(--line-height-normal);
}

.tools-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-narrow-l);
}

.tool-tabs {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: var(--spacing-narrow-s) var(--spacing-narrow-l);
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: var(--line-height-normal);
}

.tab-button.active {
    background: var(--color-primary-gradient);
    color: var(--color-white);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
}

.tab-button:hover:not(.active) {
    background: rgba(37, 157, 213, 0.1);
    color: var(--color-primary-full);
}

/* Tool Dropdown (hidden by default, shown on tablet/mobile) */
.tool-dropdown {
    display: none;
    width: 100%;
}

.dropdown-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dropdown {
    background: var(--color-primary-gradient);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-standard);
    padding: var(--spacing-narrow-s) var(--spacing-narrow-m);
    font-family: var(--font-inter);
    font-size: var(--font-size-content);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-narrow-m);
    box-shadow: var(--shadow-card);
    width: 100%;
    transition: all 0.3s ease;
}

.dropdown:hover {
    transform: translateY(-1px);
}

.dropdown-arrow {
    width: 14px;
    height: 10px;
    transition: transform 0.3s ease;
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-narrow-s);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 4px;
    width: max-content;
    min-width: max-content;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Info dropdown container is always visible */
.info-dropdown {
    display: block;
    width: 100%;
}

/* In-card Important Information toggle */
.important-info { margin-top: var(--spacing-standard-s); }
.info-toggle {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-narrow-m);
    cursor: pointer;
    color: var(--color-black);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
}
.info-arrow {
    width: 16px;
    height: 12px;
    transition: transform 0.3s ease;
    /* tint svg to primary blue */
    filter: invert(48%) sepia(57%) saturate(548%) hue-rotate(162deg) brightness(92%) contrast(94%);
}
.important-info.active .info-arrow { transform: rotate(180deg); }
.info-content {
    margin-top: var(--spacing-narrow-m);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}
.important-info.active .info-content {
    max-height: 1000px;
    opacity: 1;
}

/* Tools section header */
.tools-header {
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    color: var(--color-primary-full);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-narrow-s);
}

/* Scoring Engine Primary Tabs */
.se-tabs {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    margin-bottom: var(--spacing-standard-l);
}

.se-tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: var(--spacing-narrow-s) var(--spacing-narrow-l);
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: var(--line-height-normal);
}

.se-tab-button.active {
    background: var(--color-primary-gradient);
    color: var(--color-white);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    box-shadow: var(--shadow-card);
}

.tab-panels { width: 100%; }
.tab-panel { width: 100%; }
.hidden { display: none; }

/* List/Card patterns for History and Payments */
.list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-narrow-l);
}

.list-item-card {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-narrow-l);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-narrow-l);
    flex-wrap: wrap;
}

.item-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-narrow-s);
    min-width: 220px;
}

.item-title {
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-title-large);
    color: var(--color-primary-full);
    line-height: var(--line-height-tight);
}

.item-meta {
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-black);
    line-height: var(--line-height-normal);
}

.status-badge {
    border-radius: 50px;
    padding: var(--spacing-narrow-xs) var(--spacing-narrow-m);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-content);
    line-height: var(--line-height-button);
    white-space: nowrap;
}

.status-success { background: var(--color-primary-gradient); color: var(--color-white); }
.status-error { background: linear-gradient(180deg, #f26065 0%, #ec1c24 100%); color: var(--color-white); }
.status-processing { background: var(--color-white-gradient); color: var(--color-black); }

.item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-narrow-m);
}

.secondary-button {
    background: var(--color-white-gradient);
    color: var(--color-primary-full);
    border: none;
    border-radius: 50px;
    padding: var(--spacing-narrow-s) var(--spacing-narrow-l);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-content);
    line-height: var(--line-height-button);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

/* Table-style cards for history/payments */
.table-card {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-header, .table-row {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 1.6fr 1.4fr 1.2fr 1.4fr; /* default for submission history */
    gap: var(--spacing-narrow-l);
    align-items: center;
    padding: var(--spacing-narrow-m) var(--spacing-narrow-l);
}

.table-header {
    background: var(--color-white);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-content);
    color: var(--color-primary-full);
    /* bottom-only shadow to separate header from rows */
    box-shadow: 0 8px 12px -8px rgba(0,0,0,0.25);
}

.table-row {
    font-family: var(--font-inter);
    font-size: var(--font-size-content);
    color: var(--color-black);
    border-top: 1px solid var(--color-light-gray);
}

/* Remove top border on the first data row so only header shadow separates */
.table-card .table-row:first-of-type {
    border-top: none;
}

.status-dot { display: inline-flex; align-items: center; gap: var(--spacing-narrow-s); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--color-green-gradient); }
.dot.blue { background: var(--color-primary-gradient); }
.dot.orange { background: var(--color-secondary-gradient); }
.dot.yellow { background: var(--color-yellow-gradient); }
.dot.red { background: var(--color-red-gradient); }

.action-cell { display: flex; justify-content: flex-start; width: 100%; }
.action-button {
    /* Flip the primary blue gradient direction for buttons only */
    background: linear-gradient(180deg, #66bae2 0%, #259dd5 100%);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    padding: var(--spacing-narrow-s) var(--spacing-standard-m);
    font-family: var(--font-manrope);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-content);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}
.action-button:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); }
.action-button.disabled { background: var(--color-disabled-gradient); cursor: not-allowed; box-shadow: none; transform: none; }
.action-button.disabled:hover { box-shadow: none; transform: none; }

/* Payment table columns */
.payments .table-header, .payments .table-row {
    grid-template-columns: 1.2fr 2fr 1.2fr 1.4fr 1.4fr;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .table-header, .table-row { grid-template-columns: 1fr 1fr; }
    .action-cell { justify-content: flex-start; }
}

.dropdown-option {
    display: block;
    width: 100%;
    padding: var(--spacing-narrow-s) var(--spacing-narrow-m);
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-inter);
    font-size: var(--font-size-content);
    color: var(--color-primary-full);
    cursor: pointer;
    border-radius: var(--radius-small);
    transition: background 0.2s ease;
    white-space: nowrap;
}

.dropdown-option:hover {
    background: var(--color-primary-light);
    color: var(--color-white);
}

.downloads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-narrow-l);
}

.download-card {
    background: var(--color-white);
    border-radius: var(--radius-standard);
    padding: var(--spacing-narrow-l);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: var(--spacing-narrow-l);
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.15), 0px 6px 24px 0px rgba(0,0,0,0.2);
}

.download-icon {
    background: var(--color-white);
    border-radius: var(--radius-small);
    padding: var(--spacing-narrow-m);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.download-icon img {
    width: 40px;
    height: auto;
    object-fit: contain;
}

.download-text {
    font-family: var(--font-inter);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-content);
    color: var(--color-primary-full);
    line-height: var(--line-height-normal);
    flex: 1;
}

/* Tablet (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {

    /* TEIQue Scoring Engine Tablet Responsive */
    .teique-title {
        font-size: 18px;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-narrow-m);
    }

    .main-content-area {
        flex-direction: column;
        gap: var(--spacing-narrow-l);
    }

    /* Keep primary page tabs (se-tabs) visible; allow tool tabs to become dropdown */
    .tool-tabs:not(.se-tabs) { display: none; }
    .tool-dropdown { display: block; }

    .downloads-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-narrow-m);
    }

    /* Tablet list layout: card style with labels, 2-column split */
    .submissions .table-header, .payments .table-header { display: none; }
    .submissions .table-row, .payments .table-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-narrow-s);
        border-top: 1px solid var(--color-light-gray);
        align-items: start;
        grid-auto-rows: auto;
    }
    .submissions .table-row > div::before,
    .payments .table-row > div::before { display: inline; margin-right: var(--spacing-narrow-s); }
    /* Submissions labels and placement */
    .submissions .table-row > div:nth-child(1)::before { content: 'date: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(2)::before { content: 'instrument: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(3)::before { content: 'files: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(4)::before { content: 'status: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(5)::before { content: 'cost: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .submissions .table-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
    .submissions .table-row > div:nth-child(3) { grid-column: 1; grid-row: 3; }
    .submissions .table-row > div:nth-child(4) { grid-column: 2; grid-row: 1; }
    .submissions .table-row > div:nth-child(5) { grid-column: 2; grid-row: 2; }
    .submissions .table-row > div:nth-child(6) { grid-column: 1 / -1; grid-row: 4; }
    .submissions .action-cell { width: 100%; }
    .submissions .action-button { width: 100%; }

    /* Payments labels and placement */
    .payments .table-row > div:nth-child(1)::before { content: 'date: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(2)::before { content: 'description: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(3)::before { content: 'amount: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(4)::before { content: 'payment status: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .payments .table-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
    .payments .table-row > div:nth-child(3) { grid-column: 2; grid-row: 1; }
    .payments .table-row > div:nth-child(4) { grid-column: 2; grid-row: 2; }
    .payments .table-row > div:nth-child(5) { grid-column: 1 / -1; grid-row: 3; }
    .payments .action-cell { width: 100%; }
    .payments .action-button { width: 100%; }

    /* Reorder sections: downloads first, then upload */
    .tools-section {
        order: 1;
        width: 100%;
    }

    .upload-section {
        order: 2;
        width: 100%;
    }

    .upload-area {
        width: 100%;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    /* TEIQue Scoring Engine Mobile Responsive */
    .teique-section {
        padding: var(--spacing-standard-m) 0;
    }

    .teique-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-narrow-m);
        margin-bottom: var(--spacing-narrow-l);
    }

    .teique-icon {
        width: 36px;
        height: 36px;
        align-self: center;
    }

    .teique-title {
        font-size: 18px;
    }

    .description-section {
        padding: var(--spacing-narrow-m);
        margin-bottom: var(--spacing-narrow-l);
    }

    .description-text {
        font-size: 14px;
        margin-bottom: var(--spacing-narrow-m);
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: var(--spacing-narrow-m);
    }

    .step {
        flex-direction: row;
        gap: var(--spacing-narrow-s);
        align-items: flex-start;
    }

    .step-number {
        flex-shrink: 0;
        font-size: 14px;
    }

    .step-text {
        font-size: 14px;
    }

    .main-content-area {
        flex-direction: column;
        gap: var(--spacing-narrow-l);
    }

    .upload-zone {
        min-height: 150px;
        padding: var(--spacing-narrow-l);
    }

    .upload-icon {
        font-size: 28px;
    }

    .upload-text {
        font-size: 18px;
    }

    .score-button {
        font-size: 18px;
        padding: var(--spacing-narrow-m) var(--spacing-narrow-l);
    }

    /* Keep primary page tabs (se-tabs) visible; allow tool tabs to become dropdown */
    .tool-tabs:not(.se-tabs) {
        display: none;
    }

    .tool-dropdown {
        display: block;
    }

    /* Mobile list layout aligned with tablet: card style with labels, 2-column split */
    .submissions .table-header, .payments .table-header { display: none; }
    .submissions .table-row, .payments .table-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-narrow-s);
        border-top: 1px solid var(--color-light-gray);
        align-items: start;
        grid-auto-rows: auto;
    }
    .submissions .table-row > div::before,
    .payments .table-row > div::before { display: inline; margin-right: var(--spacing-narrow-s); }
    /* Submissions labels (mobile) */
    .submissions .table-row > div:nth-child(1)::before { content: 'date: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(2)::before { content: 'instrument: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(3)::before { content: 'files: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(4)::before { content: 'status: '; font-weight: 600; color: var(--color-primary-full); }
    .submissions .table-row > div:nth-child(5)::before { content: 'cost: '; font-weight: 600; color: var(--color-primary-full); }
    /* Submissions placement on mobile */
    .submissions .table-row > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .submissions .table-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
    .submissions .table-row > div:nth-child(3) { grid-column: 1; grid-row: 3; }
    .submissions .table-row > div:nth-child(4) { grid-column: 2; grid-row: 1; }
    .submissions .table-row > div:nth-child(5) { grid-column: 2; grid-row: 2; }
    .submissions .table-row > div:nth-child(6) { grid-column: 1 / -1; grid-row: 4; }
    .submissions .action-cell { width: 100%; }
    .submissions .action-button { width: 100%; }
    /* Payments labels and placement (mobile) */
    .payments .table-row > div:nth-child(1)::before { content: 'date: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(2)::before { content: 'description: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(3)::before { content: 'amount: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(4)::before { content: 'payment status: '; font-weight: 600; color: var(--color-primary-full); }
    .payments .table-row > div:nth-child(1) { grid-column: 1; grid-row: 1; }
    .payments .table-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
    .payments .table-row > div:nth-child(3) { grid-column: 2; grid-row: 1; }
    .payments .table-row > div:nth-child(4) { grid-column: 2; grid-row: 2; }
    .payments .table-row > div:nth-child(5) { grid-column: 1 / -1; grid-row: 3; }
    .payments .action-cell { width: 100%; }
    .payments .action-button { width: 100%; }

    /* Reorder sections: downloads first, then upload */
    .tools-section {
        order: 1;
        width: 100%;
    }

    .upload-section {
        order: 2;
        width: 100%;
    }

    .upload-area {
        width: 100%;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-narrow-m);
    }

    .download-card {
        padding: var(--spacing-narrow-m);
    }

    .download-icon {
        width: 48px;
        height: 48px;
        padding: var(--spacing-narrow-s);
    }

    .download-icon img {
        width: 30px;
    }

    .download-text {
        font-size: 14px;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .teique-title {
        font-size: 16px;
    }

    .upload-icon {
        font-size: 24px;
    }

    .upload-text {
        font-size: 16px;
    }

    .score-button {
        font-size: 16px;
        padding: var(--spacing-narrow-s) var(--spacing-narrow-m);
    }

    .download-text {
        font-size: 12px;
    }
}