/* Premium B2B SaaS Aesthetics - Watermark Theme */
:root {
    --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --hover-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --border-color: #e2e8f0;
    --primary-color: #e11d48;
}

body {
    background-color: var(--background-color);
}

.tool-header {
    background: white;
    padding: 40px 15px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

/* Premium Upload Area */
.upload-area {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .upload-area {
        padding: 80px 40px;
    }
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.upload-area:hover, .upload-area.dragover {
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(225, 29, 72, 0.2);
}

.upload-area:hover::before, .upload-area.dragover::before {
    opacity: 0.03;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #ffe4e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.5);
    animation: pulse 2s infinite;
}

@media (min-width: 768px) {
    .upload-icon-wrapper {
        width: 100px;
        height: 100px;
        margin: 0 auto 24px;
    }
}

.upload-icon-wrapper i {
    color: var(--primary-color) !important;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.btn-premium {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background: var(--hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
    color: white;
}

/* Custom Tabs */
.custom-tabs {
    border-bottom: 2px solid #f1f5f9;
}
.custom-tabs .nav-link {
    color: #64748b;
    border-radius: 12px 12px 0 0;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}
.custom-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    position: relative;
}
.custom-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}
.custom-tabs .nav-link:hover:not(.active) {
    color: #334155;
    background: #f8fafc;
}

/* Position Grid 3x3 */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 80px;
    height: 80px;
    gap: 2px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.pos-cell {
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pos-cell:hover {
    background: #f1f5f9;
}

.pos-cell.active {
    background: var(--primary-color);
}
.pos-cell.active::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
}

/* PDF Preview Canvas */
.page-preview-wrapper {
    position: relative;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

.page-preview-wrapper canvas {
    max-width: 100%;
    display: block;
}

.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
}

/* Layer Toggle Styling */
.btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.btn-outline-primary {
    color: #475569;
    border-color: #cbd5e1;
}
.btn-outline-primary:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}
