/* === App UI === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e8e8e8;
    color: #333;
    min-height: 100vh;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a1a2e;
    color: #fff;
    padding: 0 20px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.toolbar-brand:hover {
    color: #a8d8ff;
}

.toolbar-separator {
    color: #555;
}

.toolbar-product {
    color: #aaa;
    font-size: 14px;
}

.toolbar-center {
    display: flex;
    gap: 4px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.btn.active {
    background: #3a7bd5;
    border-color: #3a7bd5;
    color: #fff;
}

.btn-print {
    background: #2d6a30;
    border-color: #2d6a30;
    color: #fff;
}

.btn-print:hover {
    background: #3a8a3e;
}

.btn-pdf {
    background: #8b2252;
    border-color: #8b2252;
    color: #fff;
}

.btn-pdf:hover {
    background: #a52a6a;
}

.zoom-level {
    color: #aaa;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Preview area */
.preview-mode {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.sheet-wrapper {
    transform-origin: top center;
    transition: transform 0.2s ease;
}

.sheet-wrapper[data-side="back"].hidden,
.sheet-wrapper[data-side="front"].hidden {
    display: none;
}

.sheet-label {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sector hover */
.sector {
    position: relative;
    cursor: default;
    transition: box-shadow 0.15s;
}

.sector:hover:not(.sector-empty) {
    box-shadow: inset 0 0 0 1px #3a7bd5;
    z-index: 1;
}

.sector::after {
    content: attr(data-lang);
    position: absolute;
    top: 2mm;
    right: 2mm;
    font-size: 5pt;
    color: #ccc;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.sector:hover::after {
    opacity: 1;
}

/* Index page */
.page-index {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.page-index h1 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1a1a2e;
}

.product-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.product-card:hover {
    border-color: #3a7bd5;
    box-shadow: 0 2px 12px rgba(58,123,213,0.12);
}

.product-card-name {
    font-weight: 600;
    font-size: 16px;
}

.product-card-format {
    color: #888;
    font-size: 13px;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #999;
    padding: 60px 20px;
}
