.watermark-layout {
    display: flex;
    gap: 25px;
    min-height: 700px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .watermark-layout {
        flex-direction: column;
        height: auto;
    }
}

.watermark-sidebar {
    width: 380px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    max-height: 750px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
    .watermark-sidebar {
        width: 100%;
        max-height: none;
    }
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    background: #f8fafc;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-tab:first-child {
    border-top-left-radius: var(--radius-lg);
}

.sidebar-tab:last-child {
    border-top-right-radius: var(--radius-lg);
}

.sidebar-tab:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
}

.sidebar-tab.active {
    background: #fff;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--primary-blue);
}

.sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.control-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.control-panel.active {
    display: block;
}

.control-section {
    margin-bottom: 25px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 20px;
}

.control-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.watermark-workspace {
    flex: 1;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.canvas-wrapper {
    position: relative;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s;
    display: inline-block;
    line-height: 0;
}

.canvas-wrapper img#mainImage {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 75vh;
    pointer-events: none;
    user-select: none;
}

.watermark-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.watermark-item {
    position: absolute;
    cursor: move;
    cursor: grab;
    user-select: none;
    border: 1px dashed transparent;
    transform-origin: center center;
    max-width: 100%;
}

.watermark-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
    outline: 1px dashed var(--primary-blue);
}

.watermark-item.grabbing {
    cursor: grabbing;
}

.upload-box-small {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s;
}

.upload-box-small:hover {
    border-color: var(--primary-blue);
    background: #eff6ff;
    color: var(--primary-blue);
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mode-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.slider-group {
    margin-bottom: 15px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.watermark-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
}

.pattern-preview {
    width: 100%;
    height: 100px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #eee;
}

.notification-upload {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #94a3b8;
    pointer-events: none;
}