/* Premium Organize PDF page styling matching tasarim_kodlari/organize-pdf.html */

#tool-workspace {
    max-width: 1500px;
    margin: 0 auto;
    padding: 10px 0 54px;
}

.main-layout {
    display: grid;
    grid-template-columns: 1.75fr 0.82fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.dropzone {
    border: 2px dashed #a78bfa;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #faf7ff);
    min-height: 215px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover {
    border-color: #FF8A3D;
    background: linear-gradient(180deg, #ffffff, #f5f0ff);
}

.drop-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF5A3C, #FF8A3D);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
}

.dropzone h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}

.dropzone .or {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.dropzone p {
    margin-top: 14px;
    color: #64748b;
    font-size: 14px;
}

.file-info {
    display: grid;
    grid-template-columns: 1fr 140px 150px 150px 48px;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    margin-bottom: 14px;
}

.file-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-icon {
    width: 44px;
    height: 52px;
    border-radius: 8px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.pdf-icon::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-top: 12px solid #fecaca;
    border-left: 12px solid transparent;
    border-radius: 0 8px 0 0;
}

.file-title {
    font-weight: 800;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-meta {
    color: #64748b;
    font-size: 14px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 700;
}

.stat-value {
    font-weight: 900;
    font-size: 17px;
}

.delete-file-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-file-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fee2e2;
}

/* Organize Workspace Page CSS */
.organize-card {
    padding: 22px 24px 26px;
    position: relative;
    overflow: hidden;
}

.pages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.pages-header h3 {
    font-size: 18px;
    font-weight: 850;
    white-space: nowrap;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.action-btn {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #334155;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.action-btn.danger {
    color: #ef4444;
    border-color: #fecaca;
    background: #fff7f7;
}

.action-btn.danger:hover {
    background: #fee2e2;
}

.action-btn.active {
    background: #eef2ff;
    color: #FF5A3C;
    border-color: #c7d2fe;
}

.thumb-wrapper {
    position: relative;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #FF5A3C;
    font-size: 28px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    z-index: 5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    user-select: none;
}

.nav-arrow:hover {
    background: #f8fafc;
    transform: translateY(-50%) scale(1.05);
}

.nav-arrow.left {
    left: -22px;
}

.nav-arrow.right {
    right: -22px;
}

.page-thumbs {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 14px;
    scroll-behavior: smooth;
}

.page-thumb {
    width: 150px;
    flex: 0 0 150px;
    text-align: center;
    position: relative;
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-thumb.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.thumb-card {
    height: 185px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
    position: relative;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    cursor: grab;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.thumb-card:active {
    cursor: grabbing;
}

.thumb-card.selected {
    border: 2px solid #FF5A3C;
    box-shadow: 0 10px 28px rgba(255, 90, 60, 0.15);
}

.check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 21px;
    height: 21px;
    border-radius: 6px;
    background: #e2e8f0;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    z-index: 2;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: background-color 0.2s, border-color 0.2s;
}

.thumb-card.selected .check {
    background: #FF5A3C;
    border-color: #FF5A3C;
    color: white;
}

.drag-dots {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #94a3b8;
    font-size: 18px;
    letter-spacing: -2px;
    line-height: 1;
    pointer-events: none;
}

.paper-content {
    width: 100%;
    height: 135px;
    margin-top: 18px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease;
}

.paper-content canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.thumb-number {
    margin-top: 9px;
    font-weight: 900;
    font-size: 15px;
}

.scrollbar {
    height: 7px;
    background: #e5e7eb;
    border-radius: 99px;
    margin-top: 12px;
    overflow: hidden;
    position: relative;
}

.scrollbar span {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: 99px;
    background: #cbd5e1;
    position: absolute;
    left: 0;
    transition: left 0.1s ease, width 0.2s ease;
}

/* Page Thumbnail Rotations */
.rotate-90 {
    transform: rotate(90deg);
}

.rotate-180 {
    transform: rotate(180deg);
}

.rotate-270 {
    transform: rotate(270deg);
}

/* Settings Card CSS */
.settings-card {
    padding: 28px;
}

.settings-card h2 {
    font-size: 21px;
    margin-bottom: 28px;
    font-weight: 800;
}

.form-group {
    margin-bottom: 26px;
}

.form-group label,
.section-label {
    display: block;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 800;
}

.reorder-box {
    height: 64px;
    border: 1px solid #c4b5fd;
    border-radius: 11px;
    background: #faf5ff;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    font-weight: 800;
}

.reorder-icon {
    color: #FF8A3D;
    font-size: 24px;
}

.add-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.add-card {
    height: 92px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    text-align: center;
}

.add-card:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.add-card span:first-child {
    font-size: 28px;
    color: #64748b;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: "⌄";
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #475569;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.select-box-custom {
    padding-right: 30px;
}

.select-box {
    height: 48px;
    border: 1px solid #dbe1ea;
    border-radius: 10px;
    padding: 0 14px;
    background: #ffffff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
}

.select-box select {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
}

.rotate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rotate-btn-small {
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.rotate-btn-small:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: #475569;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: #FF5A3C;
    cursor: pointer;
}

.organize-btn {
    width: 100%;
    height: 58px;
    font-size: 17px;
    border-radius: 12px;
    margin-top: 4px;
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, #FF5A3C, #FF8A3D) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 13px 22px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255, 90, 60, 0.25);
    transition: opacity 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.safe-note {
    margin-top: 17px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.safe-note strong {
    color: #16a34a;
}

/* Blank page representation inside thumbnail content */
.blank-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

.blank-page-icon {
    font-size: 32px;
    margin-bottom: 4px;
    color: #cbd5e1;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 38px;
    overflow: hidden;
    width: 100%;
}

.feature {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 28px 34px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature:first-child {
    border-radius: 18px 0 0 18px;
}

.feature:last-child {
    border-radius: 0 18px 18px 0;
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.green {
    background: #dcfce7;
    color: #16a34a;
}

.purple {
    background: #f3e8ff;
    color: #FF8A3D;
}

.blue {
    background: #dbeafe;
    color: #2563eb;
}

.feature h3 {
    font-size: 18px;
    margin-bottom: 7px;
    font-weight: 700;
}

.feature p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* Utilities */
.disabled-opacity {
    opacity: 0.5;
    pointer-events: none;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

    .feature,
    .feature:first-child,
    .feature:last-child {
        border-radius: 18px;
    }

    .file-info {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
        justify-items: center;
    }
    
    .pages-header {
        flex-direction: column;
        align-items: center;
    }

    .action-bar {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .position-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col,
    .rotate-grid,
    .add-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
