/* ---------------------------------------------------------
   GLOBAL
--------------------------------------------------------- */
body {
    background: #111;
    color: #eee;
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 20px;
}

/* ---------------------------------------------------------
   MAIN LAYOUT
--------------------------------------------------------- */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
}

.left-panel,
.center-panel,
.right-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.center-panel {
    text-align: center;
}

/* ---------------------------------------------------------
   PLATE THUMBNAIL GRID
--------------------------------------------------------- */
.material-option {
    display: block;
    margin: 4px 0;
}

.left-panel .plate-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 180vh;
    padding-right: 4px;
}

.plate-list img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    display: block;
    transition: 0.15s;
    box-sizing: border-box;
}

.plate-list img:hover {
    border-color: #4af;
    box-shadow: 0 0 8px rgba(64, 160, 255, 0.7);
    transform: scale(1.05);
}

.plate-list img.selected {
    border-color: #4af;
    box-shadow: 0 0 8px rgba(64, 160, 255, 0.9);
}

/* ---------------------------------------------------------
   SVG DISPLAY
--------------------------------------------------------- */
#svgContainer svg {
    position: relative;
    display: inline-block;
    overflow: hidden;
    max-width: 195mm;
    width: 100%;
    height: auto;
    min-width: 260px;
}

.svg-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.svg-actions label {
    font-size: 0.9rem;
    color: #ccc;
}

.svg-actions input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
}

/* ---------------------------------------------------------
   BUTTON + ROTARY GRIDS
--------------------------------------------------------- */
.cap-grid,
.rotary-grid,
.function-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.cap-grid {
    grid-template-columns: repeat(3, 1fr);
}

.rotary-grid {
    grid-template-columns: repeat(2, 1fr);
}

.rotary-grid.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
}

.rotary-grid img[data-rotary="black13mm"] {
    width: 33.75%;
    justify-self: center;
    align-self: center;
}

.rotary-grid img[data-rotary="red29mm"] {
    width: 75%;
    justify-self: center;
    align-self: center;
}

.rotary-disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
}

.function-grid {
    grid-template-columns: repeat(3, 1fr);
}

.cap-grid img,
.rotary-grid img {
    width: 75%;
    justify-self: center;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.15s;
}

.cap-grid img:hover,
.rotary-grid img:hover {
    transform: scale(1.05);
}

/* ---------------------------------------------------------
   FUNCTION BUTTONS
--------------------------------------------------------- */
.func {
    background: #222;
    padding: 3px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: 0.15s;
}

.func:hover {
    transform: scale(1.05);
}

/* ---------------------------------------------------------
   EXPORT BUTTON
--------------------------------------------------------- */
.export-btn {
    padding: 10px;
    background: #2a7;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.export-btn:hover {
    background: #3c9;
}

/* ---------------------------------------------------------
   ACTIVE BUTTON HIGHLIGHT
--------------------------------------------------------- */
image.active {
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* ---------------------------------------------------------
   CUSTOMER NAME INPUT
--------------------------------------------------------- */
.customer-name-block {
    margin-bottom: 20px;
}

.customer-name-block label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #ccc;
}

#customerName {
    width: 260px;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #333;
    background: #222;
    color: #eee;
    font-size: 14px;
    outline: none;
    transition: 0.15s;
}

#customerName:focus {
    border-color: #4af;
}