/* === Left Sidebar === */
#left-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Upload Section */
#upload-section {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

#upload-dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

#upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

#upload-dropzone p {
    color: var(--gray-500);
    margin-bottom: 8px;
    font-size: 12px;
}

.upload-hint {
    font-size: 11px !important;
    color: var(--gray-400) !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
}

/* Image List */
#image-list {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
}

.tool-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumbnail-item {
    position: relative;
    width: 60px;
    height: 60px;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--primary);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-item .thumb-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item .thumb-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.thumbnail-item:hover .thumb-remove {
    display: flex;
}

/* Properties Panel */
#properties-panel {
    padding: 12px;
    border-top: 1px solid var(--gray-200);
}

.prop-group {
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.prop-row label {
    font-size: 12px;
    color: var(--gray-600);
    min-width: 80px;
    white-space: nowrap;
}

.prop-row input[type="number"],
.prop-row input[type="text"] {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 12px;
}

.prop-row input[type="range"] {
    flex: 1;
    min-width: 80px;
}

.prop-row span {
    font-size: 12px;
    color: var(--gray-500);
}

.prop-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

#position-info {
    background: var(--gray-50);
    border-radius: 6px;
    padding: 8px 12px !important;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 12px;
}

.info-row span:first-child {
    color: var(--gray-500);
}

.info-row span:last-child {
    font-weight: 600;
}

/* === Right Sidebar === */
#right-sidebar {
    width: var(--right-sidebar-width);
    min-width: var(--right-sidebar-width);
    background: #fff;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
}

#right-sidebar-toggle {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-right: none;
    border-radius: 6px 0 0 6px;
    width: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--gray-400);
}

#right-sidebar-toggle:hover {
    color: var(--gray-600);
}

#right-sidebar-content {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

#right-sidebar-content h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--gray-700);
}

/* Sheet Cards */
.sheet-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.sheet-card.active {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

.sheet-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.sheet-card-header .sheet-icon {
    color: var(--primary);
}

.sheet-card-header .sheet-size {
    font-size: 11px;
    color: var(--gray-500);
}

.sheet-card-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.sheet-card-name .edit-name-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 12px;
}

.sheet-card-images {
    font-size: 11px;
    color: var(--gray-500);
    margin: 4px 0;
}

.sheet-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.sheet-card-footer label {
    font-size: 12px;
    color: var(--gray-600);
}

.sheet-card-footer input {
    width: 50px;
    padding: 2px 6px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 12px;
}

.sheet-card-footer button {
    font-size: 12px;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

/* Sheet Actions */
#sheet-actions {
    margin-top: 12px;
}

.sheet-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    border-radius: 6px;
    transition: background 0.15s;
    font-family: var(--font);
}

.sheet-action-btn:hover {
    background: var(--gray-50);
}

.sheet-action-btn i {
    color: var(--gray-400);
    width: 20px;
    text-align: center;
}

.powered-by {
    text-align: center;
    color: var(--gray-400);
    font-size: 11px;
    padding: 16px 0;
    margin-top: auto;
}

.powered-by a {
    color: var(--primary);
    text-decoration: none;
}
