.btn-logout {
    width: 100%;
    background: transparent;
    color: #94a3b8;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #1e293b;
    cursor: pointer;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
    transform: translateY(-1px);
}

.dropzone[data-busy="true"] {
    pointer-events: none;
    opacity: 0.6;
}

.card {
    background: #0f172a;
    border: 1px solid rgba(250, 204, 21, 0.2);
    padding: 16px;
    border-radius: 20px;
}

.highlight {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(30, 58, 138, 0.4));
}

.title {
    font-size: 18px;
    margin-bottom: 12px;
    color: #facc15;
}

.price {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #facc15;
}

.input {
    width: 100%;
    background: #020617;
    border: 1px solid #1e293b;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    color: white;
    transition: all 0.25s ease;
}

.input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
    transform: translateY(-2px);
    outline: none;
}

.input.input-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
    background: rgba(127, 29, 29, 0.18);
}

.dropzone {
    border: 2px dashed #1e293b;
    padding: 30px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #64748b;
    transition: background 0.15s ease, border-color 0.15s ease, padding 0.15s ease;
}

.dropzone.dragover {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.1);
}

.dropzone.has-files {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 16px;
}

.dz-placeholder {
    text-align: center;
    line-height: 1.25;
    user-select: none;
    padding: 8px 10px;
}

.dz-placeholder strong {
    color: #cbd5e1;
    font-weight: 600;
}

.dz-hint {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    color: #64748b;
}

.dz-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.dz-item {
    width: 140px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dz-thumb {
    width: 100%;
    height: 90px;
    border-radius: 10px;
    background: #0b1120;
    border: 1px solid rgba(250, 204, 21, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dz-icon {
    font-size: 22px;
    color: #94a3b8;
}

.dz-name {
    font-size: 12px;
    color: #cbd5e1;
    word-break: break-word;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

.dz-size {
    font-size: 11px;
    color: #94a3b8;
    margin-top: -4px;
}

.dz-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.9);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.dz-remove:hover {
    transform: scale(1.05);
    border-color: #facc15;
    color: #facc15;
}

.dz-actions {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.dz-action {
    width: 34px;
    height: 34px;
    border: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.9);
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 16px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dz-action:hover {
    transform: translateY(-1px);
    border-color: #facc15;
    color: #facc15;
}

.dropzone[data-rotate="true"].has-files {
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.dropzone[data-rotate="true"] .dz-items {
    justify-content: center;
}

.dropzone[data-rotate="true"] .dz-item {
    width: min(560px, 100%);
}

.dropzone[data-rotate="true"] .dz-thumb {
    height: 320px;
}

.dropzone[data-rotate="true"] .dz-thumb img {
    object-fit: contain;
    background: #0b1120;
}

.dropzone[data-carousel="true"] .dz-items {
    width: 100%;
    display: flex;
    justify-content: center;
}

.dz-viewer {
    width: min(720px, 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dz-viewer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dz-counter {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.dz-viewer-main {
    position: relative;
    width: 100%;
    height: 340px;
    border-radius: 14px;
    background: #0b1120;
    border: 1px solid rgba(250, 204, 21, 0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-viewer-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.dz-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.7);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
}

.dz-nav[disabled] {
    opacity: 0.35;
    cursor: default;
}

.dz-nav:hover:not([disabled]) {
    border-color: #facc15;
    color: #facc15;
}

.dz-nav.prev {
    left: 10px;
}

.dz-nav.next {
    right: 10px;
}

.dz-viewer-actions {
    display: flex;
    justify-content: center;
}

.dz-error {
    margin-top: 10px;
    font-size: 12px;
    color: #fca5a5;
    display: none;
    width: 100%;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn {
    width: 100%;
    background: #1e3a8a;
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
    font-weight: 500;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #facc15;
    color: black;
    transform: scale(1.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================
   BLOCK: Приложения (миниатюры + скролл + порядок)
   ========================= */

.dropzone.dropzone-attachments,
.dropzone.dropzone-graphics {
    height: clamp(220px, 60vh, 420px);
    min-height: 0;
    max-height: clamp(220px, 60vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    justify-content: flex-start;
    align-content: flex-start;
    box-sizing: border-box;
}

.dropzone.dropzone-attachments.has-files,
.dropzone.dropzone-graphics.has-files {
    padding: 16px;
}

.dropzone.dropzone-attachments .dz-items,
.dropzone.dropzone-graphics .dz-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    width: 100%;
    justify-content: start;
}

.dropzone.dropzone-attachments .dz-item,
.dropzone.dropzone-graphics .dz-item {
    width: 100%;
    min-width: 0;
    cursor: grab;
    user-select: none;
}

.dropzone.dropzone-attachments .dz-thumb,
.dropzone.dropzone-graphics .dz-thumb {
    height: 100px;
}

.dropzone.dropzone-attachments .dz-remove,
.dropzone.dropzone-graphics .dz-remove {
    top: 4px;
    right: 4px;
}

.dropzone.dropzone-attachments .dz-rotate,
.dropzone.dropzone-graphics .dz-rotate {
    position: absolute;
    bottom: 4px;
    left: 4px;
    z-index: 6;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.9);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    padding: 0;
}

.dropzone.dropzone-attachments .dz-rotate:hover,
.dropzone.dropzone-graphics .dz-rotate:hover {
    transform: scale(1.05);
    border-color: #facc15;
    color: #facc15;
}

/* В «Приложениях» имя/размер не показываем — там миниатюры картинок */
.dropzone.dropzone-attachments .dz-name,
.dropzone.dropzone-attachments .dz-size {
    display: none;
}

/* В «Графических приложениях» имя PDF показываем под миниатюрой,
   чтобы можно было различить несколько файлов */
.dropzone.dropzone-graphics .dz-name {
    font-size: 11px;
    color: #cbd5e1;
    text-align: center;
    word-break: break-word;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
    padding: 0 2px;
    margin-top: -2px;
}

.dropzone.dropzone-graphics .dz-size {
    display: none;
}

.dropzone.dropzone-attachments::-webkit-scrollbar,
.dropzone.dropzone-graphics::-webkit-scrollbar {
    width: 8px;
}

.dropzone.dropzone-attachments::-webkit-scrollbar-track,
.dropzone.dropzone-graphics::-webkit-scrollbar-track {
    background: #020617;
    border-radius: 4px;
}

.dropzone.dropzone-attachments::-webkit-scrollbar-thumb,
.dropzone.dropzone-graphics::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

.dropzone.dropzone-attachments::-webkit-scrollbar-thumb:hover,
.dropzone.dropzone-graphics::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* =============== LOADING OVERLAY =============== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 17, 32, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.loading-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-container {
    background: #0f172a;
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(250, 204, 21, 0.2);
    border-top: 4px solid #facc15;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    color: #facc15;
    margin-bottom: 20px;
}

.loading-status {
    font-size: 14px;
    color: #cbd5e1;
    min-height: 60px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.status-item {
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: slideIn 0.4s ease-out;
    color: #cbd5e1;
}

.status-item.active {
    color: #facc15;
    font-weight: 500;
}

.status-icon {
    font-size: 18px;
    min-width: 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(250, 204, 21, 0.1);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #facc15, #1e3a8a);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 16px;
    font-weight: 600;
    color: #facc15;
    margin-top: 12px;
    text-align: center;
    min-height: 24px;
}

/* Стиль для кнопки-ссылки */
.btn-about-generator {
    display: inline-block;
    background: #1e3a8a;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-about-generator:hover {
    background: #facc15;
    color: black;
    transform: scale(1.02);
}

.btn-about-generator-wrapper {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .btn-about-generator-wrapper {
        margin-bottom: 1.5rem;
    }
}

.hidden { display: none !important; }
