/* Embart Studio 2026 - Comprehensive Professional Theme */
:root {
    --bg-main: #ece9d8;
    --bg-toolbar: #f0f0f0;
    --border-color: #a0a0a0;
    --border-light: #e0e0e0;
    --active-blue: #0570e6;
    --btn-hover: #e2eaf5;
    --text-color: #111111;
    --font-ui: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: var(--font-ui);
    font-size: 11px;
    background-color: var(--bg-main);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 1. TOP MENU BAR */
.menu-bar {
    background: #f7f7f7;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 1px 4px;
    font-size: 11px;
    height: 24px;
}

.menu-item {
    padding: 2px 7px;
    cursor: pointer;
    border-radius: 2px;
}

.menu-item:hover {
    background-color: var(--btn-hover);
    color: var(--active-blue);
}

.brand-badge {
    font-weight: bold;
    color: #b71c1c;
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

/* 2. TOOLBAR ROWS */
.toolbar-row {
    background: #f1f1f1;
    border-bottom: 1px solid #d0d0d0;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    gap: 2px;
    height: 28px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 1px;
    border-right: 1px solid #d0d0d0;
    padding-right: 4px;
    margin-right: 3px;
}

.tool-btn {
    min-width: 24px;
    height: 22px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    color: #333;
}

.tool-btn:hover {
    background-color: var(--btn-hover);
    border-color: var(--active-blue);
}

.tool-btn.active {
    background-color: #cce4f7;
    border-color: var(--active-blue);
}

.tool-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.input-box {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    margin: 0 1px;
}

.input-box span {
    font-size: 10px;
    color: #333;
}

.input-box input {
    width: 44px;
    height: 18px;
    padding: 1px 3px;
    border: 1px solid #aaa;
    font-size: 10px;
    text-align: right;
    background: white;
}

.input-box select {
    height: 19px;
    font-size: 10px;
    border: 1px solid #aaa;
    background: white;
}

.toolbar-label {
    font-weight: 600;
    font-size: 10px;
    color: #444;
    margin: 0 4px 0 2px;
}

/* 3. MAIN WORKSPACE */
.workspace {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Left Tools Bar (Double Column or Wide CAD Bar) */
.left-tools-bar {
    width: 54px;
    background: #f4f4f4;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 3px 2px;
    gap: 2px;
    z-index: 10;
    overflow-y: auto;
}

.left-tools-bar .tool-btn {
    width: 23px;
    height: 23px;
    font-size: 11px;
}

/* Center Canvas Container */
.canvas-container {
    flex: 1;
    position: relative;
    background: #808080;
    overflow: hidden;
}

/* Floating Hoop Selector Bar */
.floating-hoop-bar {
    position: absolute;
    top: 6px;
    left: 45px;
    background: rgba(245, 245, 245, 0.96);
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    z-index: 20;
    font-size: 10px;
}

.floating-hoop-bar select {
    height: 20px;
    font-size: 11px;
}

/* Right Dock Panels */
.right-dock {
    width: 270px;
    background: #f9f9f9;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.dock-tabs {
    display: flex;
    background: #e4e4e4;
    border-bottom: 1px solid #ccc;
}

.dock-tab {
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    border-right: 1px solid #ccc;
    background: #e4e4e4;
}

.dock-tab.active {
    background: #f9f9f9;
    border-bottom: 1px solid #f9f9f9;
    color: var(--active-blue);
}

.dock-content {
    flex: 1;
    padding: 6px;
    overflow-y: auto;
}

.prop-group {
    margin-bottom: 8px;
    border: 1px solid #ddd;
    background: white;
    padding: 6px;
    border-radius: 2px;
}

.prop-title {
    font-weight: bold;
    font-size: 10px;
    color: #333;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
}

.prop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.prop-row label {
    font-size: 10px;
}

.prop-row input, .prop-row select {
    width: 95px;
    padding: 1px 3px;
    border: 1px solid #ccc;
    font-size: 10px;
}

/* Right Edge Vertical Tabs */
.vertical-dock-tabs {
    position: absolute;
    right: 0;
    top: 50px;
    display: flex;
    flex-direction: column;
    z-index: 30;
}

.v-tab-btn {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 8px 4px;
    background: #e0e0e0;
    border: 1px solid #bbb;
    border-left: none;
    cursor: pointer;
    font-size: 10px;
    margin-bottom: 2px;
}

.v-tab-btn:hover {
    background: #fff;
}

/* 4. BOTTOM PALETTE & STATUS BAR */
.bottom-palette-bar {
    background: #ebebeb;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 2px 4px;
    gap: 3px;
    height: 34px;
}

.needle-palette {
    display: flex;
    gap: 1px;
    align-items: center;
    margin-right: 4px;
}

.needle-slot {
    width: 19px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 9px;
    color: white;
    border: 1px solid #333;
    cursor: pointer;
    text-shadow: 0 0 2px black;
    border-radius: 1px;
}

.needle-slot.active {
    outline: 2px solid #000;
    transform: scale(1.12);
    z-index: 5;
}

.stitch-player-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    background: #e2e2e2;
    padding: 1px 6px;
    border-radius: 2px;
    border: 1px solid #ccc;
}

.status-bar {
    background: #f0f0f0;
    border-top: 1px solid #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    color: #444;
    height: 20px;
}

/* Top Dropdown Menu */
.dd-item {
    padding: 6px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1e293b;
    font-size: 11px;
}
.dd-item:hover {
    background: #e2e8f0;
    color: #0288d1;
}
.dd-key {
    color: #94a3b8;
    font-size: 10px;
    margin-left: 14px;
}
.dd-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Print production sheet rules */
@media print {
    body * {
        visibility: hidden !important;
    }
    #productionSheetModal, #productionSheetModal * {
        visibility: visible !important;
    }
    #productionSheetModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    #productionSheetModal button {
        display: none !important;
    }
}
