:root {
    --dv-primary: #0b3a78;
    --dv-primary-dark: #082f63;
    --dv-primary-light: #1764bd;
    --dv-primary-soft: #eef5fc;
    --dv-bg: #eef4fb;
    --dv-card: #ffffff;
    --dv-text: #173558;
    --dv-muted: #5f7287;
    --dv-border: #d8e3ef;
    --dv-success: #198754;
    --dv-warning-bg: #fff7e8;
    --dv-warning-text: #815b12;
    --dv-danger: #b42318;
    --dv-shadow: 0 16px 42px rgba(11, 58, 120, 0.10);
    --dv-shadow-soft: 0 8px 22px rgba(11, 58, 120, 0.07);
    --dv-radius-lg: 22px;
    --dv-radius-md: 14px;
    --dv-radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(52, 86, 150, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, var(--dv-bg) 100%);
    color: var(--dv-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

button,
input,
select {
    font: inherit;
}

.dv-page {
    min-height: 100vh;
    padding: 24px 16px 56px;
}

.dv-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

/* HERO */

.dv-hero {
    width: 100%;
    margin: 0 0 22px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--dv-radius-lg);
    background: linear-gradient(135deg, var(--dv-primary), var(--dv-primary-light));
    color: #ffffff;
    box-shadow:
        0 16px 36px rgba(11, 58, 120, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    text-align: center;
}

.dv-hero h1 {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 950;
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-align: center;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
    overflow-wrap: anywhere;
}

/* DESKTOP LAYOUT */

.dv-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.dv-card {
    border: 1px solid var(--dv-border);
    border-radius: var(--dv-radius-lg);
    background: var(--dv-card);
    box-shadow: var(--dv-shadow);
}

.dv-form-card {
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(52, 86, 150, 0.05), transparent 36%),
        #ffffff;
}

.dv-card-title {
    margin: 0 0 22px;
    color: var(--dv-primary);
    font-size: 25px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
}

/* FORM */

.dv-field {
    margin-bottom: 16px;
}

.dv-label,
.dv-legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: var(--dv-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.dv-input,
.dv-select {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0 auto;
    padding: 0 14px;
    border: 1px solid var(--dv-border);
    border-radius: 12px;
    outline: none;
    background: #fbfdff;
    color: var(--dv-text);
    text-align: center;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.dv-input:hover,
.dv-select:hover {
    border-color: #b7c7dc;
}

.dv-input:focus,
.dv-select:focus {
    border-color: var(--dv-primary);
    box-shadow: 0 0 0 4px rgba(52, 86, 150, 0.11);
}

.dv-input::placeholder {
    color: #9aa5b5;
    text-align: center;
}

.dv-select {
    text-align-last: center;
}

/* FIELDSETS */

.dv-fieldset {
    width: 100%;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--dv-border);
    border-radius: var(--dv-radius-md);
    background: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dv-fieldset .dv-legend {
    padding: 0 8px;
}

/*
|--------------------------------------------------------------------------
| თანაბარი არჩევანები
|--------------------------------------------------------------------------
*/

.dv-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.dv-check {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 9px;
    width: 100%;
    height: 100%;
    min-height: 58px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--dv-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--dv-text);
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(11, 58, 120, 0.05);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dv-check:hover {
    border-color: var(--dv-primary);
    background: #f8faff;
    transform: translateY(-1px);
}

.dv-check:has(input:checked) {
    border-color: var(--dv-primary-light);
    background: linear-gradient(135deg, var(--dv-primary), var(--dv-primary-light));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(11, 58, 120, 0.20);
}

.dv-check input {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--dv-primary);
}

.dv-check:has(input:checked) input {
    accent-color: #ffffff;
}

.dv-check span {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

/* BUTTONS */

.dv-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dv-primary), var(--dv-primary-light));
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(11, 58, 120, 0.20);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease,
        opacity 0.2s ease;
}

.dv-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 28px rgba(11, 58, 120, 0.24);
}

.dv-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.dv-button-full {
    width: 100%;
}

.dv-button-light {
    border: 1px solid var(--dv-border);
    background: #ffffff;
    color: var(--dv-primary);
    box-shadow: 0 8px 18px rgba(11, 58, 120, 0.08);
}

.dv-button-light:hover {
    background: var(--dv-primary-soft);
}

/* AI WORKSPACE */

.dv-workspace-card {
    min-height: 0;
    padding: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(52, 86, 150, 0.05), transparent 34%),
        #ffffff;
}

.dv-workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dv-progress-title {
    margin: 0;
    color: var(--dv-primary);
    font-size: 24px;
    line-height: 1.2;
}

.dv-workspace-status {
    margin: 6px 0 0;
    color: var(--dv-muted);
    font-size: 14px;
}

.dv-estimated-time {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--dv-primary-soft);
    color: var(--dv-primary);
    font-size: 13px;
    font-weight: 700;
}

.dv-overall-progress {
    margin-bottom: 16px;
}

.dv-overall-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.dv-overall-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--dv-primary),
        var(--dv-primary-light)
    );
    transition: width 0.35s ease;
}

.dv-overall-progress-text {
    margin-top: 7px;
    color: var(--dv-muted);
    font-size: 13px;
    text-align: right;
}

/* TWO VIEW GRID */

.dv-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dv-view-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dv-view-slot {
    overflow: hidden;
    border: 1px solid var(--dv-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--dv-shadow-soft);
}

.dv-view-grid-two .dv-view-slot {
    min-height: 420px;
}

.dv-view-slot.is-active {
    border-color: rgba(52, 86, 150, 0.48);
    box-shadow: 0 10px 24px rgba(52, 86, 150, 0.14);
}

.dv-view-slot.is-done {
    border-color: rgba(25, 135, 84, 0.28);
}

.dv-view-slot.is-error {
    border-color: rgba(180, 35, 24, 0.36);
}

.dv-view-stage {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top right,
            rgba(52, 86, 150, 0.13),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #fbfdff,
            #edf3fb
        );
}

.dv-view-grid-two .dv-view-stage {
    aspect-ratio: 4 / 3;
}

.dv-view-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    color: var(--dv-primary);
    text-align: center;
}

.dv-view-placeholder strong {
    font-size: 17px;
}

.dv-view-placeholder span {
    color: var(--dv-muted);
    font-size: 13px;
}

.dv-view-placeholder small {
    color: #8a96a8;
    font-size: 12px;
}

.dv-view-loader {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(52, 86, 150, 0.18);
    border-top-color: var(--dv-primary);
    border-radius: 50%;
    animation: dv-spin 0.9s linear infinite;
}

.dv-result-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-result-body {
    padding: 11px;
}

.dv-result-title {
    margin: 0 0 9px;
    color: var(--dv-primary);
    font-size: 16px;
    text-align: center;
}

.dv-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.dv-result-actions .dv-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
}

/* SELECTED SUMMARY */

.dv-selected-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--dv-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(52, 86, 150, 0.05), transparent 34%),
        #ffffff;
    box-shadow: var(--dv-shadow-soft);
}

.dv-selected-summary-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.dv-selected-summary-label {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    background: var(--dv-primary-soft);
    color: var(--dv-primary);
    font-size: 13px;
    font-weight: 700;
}

.dv-selected-summary-head h2 {
    margin: 10px 0 0;
    color: var(--dv-primary);
    font-size: 28px;
    line-height: 1.25;
    text-align: center;
}

.dv-selected-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.dv-selected-chip {
    padding: 10px 16px;
    border: 1px solid #d9e6f4;
    border-radius: 30px;
    background: #eef5fc;
    color: var(--dv-primary);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.dv-selected-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dv-selected-detail-row {
    padding: 14px;
    border: 1px solid var(--dv-border);
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.dv-selected-detail-row strong {
    display: block;
    margin-bottom: 6px;
    color: var(--dv-primary);
}

.dv-selected-detail-row span {
    color: var(--dv-text);
}

/* ALERTS */

.dv-alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 11px;
    text-align: center;
}

.dv-alert-warning {
    background: var(--dv-warning-bg);
    color: var(--dv-warning-text);
}

.dv-alert-error {
    background: #fff1f1;
    color: var(--dv-danger);
}

.dv-hidden {
    display: none !important;
}

.dv-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: dv-spin 0.8s linear infinite;
}

@keyframes dv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* TABLET */

@media (max-width: 980px) {
    .dv-container {
        max-width: 760px;
    }

    .dv-main-grid {
        grid-template-columns: 1fr;
    }

    .dv-workspace-card {
        min-height: 0;
    }

    .dv-selected-summary-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dv-selected-details {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */

@media (max-width: 680px) {
    .dv-page {
        padding: 14px 10px 36px;
    }

    .dv-hero {
        width: 100%;
        margin-bottom: 14px;
        padding: 16px 12px;
        border-radius: 16px;
    }

    .dv-hero h1 {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        font-size: 24px;
        line-height: 1.25;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .dv-form-card {
        padding: 17px 14px;
    }

    .dv-card-title {
        margin-bottom: 17px;
        font-size: 21px;
    }

    .dv-field {
        margin-bottom: 14px;
    }

    .dv-label,
    .dv-legend {
        margin-bottom: 9px;
        font-size: 14px;
        text-align: center;
    }

    .dv-input,
    .dv-select {
        min-height: 48px;
        text-align: center;
    }

    .dv-fieldset {
        padding: 11px;
    }

    .dv-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
        gap: 8px;
    }

    .dv-check {
        grid-template-columns: 18px minmax(0, 1fr);
        min-height: 62px;
        padding: 9px 8px;
        gap: 6px;
    }

    .dv-check input {
        width: 16px;
        height: 16px;
    }

    .dv-check span {
        font-size: 12px;
        line-height: 1.25;
    }

    .dv-workspace-card {
        padding: 14px;
    }

    .dv-workspace-head {
        align-items: center;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .dv-progress-title {
        font-size: 21px;
        text-align: center;
    }

    .dv-workspace-status {
        text-align: center;
    }

    .dv-estimated-time {
        align-self: center;
    }

    .dv-overall-progress-text {
        text-align: center;
    }

    .dv-view-grid,
    .dv-view-grid-two {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dv-view-grid-two .dv-view-slot {
        min-height: auto;
    }

    .dv-result-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .dv-result-actions .dv-button {
        width: 100%;
    }

    .dv-selected-summary {
        padding: 18px;
    }

    .dv-selected-summary-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dv-selected-summary-head h2 {
        font-size: 23px;
        text-align: center;
    }

    .dv-selected-details {
        grid-template-columns: 1fr;
    }
}

/* VERY SMALL PHONES */

@media (max-width: 390px) {
    .dv-page {
        padding-right: 8px;
        padding-left: 8px;
    }

    .dv-form-card {
        padding-right: 11px;
        padding-left: 11px;
    }

    .dv-fieldset {
        padding: 9px;
    }

    .dv-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .dv-check {
        grid-template-columns: 16px minmax(0, 1fr);
        min-height: 64px;
        padding: 8px 6px;
        gap: 5px;
    }

    .dv-check input {
        width: 15px;
        height: 15px;
    }

    .dv-check span {
        font-size: 11px;
        line-height: 1.2;
    }

    .dv-result-actions {
        grid-template-columns: 1fr;
    }

    .dv-selected-chip {
        width: 100%;
        text-align: center;
    }
}