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

body {
 font-family: "Montserrat", Arial, Helvetica, sans-serif;
 font-weight: 400;
 background: #f4f6f8;
 color: #333;
 min-height: 100vh;
 display: flex;
 flex-direction: column;
}

.container {
 width: 100%;
 padding: 0 20px;
}

.category-container {
 width: 100%;
 padding: 0;
}

.main-container {
 width: 100%;
 padding: 0 20px;
}

:root {
 --green: #6BB540;
 --dark-blue: #002B5C;
 --black: #000;
 --white: #fff;
 --light-gray: #f5f5f5;
 --border-gray: #ddd;
}

.header {
 background: white;
 border-bottom: 1px solid var(--border-gray);
 padding: 0;
 position: sticky;
 top: 0;
 z-index: 1000;
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.header-container {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 20px;
 max-width: 1480px;
 margin: 0 auto;
 padding: 14px 30px;
}

.header-left {
 display: flex;
 align-items: center;
 min-width: 180px;
}

.header-left img {
 height: 50px;
 width: auto;
}

.logo-desktop {
 display: block;
}

.logo-mobile {
 display: none;
}

.nav {
 display: flex;
 align-items: center;
}

.nav-center {
 justify-content: center;
 flex: 1;
}

.nav-link {
 font-size: 14px;
 font-weight: 600;
 color: var(--green);
 text-decoration: none;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 padding: 8px 16px;
 border: 2px solid var(--green);
 border-radius: 4px;
 transition: all 0.3s;
}

.nav-link:hover {
 color: white;
 background: var(--green);
}

.header-right {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 12px;
 min-width: 180px;
}

.header-icon-link {
 width: 34px;
 height: 34px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 color: #111;
 text-decoration: none;
 transition: color 0.2s ease;
}

.header-icon-link svg {
 width: 19px;
 height: 19px;
}

.header-icon-link:hover {
 color: var(--green);
}

.language-switch {
 display: inline-flex;
 align-items: center;
 gap: 8px;
}

.lang-btn {
 width: 24px;
 height: 24px;
 border: 0;
 background: transparent;
 padding: 0;
 cursor: pointer;
 opacity: 0.65;
 transition: transform 0.2s ease, opacity 0.2s ease;
}

.lang-btn img {
 width: 24px;
 height: 24px;
 display: block;
}

.lang-btn.active,
.lang-btn:hover {
 opacity: 1;
 transform: translateY(-1px);
}

.mobile-nav,
.mobile-menu-btn {
 display: none !important;
}

.main {
 flex: 1;
 padding: 20px 0;
 background: var(--light-gray);
 width: 100%;
}

.configurator {
 display: flex;
 flex-direction: column;
 gap: 12px;
 width: 100%;
}

.config-step {
 display: none;
}

.config-step.active {
 display: block;
}

.step-actions {
 display: flex;
 justify-content: space-between;
 gap: 12px;
 flex-wrap: wrap;
}

.step-actions-top {
 display: flex;
 justify-content: flex-start;
 margin-bottom: 16px;
}

.step-actions-generate {
 justify-content: flex-start;
 align-items: center;
 margin: 30px 0;
}

.title {
 font-size: 32px;
 font-weight: 400;
 color: var(--green);
 margin-bottom: 10px;
 letter-spacing: 0.5px;
}

.config-section {
 border: 1px solid var(--border-gray);
 padding: 20px 25px;
 background: white;
}

.section-title {
 font-size: 13px;
 font-weight: 700;
 color: var(--green);
 margin-bottom: 15px;
 text-transform: uppercase;
 letter-spacing: 1px;
}


.config-step[data-step="1"] .config-section {
 padding: 16px 20px;
 margin-bottom: 12px;
}

.config-step[data-step="1"] .section-title {
 margin-bottom: 10px;
 font-size: 12px;
}

.config-step[data-step="1"] .form-row {
 margin-bottom: 15px;
}

.config-step[data-step="1"] .project-setup-section {
 padding: 16px 20px;
}

.form-row {
 display: flex;
 flex-direction: column;
 gap: 18px;
 margin-bottom: 25px;
}

.form-row:last-child {
 margin-bottom: 0;
}

.form-group {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.label {
 font-size: 12px;
 color: #555;
 display: flex;
 align-items: center;
 gap: 8px;
 font-weight: 400;
}

.select {
 height: 42px;
 border: 1px solid var(--border-gray);
 background: white;
 padding: 0 15px;
 font-size: 13px;
 outline: none;
 cursor: pointer;
 width: 100%;
 transition: border 0.3s;
 font-weight: 300;
}

.select:focus {
 border-color: var(--green);
}

.select.small {
 width: 150px;
}

.room-count-field {
 position: relative;
 display: inline-flex;
}

.room-count-field .select.small {
 width: 200px;
}

.room-count-dropdown {
 position: absolute;
 left: 0;
 top: calc(100% + 6px);
 width: 200px;
 padding: 8px;
 border: 1px solid var(--border-gray);
 border-radius: 12px;
 background: #ffffff;
 box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
 display: none;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 6px;
 z-index: 50;
}

.room-count-dropdown.open {
 display: grid;
}

.room-count-option {
 border: 1px solid #e6e6e6;
 border-radius: 10px;
 background: #fbfbfb;
 height: 34px;
 font-size: 12px;
 font-weight: 700;
 color: #1f1f1f;
 cursor: pointer;
 transition: background 0.15s, border-color 0.15s;
}

.room-count-option:hover {
 background: #f0f9f0;
 border-color: var(--green);
}

.info-btn {
 width: 14px;
 height: 14px;
 background: var(--green);
 border: none;
 color: white;
 font-size: 9px;
 font-weight: bold;
 cursor: help;
 transition: background 0.3s;
 border-radius: 50%;
 flex-shrink: 0;
 line-height: 14px;
 text-align: center;
}

.info-btn:hover {
 background: var(--dark-blue);
}

.btn-primary {
 padding: 12px 35px;
 background: var(--green);
 border: none;
 color: white;
 font-size: 12px;
 font-weight: 600;
 cursor: pointer;
 transition: background 0.3s;
 text-transform: uppercase;
 letter-spacing: 0.8px;
 white-space: nowrap;
}

.btn-primary:hover {
 background: var(--dark-blue);
}

.btn-secondary {
 padding: 12px 35px;
 background: #6c757d;
 border: none;
 color: white;
 font-size: 12px;
 font-weight: 700;
 cursor: pointer;
 transition: background 0.3s;
 text-transform: uppercase;
 letter-spacing: 0.8px;
}

.btn-secondary:hover {
 background: var(--dark-blue);
}

.btn-generate {
 padding: 14px 45px;
 font-size: 13px;
}

.room-card {
 border: 1px solid var(--border-gray);
 padding: 30px;
 background: white;
}

.room-title {
 font-size: 18px;
 font-weight: 700;
 color: white;
 margin-bottom: 25px;
 letter-spacing: 0.3px;
 background: var(--green);
 padding: 12px 20px;
 border-radius: 4px;
 display: inline-block;
}

.room-name-input {
 height: 36px;
 border: none;
 border-bottom: 2px solid var(--green);
 padding: 0 10px;
 font-size: 14px;
 font-family: "Montserrat", sans-serif;
 font-weight: 600;
 outline: none;
 width: 300px;
 margin-bottom: 20px;
 box-sizing: border-box;
 background: transparent;
 color: #222;
 display: block;
}

.room-name-input::placeholder {
 color: #bbb !important;
 font-weight: 400;
 font-size: 12px;
}

.room-name-input:focus {
 border-bottom-color: var(--dark-blue);
}

.room-row {
 display: grid;
 grid-template-columns: 220px 1fr;
 gap: 20px;
 align-items: flex-start;
 margin-bottom: 18px;
}

.lighting-zone-row {
 display: flex;
 flex-direction: column;
 gap: 15px;
 margin-bottom: 35px;
 padding-bottom: 20px;
 border-bottom: 1px solid #eee;
}

.zone-control {
 display: flex;
 align-items: center;
 gap: 15px;
 padding: 12px;
 background: var(--light-gray);
 border-left: 3px solid var(--green);
}

.zone-label {
 font-size: 12px;
 color: #555;
 font-weight: 500;
 min-width: 120px;
}

.number-input {
 display: flex;
 align-items: center;
}

.number-input button {
 width: 36px;
 height: 36px;
 border: 1px solid var(--border-gray);
 background: white;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: all 0.3s;
}

.number-input button:hover:not(:disabled) {
 background: var(--green);
 border-color: var(--green);
}

.number-input button:hover:not(:disabled) svg {
 stroke: white;
}

.number-input button:disabled {
 opacity: 0.3;
 cursor: not-allowed;
}

.number-input input {
 width: 50px;
 height: 36px;
 border-top: 1px solid var(--border-gray);
 border-bottom: 1px solid var(--border-gray);
 border-left: none;
 border-right: none;
 text-align: center;
 font-size: 13px;
 outline: none;
}

.type-buttons {
 display: flex;
 gap: 10px;
}

.type-btn {
 padding: 8px 20px;
 border: 1px solid var(--border-gray);
 background: white;
 font-size: 12px;
 color: #555;
 cursor: pointer;
 transition: all 0.3s;
 font-weight: 500;
}

.type-btn.active {
 background: var(--green);
 border-color: var(--green);
 color: white;
}

.type-btn:hover:not(.active) {
 border-color: var(--green);
 color: var(--green);
}

.smart-checkbox {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 10px 15px;
 background: #fffbeb;
 border: 1px solid #ffd700;
 margin-left: 15px;
}

.smart-checkbox input[type="checkbox"] {
 width: 18px;
 height: 18px;
 cursor: pointer;
}

.smart-checkbox label {
 font-size: 12px;
 color: #555;
 cursor: pointer;
 font-weight: 500;
}

.smart-checkbox-simple {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 5px 0;
}

.smart-checkbox-simple input[type="checkbox"] {
 width: 18px;
 height: 18px;
 cursor: pointer;
}

.smart-checkbox-simple label {
 font-size: 12px;
 color: #555;
 cursor: pointer;
 font-weight: 500;
}

.subsection {
 border: 1px solid var(--border-gray);
 background: var(--light-gray);
 padding: 15px;
 margin-bottom: 15px;
}

.subsection-title {
 font-size: 12px;
 font-weight: 600;
 color: #555;
 margin-bottom: 12px;
 display: flex;
 align-items: center;
 gap: 8px;
}

.outlet-buttons {
 display: flex;
 gap: 10px;
 flex-wrap: wrap;
 margin-bottom: 12px;
}

.outlet-btn {
 padding: 8px 18px;
 border: 1px solid var(--border-gray);
 background: white;
 font-size: 11px;
 color: #555;
 cursor: pointer;
 transition: all 0.3s;
 font-weight: 500;
}

.outlet-btn.active {
 background: var(--green);
 border-color: var(--green);
 color: white;
}

.outlet-btn:hover:not(.active) {
 border-color: var(--green);
 color: var(--green);
}

.frame-selector {
 margin-top: 15px;
}

.frame-selector-label {
 font-size: 12px;
 color: #555;
 margin-bottom: 10px;
 display: block;
 font-weight: 500;
}

.frame-cards {
 display: flex;
 flex-wrap: wrap;
 gap: 15px;
}

.frame-card {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 8px;
}

.frame-visual {
 width: 100px;
 height: 70px;
 border: 2px solid var(--border-gray);
 background: white;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: all 0.3s;
 position: relative;
}

.frame-visual:hover {
 border-color: var(--green);
 background: #f0f9f0;
}

.frame-slots {
 display: flex;
 gap: 6px;
}

.frame-slot {
 width: 16px;
 height: 35px;
 border: 1px solid var(--border-gray);
 background: var(--light-gray);
}

.frame-count {
 position: absolute;
 top: 4px;
 right: 6px;
 background: var(--green);
 color: white;
 font-size: 11px;
 font-weight: bold;
 padding: 3px 8px;
 border-radius: 3px;
}

.frame-label {
 font-size: 10px;
 color: #666;
}

.frame-remove {
 background: white;
 border: 1px solid var(--border-gray);
 padding: 4px 12px;
 font-size: 10px;
 cursor: pointer;
 transition: all 0.3s;
}

.frame-remove:hover {
 background: #fee;
 border-color: #f88;
 color: #d00;
}

.tooltip {
 position: absolute;
 background: #333;
 color: white;
 padding: 8px 12px;
 font-size: 11px;
 border-radius: 4px;
 pointer-events: none;
 opacity: 0;
 transition: opacity 0.2s;
 z-index: 1000;
 max-width: 250px;
 line-height: 1.4;
}

.tooltip.show {
 opacity: 1;
}

.tooltip.pinned {
 pointer-events: auto;
 user-select: text;
}

.color-selector {
 margin: 15px 0;
}

.color-selector-label {
 font-size: 12px;
 color: #555;
 font-weight: 500;
 display: block;
 margin-bottom: 10px;
}

.color-options {
 display: flex;
 gap: 10px;
 flex-wrap: wrap;
}

.color-option {
 padding: 8px 15px;
 border: 2px solid var(--border-gray);
 background: white;
 color: var(--text-color);
 font-size: 13px;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.2s;
 border-radius: 4px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.color-option.active {
 background: var(--green);
 border-color: var(--green);
 color: white;
}

.color-option:hover:not(.active) {
 border-color: var(--green);
 color: var(--green);
}

.color-circle {
 display: inline-block;
 width: 16px;
 height: 16px;
 border-radius: 50%;
 margin-right: 8px;
 vertical-align: middle;
 box-shadow: 0 1px 3px rgba(0,0,0,0.2);
 flex-shrink: 0;
}

.reset-btn {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 8px 15px;
 background: white;
 border: 1px solid var(--border-gray);
 color: #555;
 font-size: 12px;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.3s;
 border-radius: 4px;
 margin-top: 20px;
 align-self: flex-end;
}

.reset-btn:hover {
 background: #fee;
 border-color: #f88;
 color: #d00;
}

.reset-btn svg {
 width: 16px;
 height: 16px;
 transition: transform 0.3s;
}

.reset-btn:hover svg {
 transform: rotate(180deg);
}

.sockets-list {
 display: flex;
 flex-direction: column;
 gap: 12px;
 margin: 15px 0;
}

.socket-list-item {
 display: grid;
 grid-template-columns: 150px 1fr;
 gap: 15px;
 align-items: center;
}

.socket-230v-row {
 display: flex;
 gap: 20px;
 align-items: center;
}

.socket-230v-row .socket-label {
 min-width: 80px;
}

.smart-label {
 margin-left: 20px;
}

.socket-controls {
 display: flex;
 align-items: center;
 gap: 15px;
}

.socket-item {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.socket-label {
 font-size: 12px;
 color: #555;
 font-weight: 500;
}

.socket-input {
 display: flex;
 align-items: center;
}

.socket-input button {
 width: 36px;
 height: 36px;
 border: 1px solid var(--border-gray);
 background: white;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: all 0.3s;
}

.socket-input button:hover:not(:disabled) {
 background: var(--green);
 border-color: var(--green);
}

.socket-input button:hover:not(:disabled) svg {
 stroke: white;
}

.socket-input button:disabled {
 opacity: 0.3;
 cursor: not-allowed;
}

.socket-input input {
 width: 50px;
 height: 36px;
 border-top: 1px solid var(--border-gray);
 border-bottom: 1px solid var(--border-gray);
 border-left: none;
 border-right: none;
 text-align: center;
 font-size: 13px;
 outline: none;
}

.project-setup-section {
 border: 1px solid var(--border-gray);
 padding: 30px;
 background: white;
}

.project-setup-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 18px;
 align-items: end;
 max-width: 600px;
}

.project-setup-grid .form-group {
 max-width: 100%;
}

.project-info-text {
 font-size: 11px;
 color: #777;
 line-height: 1.7;
 padding: 15px;
 background: #f9f9f9;
 border-left: 3px solid var(--green);
 margin-top: 10px;
}

.validation-summary {
 margin-bottom: 18px;
 border: 1px solid #f2b8b8;
 border-radius: 16px;
 background: #fff5f5;
 padding: 18px 20px;
}

.validation-summary-title {
 font-size: 14px;
 font-weight: 700;
 color: #a12626;
 margin-bottom: 8px;
}

.validation-summary-text {
 font-size: 12px;
 line-height: 1.6;
 color: #6e3d3d;
}

.validation-summary-list {
 margin: 12px 0 0 18px;
 color: #7f2424;
 font-size: 12px;
 line-height: 1.7;
}

.project-input {
 height: 42px;
 border: 1px solid var(--border-gray);
 padding: 0 15px;
 font-size: 13px;
 font-family: "Montserrat", sans-serif;
 outline: none;
 width: 100%;
 box-sizing: border-box;
 transition: border 0.3s;
 color: #222;
}

.project-input::placeholder {
 color: #bbb !important;
}

.project-input:focus {
 border-color: var(--green);
}

.load-code-row {
 display: flex;
 gap: 10px;
 align-items: center;
}

.load-code-row .project-input {
 flex: 1;
}

.color-end-section {
 border: 1px solid var(--border-gray);
 padding: 30px;
 background: white;
}

.price-section {
 border: 2px solid var(--green);
 padding: 22px 30px;
 background: white;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 20px;
}

.price-value {
 font-size: 34px;
 font-weight: 700;
 color: var(--green);
}

.result-section {
 border: 1px solid var(--border-gray);
 padding: 25px 30px;
 background: white;
 display: none;
}

.project-code-section {
 display: none;
 align-items: center;
 gap: 20px;
 padding: 16px 20px;
 background: var(--light-gray);
 border: 1px dashed var(--green);
 margin-top: 20px;
}

.project-code-display {
 font-size: 24px;
 font-weight: 700;
 color: var(--green);
 letter-spacing: 3px;
 font-family: monospace;
}

.project-code-note {
 font-size: 11px;
 color: #777;
 line-height: 1.6;
}

.personal-label {
 display: block;
 font-size: 11px;
 color: #666;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 margin-bottom: 6px;
}

.required-mark {
 color: var(--green);
}

.personal-input, .personal-textarea {
 width: 100%;
 height: 42px;
 border: 1px solid var(--border-gray);
 padding: 0 15px;
 font-size: 13px;
 font-family: "Montserrat", sans-serif;
 outline: none;
 box-sizing: border-box;
 transition: border 0.3s;
 color: #222;
}

.personal-input::placeholder, .personal-textarea::placeholder {
 color: #bbb !important;
}

.personal-input:focus, .personal-textarea:focus {
 border-color: var(--green);
}

.personal-textarea {
 height: 90px;
 padding: 12px 15px;
 resize: vertical;
}

.personal-form-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 18px;
}

.personal-form-grid .full-width {
 grid-column: 1 / -1;
}

.action-top {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 10px;
 margin-top: 14px;
 margin-bottom: 16px;
}

.action-top-btns {
 display: flex;
 gap: 12px;
 flex-wrap: wrap;
}

.action-top-btns .btn-primary,
.action-top-btns .btn-secondary {
 min-width: 220px;
 text-align: center;
}

.action-bottom {
 display: flex;
 gap: 12px;
 flex-wrap: wrap;
}

.btn-send {
 padding: 14px 35px;
 background: var(--green);
 border: none;
 color: white;
 font-size: 13px;
 font-weight: 700;
 cursor: pointer;
 letter-spacing: 0.5px;
 text-transform: uppercase;
 transition: background 0.3s;
}

.btn-send:hover {
 background: var(--dark-blue);
}

.btn-profile {
 padding: 14px 30px;
 background: white;
 border: 1px solid var(--green);
 color: var(--green);
 font-size: 13px;
 font-weight: 600;
 cursor: pointer;
 letter-spacing: 0.3px;
 transition: all 0.3s;
}

.btn-profile:hover {
 background: var(--green);
 color: white;
}

.matrix-cell-stack.compact {
 gap: 8px;
}

.matrix-zone-list.compact {
 gap: 8px;
}

.matrix-zone-card.compact {
 padding: 8px;
 gap: 8px;
}

.matrix-zone-header.compact {
 margin-bottom: 0;
}

.type-buttons.vertical {
 flex-direction: column;
 gap: 4px;
}

.type-buttons.vertical .type-btn {
 width: 100%;
 padding: 4px 8px;
 font-size: 10px;
}

.btn-with-hitbox {
 position: relative;
 padding: 12px !important;
}

.btn-with-hitbox::before {
 content: '';
 position: absolute;
 top: -8px;
 left: -8px;
 right: -8px;
 bottom: -8px;
 z-index: -1;
}

.custom-footer-main {
 background: #0b0b0b;
 color: #ffffff;
 padding: 56px 0 0;
}

.custom-footer-grid {
 display: grid;
 grid-template-columns: 1.45fr 1fr 1fr 1.1fr;
 gap: 36px;
 max-width: 1280px;
 margin: 0 auto;
 padding: 0 20px;
}

.custom-footer-col img {
 width: 140px;
 height: auto;
 margin-bottom: 16px;
 display: block;
}

.custom-footer-brand {
 width: 110px !important;
}

.custom-footer-contact-block {
 margin-bottom: 24px;
}

.custom-footer-contact-group + .custom-footer-contact-group {
 margin-top: 18px;
}

.custom-footer-icon-list {
 list-style: none;
 display: flex;
 flex-direction: column;
 gap: 7px;
 padding: 0;
 margin: 0;
}

.custom-footer-icon-list li {
 display: flex;
 align-items: center;
 gap: 8px;
 color: #d9d9d9;
 font-size: 13px;
}

.footer-inline-icon {
 width: 14px;
 display: inline-flex;
 justify-content: center;
 color: #ffffff;
 opacity: 0.9;
}

.custom-footer-title {
 font-size: 14px;
 font-weight: 600;
 color: #ffffff;
 margin: 18px 0 10px;
}

.custom-footer-list,
.custom-footer-links {
 display: flex;
 flex-direction: column;
 gap: 8px;
 list-style: none;
 padding: 0;
 margin: 0;
}

.custom-footer-list a,
.custom-footer-links a,
.custom-footer-link {
 color: #d9d9d9;
 text-decoration: none;
 font-size: 13px;
}


.custom-footer-icon-list a,
.custom-footer-contact-block a {
 color: inherit;
 text-decoration: none;
 cursor: default;
}

.custom-footer-icon-list a:hover,
.custom-footer-contact-block a:hover {
 color: inherit;
 text-decoration: none;
}

.custom-footer-list a:hover,
.custom-footer-links a:hover,
.custom-footer-link:hover {
 color: #6bb540;
}

.custom-footer-social {
 display: flex;
 gap: 10px;
 margin-top: 18px;
}

.custom-footer-social a {
 width: 22px;
 height: 22px;
 border-radius: 0;
 border: none;
 display: flex;
 align-items: center;
 justify-content: center;
}

.custom-footer-social svg {
 width: 20px;
 height: 20px;
 fill: #ffffff;
}

.custom-footer-form {
 display: flex;
 flex-direction: column;
 gap: 12px;
 margin-top: 12px;
}

.custom-footer-links-top {
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.custom-footer-input {
 height: 40px;
 padding: 0 12px;
 border: 1px solid #d0d0d0;
 background: #ffffff;
 color: #000000;
}

.custom-footer-input::placeholder {
 color: #000000;
}

.custom-footer-accept {
 display: flex;
 gap: 8px;
 font-size: 12px;
 color: #d9d9d9;
}

.custom-footer-accept a {
 color: #6bb540;
 text-decoration: underline;
}

.custom-footer-button {
 height: 42px;
 background: #6bb540;
 border: none;
 color: #fff;
 font-weight: 600;
 letter-spacing: 0.6px;
 cursor: pointer;
}

.custom-footer-button:hover {
 background: #3dad2a;
}

.custom-footer-bottom-row {
 max-width: 1280px;
 margin: 36px auto 0;
 padding: 0 20px;
 border-top: 1px solid #1f1f1f;
 display: flex;
 justify-content: space-between;
 gap: 20px;
 font-size: 13px;
 font-weight: 600;
 color: #bdbdbd;
}

.custom-footer-policies {
 display: flex;
 flex-wrap: wrap;
 gap: 14px;
 align-items: center;
 justify-content: flex-start;
}

.custom-footer-policies a {
 color: #bdbdbd;
 text-decoration: none;
 font-weight: 600;
}

.custom-footer-policies a:hover {
 color: #6bb540;
}

.custom-footer-bottom {
 background: #000;
 margin-top: 14px;
}

.custom-footer-bottom-inner {
 max-width: 1280px;
 margin: 0 auto;
 padding: 18px 20px;
}

.custom-footer-bottom span {
 font-size: 13px;
 font-weight: 600;
}

@media (min-width: 768px) {
 .nav {
 display: flex;
 }
 
 .mobile-menu-btn {
 display: none;
 }
 
 .form-row {
 flex-direction: row;
 align-items: flex-end;
 }
 
 .form-group {
 flex: 1;
 }
 
 .row-title {
 height: 100%;
 }
}

@media (max-width: 1024px) {
 .header-container {
 flex-wrap: wrap;
 }

 .nav-center {
 order: 3;
 width: 100%;
 justify-content: flex-start;
 }

 .custom-footer-grid {
 grid-template-columns: 1fr 1fr;
 }
 
 .custom-footer-bottom-row {
 flex-direction: column;
 }
 
 .custom-footer-policies {
 justify-content: flex-start;
 }
}

@media (max-width: 768px) {
 .logo-desktop {
 display: none;
 }
 
 .logo-mobile {
 display: block;
 height: 50px !important;
 transform: none !important;
 }
 
 .header-container {
 padding: 12px 20px;
 gap: 14px;
 }

 .header-left,
 .header-right {
 min-width: 0;
 }

 .header-right {
 width: 100%;
 justify-content: space-between;
 }
 
 .category-items {
 grid-template-columns: repeat(2, 1fr);
 gap: 8px;
 }
 
 .category-item {
 padding: 15px 10px;
 font-size: 10px;
 }
 
 .room-card {
 padding: 20px 15px;
 }
 
 .room-row {
 grid-template-columns: 1fr;
 gap: 12px;
 }
 
 .zone-control {
 flex-direction: column;
 align-items: flex-start;
 gap: 10px;
 }
 
 .type-buttons {
 flex-direction: column;
 width: 100%;
 }
 
 .type-btn {
 width: 100%;
 }
 
 .socket-list-item {
 grid-template-columns: 1fr;
 gap: 10px;
 }
 
 .socket-controls {
 flex-direction: column;
 align-items: flex-start;
 gap: 10px;
 }
 
 .socket-input {
 width: 100%;
 }
 
 .socket-input button {
 flex: 0 0 40px;
 }
 
 .socket-input input {
 flex: 1;
 }
 
 .frame-cards {
 grid-template-columns: repeat(2, 1fr);
 }
 
 .color-options {
 flex-direction: column;
 gap: 8px;
 }
 
 .color-option {
 width: 100%;
 text-align: center;
 }
 
 .socket-230v-row {
 display: flex !important;
 flex-direction: column !important;
 gap: 15px !important;
 }
 
 .socket-230v-row .socket-label {
 width: 100% !important;
 }
 
 .socket-230v-row .socket-input {
 width: 100% !important;
 }
 
 .project-setup-grid {
 grid-template-columns: 1fr;
 }
 
 .personal-form-grid {
 grid-template-columns: 1fr;
 }
 
 .price-section {
 flex-direction: column;
 align-items: flex-start;
 }
 
 .room-name-input {
 width: 100%;
 }
 
 .action-top, .action-bottom {
 flex-direction: column;
 }
}

@media (max-width: 480px) {
 .main-container {
 padding: 0 10px;
 }
 
 .title {
 font-size: 20px;
 }
 
 .section-title {
 font-size: 14px;
 }
}

@keyframes pulse-error {
 0%, 100% {
 box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
 transform: scale(1);
 }
 50% {
 box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
 transform: scale(1.02);
 }
}

.frame-validation-panel.invalid {
 animation: pulse-error 1s ease-in-out 3;
}

.bom-table {
 width: 100%;
 border-collapse: collapse;
 font-size: 13px;
}

.bom-table th,
.bom-table td {
 padding: 12px 15px;
 text-align: left;
 border-bottom: 1px solid #e0e0e0;
}

.bom-table th {
 background: #f5f5f5;
 font-weight: 600;
 color: #333;
 font-size: 12px;
 text-transform: uppercase;
 letter-spacing: 0.5px;
}

.bom-table tbody tr:hover {
 background: #f9f9f9;
}

.bom-table td {
 color: #555;
}

.bom-table td:nth-child(4),
.bom-table td:nth-child(5),
.bom-table td:nth-child(6) {
 text-align: right;
}

.bom-table th:nth-child(4),
.bom-table th:nth-child(5),
.bom-table th:nth-child(6) {
 text-align: right;
}

.bom-table tfoot td {
 border-top: 2px solid #ddd;
 padding-top: 15px;
 font-size: 14px;
}

@media (max-width: 768px) {
 .bom-table {
 font-size: 11px;
 }
 .bom-table th,
 .bom-table td {
 padding: 8px 10px;
 }
}

.container {
 max-width: 1480px;
 margin: 0 auto;
}

.configurator {
 max-width: 1400px;
 margin: 0 auto;
 gap: 24px;
 padding-right: 0;
}

.config-section,
.project-setup-section,
.room-card,
.price-section,
.result-section {
 border-radius: 18px;
}

.room-card {
 display: flex;
 flex-direction: column;
 gap: 18px;
 padding: 28px;
 box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.room-card-header {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 20px;
 flex-wrap: wrap;
}

.room-index {
 font-size: 12px;
 text-transform: uppercase;
 letter-spacing: 1.2px;
 color: var(--green);
 font-weight: 700;
 margin-bottom: 10px;
}

.room-title {
 background: none;
 color: var(--dark-blue);
 padding: 0;
 margin: 0;
 display: block;
 font-size: 28px;
 font-weight: 600;
 line-height: 1.2;
}

.room-card-layout {
 display: grid;
 grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
 gap: 18px;
 align-items: start;
}

.room-main-column,
.room-side-column {
 display: flex;
 flex-direction: column;
 gap: 18px;
}

.room-name-input {
 width: 100%;
 height: 46px;
 margin-bottom: 0;
 border: 1px solid var(--border-gray);
 border-bottom: 1px solid var(--border-gray);
 border-radius: 10px;
 padding: 0 14px;
 font-size: 14px;
 font-weight: 500;
 background: white;
}

.room-name-input:focus {
 border-color: var(--green);
}

.room-question {
 border: 1px solid #e7e7e7;
 border-radius: 16px;
 padding: 18px;
 background: #fafafa;
 display: flex;
 flex-direction: column;
 gap: 16px;
}

.room-question-header {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 20px;
 flex-wrap: wrap;
}

.room-question-label {
 font-size: 15px;
 font-weight: 600;
 color: #1f1f1f;
}

.room-question-note {
 margin-top: 6px;
 font-size: 12px;
 line-height: 1.6;
 color: #737373;
 max-width: 620px;
}

.room-question-title-group {
 display: flex;
 align-items: center;
 gap: 10px;
}

.zone-list {
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.zone-control {
 border: 1px solid #e7e7e7;
 border-left: 1px solid #e7e7e7;
 border-radius: 14px;
 background: white;
 padding: 16px;
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.zone-topline {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 flex-wrap: wrap;
}

.zone-label {
 min-width: 0;
 font-size: 14px;
 font-weight: 600;
 color: #1f1f1f;
}

.zone-note {
 font-size: 12px;
 color: #7a7a7a;
 margin-top: 4px;
}

.zone-meta {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 14px;
 flex-wrap: wrap;
}

.smart-toggle {
 display: inline-flex;
 align-items: center;
 gap: 10px;
 padding: 9px 12px;
 border-radius: 999px;
 background: #f2f7ed;
 border: 1px solid #d7e7ca;
 color: #456033;
 font-size: 12px;
 font-weight: 600;
 cursor: pointer;
}

.smart-toggle input {
 width: 16px;
 height: 16px;
}

.smart-pill {
 display: inline-flex;
 align-items: center;
 padding: 9px 12px;
 border-radius: 999px;
 background: #eef4ff;
 border: 1px solid #d2def7;
 color: #35558b;
 font-size: 12px;
 font-weight: 600;
}

.counter-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px;
}

.counter-card {
 border: 1px solid #e5e5e5;
 border-radius: 14px;
 background: white;
 padding: 14px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
}

.counter-card-text {
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.counter-card-label {
 font-size: 13px;
 font-weight: 600;
 color: #2a2a2a;
}

.counter-card-note {
 font-size: 11px;
 line-height: 1.5;
 color: #777;
}

.number-input input {
 background: white;
 font-weight: 600;
}

.type-buttons {
 flex-wrap: wrap;
}

.type-btn {
 border-radius: 999px;
 padding: 10px 16px;
}

.frame-cards {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px;
}

.frame-card {
 border: 1px solid #e7e7e7;
 border-radius: 14px;
 background: white;
 padding: 14px;
}

.frame-label {
 font-size: 11px;
 text-align: center;
}

.frame-remove {
 border-radius: 999px;
}

.room-side-panel {
 border: 1px solid #dde5ee;
 border-radius: 16px;
 background: linear-gradient(180deg, #f9fcff 0%, #f4f8fb 100%);
 padding: 18px;
 display: flex;
 flex-direction: column;
 gap: 16px;
 position: sticky;
 top: 20px;
}

.room-side-title {
 font-size: 15px;
 font-weight: 700;
 color: var(--dark-blue);
}

.room-side-subtitle {
 font-size: 14px;
}

.room-side-note {
 font-size: 12px;
 line-height: 1.6;
 color: #6f7680;
}

.room-side-grid {
 grid-template-columns: 1fr;
}

.room-side-frame-block {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.room-side-frames {
 grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1024px) {
 .room-card-layout {
 grid-template-columns: 1fr;
 }

 .room-side-panel {
 position: static;
 }
}

@media (max-width: 768px) {
 .room-card {
 padding: 20px 16px;
 }

 .room-title {
 font-size: 24px;
 padding: 0;
 }

 .room-question,
 .room-side-panel {
 padding: 16px;
 }

 .room-card-header,
 .room-question-header,
 .zone-topline,
 .zone-meta,
 .counter-card {
 flex-direction: column;
 align-items: stretch;
 }

 .counter-grid,
 .frame-cards,
 .room-side-frames {
 grid-template-columns: 1fr;
 }

 .counter-grid {
 display: grid;
 }

 .type-buttons {
 flex-direction: column;
 }

 .type-btn {
 width: 100%;
 }

 .color-options {
 flex-direction: column;
 }
}

@media (max-width: 480px) {
 .room-title {
 font-size: 21px;
 }

 .price-value {
 font-size: 28px;
 }
}

.rooms-matrix-wrapper {
 overflow-x: auto;
 border: 1px solid #d9e2d2;
 border-radius: 18px;
 background: white;
 box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.rooms-matrix {
 border-collapse: separate;
 border-spacing: 0;
 background: white;
 table-layout: fixed;
}

.rooms-matrix th,
.rooms-matrix td {
 border-right: 1px solid #d9e2d2;
 border-bottom: 1px solid #d9e2d2;
 vertical-align: top;
}

.rooms-matrix tr:last-child th,
.rooms-matrix tr:last-child td {
 border-bottom: none;
}

.rooms-matrix th:last-child,
.rooms-matrix td:last-child {
 border-right: none;
}

.matrix-room-heading {
 position: sticky;
 top: 0;
 z-index: 3;
 background: #edf7e8;
}

.matrix-corner {
 position: sticky;
 top: 0;
 z-index: 5;
 background: #edf7e8;
 min-width: 210px;
 width: 210px;
 padding: 12px 8px;
 text-align: center;
 font-size: 11px;
 font-weight: 700;
 color: var(--dark-blue);
 text-transform: uppercase;
 letter-spacing: 0.5px;
}

.matrix-room-heading {
 min-width: 160px;
 width: 160px;
 padding: 10px;
 text-align: left;
}


.rooms-matrix tbody tr > .matrix-row-title {
 position: sticky !important;
 top: 0 !important;
 vertical-align: top !important;
 overflow: visible !important;
 z-index: 10 !important;
 background: white !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content {
 position: static !important;
 display: grid !important;
 grid-template-rows: auto minmax(110px, 1fr) !important;
 align-items: stretch !important;
 width: 100% !important;
 height: 100% !important;
 min-height: 100% !important;
 gap: 8px !important;
 box-sizing: border-box !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .section-header-row {
 position: relative !important;
 z-index: 2 !important;
 width: 100% !important;
 display: flex !important;
 justify-content: space-between !important;
 align-items: flex-start !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap {
 position: static !important;
 width: 100% !important;
 display: flex !important;
 justify-content: center !important;
 align-items: center !important;
 align-self: stretch !important;
 min-height: 110px !important;
 margin: 0 !important;
 transform: translateY(-8px) !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap.sockets-photo {
 transform: translateY(-4px) !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap > .matrix-row-image {
 display: block !important;
 width: 100% !important;
 max-width: 176px !important;
 height: 112px !important;
 max-height: none !important;
 margin: 0 auto !important;
 object-fit: contain !important;
 padding: 4px !important;
}

@media (max-width: 768px) {
 .rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap > .matrix-row-image {
  max-width: 140px !important;
  height: 96px !important;
 }
}

.matrix-row-image {
 width: 100%;
 max-width: 188px;
 height: 96px;
 object-fit: contain;
 display: block;
 margin: 0 auto;
 padding: 4px;
}

.matrix-frame-grid {
 justify-items: center;
}

.matrix-frame-card {
 width: 112px;
 max-width: 112px;
 justify-self: center;
}

.matrix-frame-card:nth-child(5) {
 grid-column: 1 / -1;
 width: 112px;
 max-width: 112px;
}

.frame-visual {
 border: 2px solid var(--border-gray);
 background: white;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: all 0.3s;
 position: relative;
 border-radius: 4px;
}

.frame-visual:hover {
 border-color: var(--green);
 background: #f0f9f0;
}

.frame-preview-image {
 object-fit: contain;
 display: block;
 pointer-events: none;
}

@media (max-width: 768px) {
 .matrix-row-title-content {
 min-height: auto;
 }

 .matrix-row-image {
 max-width: 140px;
 height: 80px;
 }

 .matrix-frame-card,
 .matrix-frame-card:nth-child(5) {
 width: 104px;
 max-width: 104px;
 }

}

.matrix-room-heading.has-error {
 background: #fff1f1;
}

.matrix-room-heading-top {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 justify-content: flex-start;
 gap: 6px;
 margin-bottom: 0;
}

.matrix-room-number-input {
 font-size: 22px;
 font-weight: 700;
 color: var(--dark-blue);
 line-height: 1.2;
 border: none;
 border-bottom: 2px solid transparent;
 background: transparent;
 padding: 0;
 margin: 0;
 width: 100%;
 min-width: 0;
 font-family: "Montserrat", sans-serif;
 outline: none;
 transition: border-color 0.3s;
}

.matrix-room-number-input:hover,
.matrix-room-number-input:focus {
 border-bottom-color: var(--green);
}

.matrix-room-number-input::placeholder {
 color: #999;
 font-weight: 400;
}

.matrix-room-stats {
 display: flex;
 flex-direction: column;
 gap: 4px;
 margin-top: 10px;
 font-size: 11px;
 color: #55606b;
 font-weight: 600;
}

.matrix-room-error {
 margin-top: 10px;
 padding: 10px 12px;
 border-radius: 10px;
 background: #fff5f5;
 border: 1px solid #f1c7c7;
 color: #a12626;
 font-size: 11px;
 line-height: 1.5;
}

.rooms-matrix tbody tr {
 background: #ffffff;
}

.rooms-matrix tbody tr .matrix-cell {
 background: #ffffff;
}

.matrix-row-title {
 position: sticky;
 left: 0;
 top: 0;
 z-index: 2;
 min-width: 160px;
 width: 160px;
 padding: 16px 8px;
 background: #f0f7ec;
 border-right: 2px solid #d4e5cc;
 text-align: left;
 height: 100%;
 box-sizing: border-box;
 font-size: 12px;
}

.zone-label {
 font-size: 13px;
 font-weight: 700;
 color: var(--dark-blue);
 margin-bottom: 2px;
}

.zone-control-points-label {
 font-size: 10px;
 color: #6f7680;
 margin-bottom: 4px;
}

.matrix-row-title span {
 display: block;
 font-size: 12.5px;
 font-weight: 700;
 color: var(--dark-blue);
 line-height: 1.2;
}

.matrix-row-title-content {
 display: flex;
 flex-direction: column;
 gap: 12px;
 width: 100%;
}

.matrix-row-image {
 width: 100%;
 max-width: 180px;
 height: 96px;
 object-fit: cover;
 border-radius: 12px;
 border: 1px solid #dde4ea;
 background: #ffffff;
}

.matrix-row-title .info-btn {
 position: relative;
 top: 0;
 margin-left: 4px;
}

.matrix-cell {
 min-width: 200px;
 width: 200px;
 padding: 6px;
 background: white;
}

.matrix-cell-stack {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.matrix-metric {
 border: 1px solid #e2e8de;
 border-radius: 12px;
 padding: 8px;
 background: #fbfcfa;
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.matrix-metric-copy {
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.matrix-metric-label {
 font-size: 12px;
 font-weight: 700;
 color: #23303b;
 text-align: center;
}

.matrix-metric-note {
 font-size: 10px;
 line-height: 1.4;
 color: #6f7680;
 text-align: center;
}

.matrix-zone-list {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.matrix-zone-card {
 border: 1px solid #dde4ea;
 border-radius: 12px;
 padding: 10px;
 background: white;
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.matrix-zone-header {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 8px;
}

.matrix-zone-name {
 font-size: 13px;
 font-weight: 700;
 color: #23303b;
}

.matrix-zone-note {
 margin-top: 4px;
 font-size: 11px;
 color: #6f7680;
}

.matrix-type-buttons {
 gap: 8px;
}

.matrix-smart-toggle {
 display: inline-flex;
 align-items: center;
 gap: 8px;
}

.matrix-tag {
 display: inline-flex;
 align-items: center;
 width: fit-content;
 padding: 7px 11px;
 border-radius: 999px;
 background: #eef4ff;
 border: 1px solid #d2def7;
 color: #35558b;
 font-size: 11px;
 font-weight: 600;
}

.matrix-frame-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 8px;
}

.matrix-frame-card {
 padding: 8px;
}

.matrix-frame-card:nth-child(5) {
 grid-column: 1 / -1;
 justify-self: center;
 max-width: 50%;
}


.rooms-matrix.frames-compact .matrix-frame-grid {
 transform: scale(0.95);
 transform-origin: top center;
}

.rooms-matrix.frames-compact .frame-visual {
 width: 78px !important;
 height: 82px !important;
}

.rooms-matrix.frames-compact .frame-label {
 font-size: 10px;
}

.rooms-matrix.frames-compact .frame-remove {
 padding: 3px 10px;
 font-size: 10px;
}

.rooms-matrix.frames-compact .matrix-frame-card {
 padding: 6px;
}

.rooms-matrix.frames-compact .matrix-frame-grid {
 gap: 6px;
}


.rooms-matrix.frames-ultra-compact .matrix-frame-grid {
 transform: scale(0.88);
 transform-origin: top center;
}

.rooms-matrix.frames-ultra-compact .frame-visual {
 width: 70px !important;
 height: 70px !important;
}

.rooms-matrix.frames-ultra-compact .frame-label {
 font-size: 9px;
}

.rooms-matrix.frames-ultra-compact .frame-remove {
 padding: 2px 8px;
 font-size: 9px;
}

.rooms-matrix.frames-ultra-compact .matrix-frame-card {
 padding: 4px;
}

.rooms-matrix.frames-ultra-compact .matrix-frame-grid {
 gap: 4px;
}

.frame-validation-panel {
 border: 1px solid #dce8d3;
 border-radius: 14px;
 padding: 14px;
 background: #f8fcf5;
}

.frame-validation-panel.invalid {
 border-color: #efb0b0;
 background: #fff5f5;
}

.frame-validation-title {
 font-size: 13px;
 font-weight: 700;
 color: #23303b;
}

.frame-validation-stats {
 display: flex;
 flex-wrap: wrap;
 gap: 12px;
 margin-top: 8px;
 font-size: 12px;
 font-weight: 600;
 color: #46515d;
}

.frame-validation-note {
 margin-top: 8px;
 font-size: 11px;
 line-height: 1.5;
 color: #6a7680;
}

.frame-validation-error {
 margin-top: 10px;
 font-size: 11px;
 line-height: 1.5;
 color: #a12626;
}

.frame-validation-ok {
 margin-top: 10px;
 font-size: 11px;
 line-height: 1.5;
 color: #2f6e2f;
}

@media (max-width: 768px) {
 .matrix-corner,
 .matrix-row-title {
 min-width: 210px;
 width: 210px;
 padding: 12px 8px;
 }

 .matrix-room-heading,
 .matrix-cell {
 min-width: 160px;
 width: 160px;
 padding: 10px;
 }

 .matrix-room-heading-top,
 .matrix-zone-header {
 flex-direction: column;
 align-items: flex-start;
 }

 .matrix-frame-grid {
 grid-template-columns: 1fr;
 }

 .step-actions-generate {
 flex-direction: column;
 align-items: stretch;
 }

 .matrix-row-image {
 max-width: none;
 height: 80px;
 }
}

.rooms-matrix-container {
 position: relative;
 display: flex;
 align-items: stretch;
}

.matrix-scroll-btn {
 position: sticky;
 top: 80px;
 width: 36px;
 height: 60px;
 background: #6bb540;
 border: none;
 border-radius: 8px;
 color: white;
 font-size: 18px;
 font-weight: bold;
 cursor: pointer;
 z-index: 100;
 display: flex;
 align-items: center;
 justify-content: center;
 opacity: 0.95;
 transition: opacity 0.2s, background 0.2s, transform 0.2s;
 flex-shrink: 0;
 pointer-events: auto;
 box-shadow: 0 2px 10px rgba(0,0,0,0.3);
 align-self: flex-start;
}

.matrix-scroll-btn:hover {
 opacity: 1;
 background: #5aa035;
 transform: scale(1.05);
}

.matrix-scroll-btn:active {
 transform: scale(0.95);
}

.matrix-scroll-left {
 left: 8px;
}

.matrix-scroll-right {
 right: 8px;
}

.rooms-matrix-wrapper {
 overflow-x: auto;
 overflow-y: hidden;
 position: relative;
 scroll-behavior: smooth;
 -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
 .matrix-scroll-btn {
 width: 28px;
 height: 48px;
 font-size: 14px;
 }
}

.matrix-row-image {
 width: 100%;
 max-width: 180px;
 height: 96px;
 object-fit: contain;
 border-radius: 12px;
 border: 1px solid #dde4ea;
 background: white;
 padding: 8px;
}

.zone-name-input {
 font-size: 13px;
 font-weight: 700;
 color: var(--dark-blue);
 border: none;
 background: transparent;
 width: 100%;
 padding: 2px 4px;
 margin: 0;
}

.zone-name-input:focus {
 outline: none;
 background: #f0f7ec;
 border-radius: 4px;
}


.zone-header-compact {
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.zone-title-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 6px;
}

.zone-stepper-row {
 display: flex;
 justify-content: center;
}

.zone-sublabel {
 font-size: 9px;
 color: #888;
 text-align: center;
 font-weight: 400;
}

.zone-types-compact {
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.zone-types-compact .type-btn {
 font-size: 10px;
 padding: 6px 8px;
 white-space: normal;
 line-height: 1.2;
}

.dali-toggle-row {
 margin-top: 6px;
 padding: 6px 8px;
 background: #f5f5f5;
 border-radius: 4px;
 width: 100%;
 box-sizing: border-box;
}

.dali-checkbox-label {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 0;
 font-size: 11px;
 font-weight: 600;
 color: #555;
 cursor: pointer;
}

.dali-checkbox-label > span:first-child {
 flex-shrink: 0;
}

.dali-controls {
 display: flex;
 align-items: center;
 gap: 6px;
 flex-shrink: 0;
 margin-left: auto;
}

.dali-checkbox-label input[type="checkbox"] {
 width: 16px;
 height: 16px;
 cursor: pointer;
 flex-shrink: 0;
 accent-color: #005EB8;
}

.dali-info-btn {
 margin-left: 2px;
 width: 13px;
 height: 13px;
 font-size: 9px;
 flex-shrink: 0;
}



.matrix-row-title {
 position: relative;
 position: sticky;
 left: 0;
 top: 0;
 z-index: 2;
 min-width: 210px;
 width: 210px;
 padding: 12px 8px;
 background: #f0f7ec;
 border-right: 2px solid #d4e5cc;
 box-sizing: border-box;
 font-size: 11px;
}

.matrix-row-title-content {
 display: flex;
 flex-direction: column;
 justify-content: flex-start;
 align-items: stretch;
 gap: 8px;
 min-height: 100%;
 box-sizing: border-box;
 position: relative;
}


.row-image-wrap {
 position: relative;
 width: fit-content;
 display: block;
}


.row-image-wrap.adaptive-photo {
 transform: translateY(20px);
}

.matrix-row-title-content .row-title-text {
 display: block;
 margin: 0;
}

.matrix-room-heading,
.matrix-cell {
 padding: 6px;
}


.zone-name-input-sm {
 font-size: 14px;
 font-weight: 600;
 color: var(--dark-blue);
 border: none;
 background: transparent;
 width: auto;
 min-width: 80px;
 padding: 2px 4px;
 margin: 0;
}


.zone-types-ultra-compact .type-btn {
 font-size: 12px;
 padding: 6px 8px;
 white-space: normal;
 line-height: 1.2;
}


.matrix-corner {
 min-width: 150px;
 width: 150px;
 padding: 12px 8px;
 font-size: 11px;
}


.zone-sublabel-below {
 font-size: 10px;
 color: #666;
 font-weight: 500;
 margin-top: 4px;
}


.zone-sublabel-row {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 flex-wrap: wrap;
}

.zone-sublabel-row .info-btn-tiny {
 width: 14px;
 height: 14px;
 font-size: 9px;
}


.row-title-text {
 display: block;
 word-wrap: normal;
 overflow-wrap: normal;
 word-break: normal;
 white-space: normal;
 hyphens: none;
 flex: 1;
 text-align: left;
}


.section-header-row {
 display: flex;
 justify-content: space-between;
 align-items: flex-start;
 width: 100%;
 gap: 4px;
 box-sizing: border-box;
}

.info-btn-section {
 margin-top: 2px;
 flex-shrink: 0;
}


.row-image-wrap {
 position: relative;
 width: fit-content;
 display: block;
 margin-top: 60px;
}


.matrix-row-image {
 width: 100%;
 max-width: 190px;
 height: auto;
 max-height: 140px;
 object-fit: contain;
 border-radius: 8px;
 border: 1px solid #dde4ea;
 background: white;
 padding: 4px;
 display: block;
}


.info-btn-photo {
 position: absolute;
 top: -15px;
 right: -15px;
 margin: 0;
 z-index: 2;
}

.matrix-room-number-input,
.zone-name-input-sm {
 resize: none;
 overflow: hidden;
}

.matrix-room-number-input {
 max-width: 100%;
}

.zone-name-input-sm {
 max-width: 100%;
}

.reset-btn {
 padding: 6px 10px;
 font-size: 10px;
 gap: 6px;
}

.reset-btn svg {
 width: 14px;
 height: 14px;
}


.zone-name-input-sm {
 font-size: 13px;
 font-weight: 600;
 color: var(--dark-blue);
 border: none;
 background: transparent;
 width: auto;
 min-width: 60px;
 padding: 1px 2px;
 margin: 0;
}


.zone-types-ultra-compact .type-btn {
 font-size: 11px;
 padding: 4px 6px;
 white-space: normal;
 line-height: 1.1;
}

.matrix-row-image.lower-photo {
 margin-top: 12px;
}


.matrix-corner {
 min-width: 140px;
 width: 140px;
 padding: 12px 8px;
 font-size: 11px;
}

.matrix-zone-card {
 border: 1px solid #dde4ea;
 border-radius: 8px;
 padding: 6px;
 background: white;
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.type-btn {
 font-size: 9px;
 padding: 4px 6px;
}



.zone-sublabel-below {
 font-size: 11px;
 color: #555;
 font-weight: 500;
 margin-top: 4px;
}


.zone-name-input-sm:hover {
 background: #f0f7ec;
 border-radius: 3px;
}


.rooms-matrix-container {
 width: 100%;
 margin: 0 auto;
}


.matrix-metric-label.big {
 font-size: 13px;
 font-weight: 600;
}

.big-label .matrix-metric-label {
 font-size: 13px;
 font-weight: 600;
}


.stepper {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 width: 100%;
}

.stepper-btn {
 width: 28px;
 height: 28px;
 border: 1px solid var(--border-gray);
 background: white;
 color: #333;
 font-size: 16px;
 font-weight: 600;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 4px;
 transition: all 0.2s;
 padding: 0;
 line-height: 1;
}

.stepper-btn:hover {
 background: var(--green);
 border-color: var(--green);
 color: white;
}

.stepper-btn:active {
 transform: scale(0.95);
}

.stepper-value {
 font-size: 14px;
 font-weight: 600;
 color: #333;
 min-width: 24px;
 text-align: center;
}


.zone-title-row {
 display: flex;
 justify-content: center;
 align-items: center;
 gap: 4px;
 width: 100%;
}


.zone-header-ultra-compact {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
}


.zone-stepper-row {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
 width: 100%;
}


.zone-types-ultra-compact {
 display: flex;
 justify-content: center;
 width: 100%;
}

.zone-types-ultra-compact .type-buttons {
 display: flex;
 flex-direction: column;
 align-items: center;
 width: 100%;
}


.zone-name-input-sm {
 font-size: 12px;
 font-weight: 600;
 color: var(--dark-blue);
 border: none;
 background: transparent;
 width: auto;
 min-width: 40px;
 max-width: 80px;
 padding: 0;
 margin: 0;
 text-align: center;
}


.matrix-room-heading-top {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 6px;
 flex-wrap: wrap;
}


.room-title-wrapper {
 flex: 1;
 min-width: 0;
 display: flex;
 align-items: center;
}

.room-actions {
 display: flex;
 gap: 6px;
 align-items: center;
}

.matrix-reset-btn {
 align-self: flex-end;
 margin-top: 2px;
}

.matrix-delete-btn {
 background: transparent;
 border: none;
 cursor: pointer;
 padding: 4px;
 border-radius: 4px;
 color: #999;
 transition: all 0.2s;
 display: flex;
 align-items: center;
 justify-content: center;
}

.matrix-delete-btn:hover:not(:disabled) {
 color: #c00;
 background: rgba(204, 0, 0, 0.1);
}

.matrix-delete-btn:disabled {
 cursor: not-allowed;
}

.subsection-divider {
 height: 1px;
 background: #e0e0e0;
 margin: 12px 0;
 width: 100%;
}


.matrix-room-number-input {
 font-size: 18px;
 font-weight: 700;
 color: var(--dark-blue);
 line-height: 1.2;
 border: none;
 border-bottom: 2px solid transparent;
 background: transparent;
 padding: 0;
 margin: 0;
 width: 100%;
 min-width: 0;
 max-width: 120px;
 font-family: "Montserrat", sans-serif;
 outline: none;
 transition: border-color 0.3s;
 word-wrap: break-word;
 overflow-wrap: break-word;
 white-space: normal;
}


.matrix-zone-header.compact.centered {
 display: flex;
 justify-content: center;
 align-items: center;
}

.matrix-zone-header.compact.centered .zone-label {
 text-align: center;
}

.shutters-zone-list {
 min-height: 116px;
}

.shutters-zone-card-placeholder {
 min-height: 116px;
 visibility: hidden;
 pointer-events: none;
}

.row-title-shutters .row-image-shutters {
}

.row-title-shutters .row-image-shutters .matrix-row-image {
}


.matrix-cell {
 min-width: 160px;
 width: 160px;
 padding: 6px;
 background: white;
 vertical-align: middle;
}


.matrix-room-heading {
 min-width: 160px;
 width: 160px;
 padding: 10px;
 text-align: left;
}


.rooms-matrix tbody tr > .matrix-row-title {
 position: sticky !important;
 top: 0 !important;
 vertical-align: top !important;
 overflow: visible !important;
 z-index: 10 !important;
 background: white !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content {
 display: flex !important;
 flex-direction: column !important;
 justify-content: flex-start !important;
 align-items: stretch !important;
 width: 100% !important;
 height: 100% !important;
 min-height: 100% !important;
 gap: 8px !important;
 box-sizing: border-box !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .section-header-row {
 position: relative !important;
 z-index: 2 !important;
 width: 100% !important;
 display: flex !important;
 justify-content: space-between !important;
 align-items: flex-start !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap {
 position: static !important;
 width: 100% !important;
 display: flex !important;
 justify-content: center !important;
 align-items: center !important;
 align-self: stretch !important;
 min-height: 100px !important;
 margin: 0 !important;
 transform: none !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap > .matrix-row-image {
 display: block !important;
 margin: 0 auto !important;
 object-fit: contain !important;
}


.rooms-matrix tbody tr > .matrix-row-title {
 overflow: visible !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content {
 display: flex !important;
 flex-direction: column !important;
 justify-content: flex-start !important;
 align-items: stretch !important;
 gap: 8px !important;
}

.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap {
 position: static !important;
 display: flex !important;
 justify-content: center !important;
 align-items: center !important;
 width: 100% !important;
 margin: 0 !important;
 transform: none !important;
 align-self: stretch !important;
}


.rooms-matrix tbody tr > .matrix-row-title > .matrix-row-title-content > .row-image-wrap > .matrix-row-image {
 max-width: 140px !important;
 height: 96px !important;
 padding: 4px !important;
 object-fit: contain !important;
 transform: none !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-shutters > .matrix-row-title-content > .row-image-wrap {
 min-height: 110px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-motorizedDoors > .matrix-row-title-content {
 min-height: 130px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-motorizedDoors > .matrix-row-title-content > .row-image-wrap {
 min-height: 130px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-security > .matrix-row-title-content {
 min-height: 120px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-security > .matrix-row-title-content > .row-image-wrap {
 min-height: 120px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-accessories > .matrix-row-title-content {
 min-height: 120px !important;
}

.rooms-matrix tbody tr > .matrix-row-title.row-title-accessories > .matrix-row-title-content > .row-image-wrap {
 min-height: 120px !important;
}

.shutters-zone-list,
.shutters-zone-card-placeholder {
 min-height: 110px;
}

.rooms-matrix.frames-compact .frame-card:nth-child(5) .frame-visual,
.rooms-matrix.frames-ultra-compact .frame-card:nth-child(5) .frame-visual {
 width: 110px !important;
 height: 84px !important;
}
.rooms-matrix.frames-compact .frame-card:nth-child(5) .frame-preview-image,
.rooms-matrix.frames-ultra-compact .frame-card:nth-child(5) .frame-preview-image {
 width: 130px !important;
 height: 82px !important;
}
 
.rooms-matrix tbody tr .matrix-row-image { max-width: 176px !important; height: 112px !important; }
.rooms-matrix tbody tr { min-height: auto !important; } 
  
.stepper-input { background: white; font-weight: 600; font-family: Montserrat, sans-serif; } 
.group-header { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }  
.group-title-input { font-size: 22px; font-weight: 600; font-family: Montserrat, sans-serif; border: none; border-bottom: 2px solid transparent; background: transparent; padding: 2px 0; color: #333; width: 180px; transition: border-color 0.2s; }  
.group-title-input:hover { border-bottom-color: #ddd; }  
.group-title-input:focus { outline: none; border-bottom-color: #4caf50; }  
.group-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }  
.group-tab { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-size: 12px; font-family: Montserrat, sans-serif; border: 1px solid #ddd; border-radius: 8px; background: #f5f5f5; cursor: pointer; color: #333; white-space: nowrap; transition: all 0.2s; }  
.group-tab.active { background: #4caf50; color: white; border-color: #4caf50; }  
.group-tab:hover:not(.active) { background: #e8e8e8; }  
.group-tab-close { width: 16px; height: 16px; border: none; background: rgba(0,0,0,0.1); color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%%; }  
.group-tab-close:hover { background: rgba(0,0,0,0.25); }  
.btn-add-group { padding: 6px 14px; font-size: 13px; font-family: Montserrat, sans-serif; border: 1px dashed #4caf50; border-radius: 8px; background: #f0f9f0; color: #4caf50; cursor: pointer; white-space: nowrap; font-weight: 500; transition: all 0.2s; }  
.btn-add-group:hover { background: #e0f0e0; } 
.group-header { display: flex; flex-direction: column; gap: 4px; margin-bottom: 15px; align-items: flex-start; }
.group-title-input { font-size: 22px; font-weight: 600; font-family: Montserrat, sans-serif; border: none; border-bottom: 2px solid transparent; background: transparent; padding: 2px 0; color: #333; width: 200px; transition: border-color 0.2s; }
.group-title-input:hover { border-bottom-color: #ddd; }
.group-title-input:focus { outline: none; border-bottom-color: #4caf50; }
.group-nav-row { display: flex; align-items: center; gap: 6px; }
.group-switchers { display: flex; gap: 6px; flex-wrap: wrap; }
.group-switcher { position: relative; min-width: 120px; height: 36px; border: 2px solid #4caf50; border-radius: 8px; font-size: 12px; font-family: Montserrat, sans-serif; font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.group-switcher.active { background: #4caf50; color: white; border-color: #4caf50; }
.group-switcher:not(.active) { background: white; color: #4caf50; }
.group-switcher:hover:not(.active) { background: #f0f9f0; }
.group-switcher-name { display: inline-block; }
.group-del-btn { display: none; position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 50%; background: #f44336; color: white; font-size: 11px; line-height: 1; cursor: pointer; align-items: center; justify-content: center; border: none; padding: 0; }
.group-switcher:hover .group-del-btn { display: flex; }
.btn-add-group-nav { width: 36px; height: 36px; border-radius: 8px; border: 2px dashed #4caf50; background: white; color: #4caf50; font-size: 22px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.btn-add-group-nav:hover { background: #f0f9f0; }
.project-setup-row { display: flex; gap: 20px; align-items: flex-start; }  
.project-setup-left { flex: 1; min-width: 0; }  
.project-setup-right { flex-shrink: 0; width: 480px; display: flex; align-items: flex-start; justify-content: flex-start; margin-top: -15px; }  
.project-setup-right img { max-width: 100%; max-height: 260px; height: auto; width: auto; object-fit: contain; display: block; border-radius: 6px; margin-left: -30px; } 
.matrix-cell-stack, .matrix-zone-list { height: auto; }  
.shutters-zone-list, .sockets-zone-list { height: auto; } 
.slide1-subtitle { font-size: 15px; color: #555; margin: 0 0 18px 0; font-weight: 500; }  
.slide1-main-content { display: flex; flex-direction: column; gap: 12px; }  
.slide1-action-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }  
.slide1-left { display: flex; flex-direction: column; gap: 6px; }  
.btn-start-new { padding: 10px 24px; background: #4caf50; color: white; border: none; border-radius: 6px; font-size: 15px; font-weight: 600; font-family: Montserrat, sans-serif; cursor: pointer; }  
.btn-start-new:hover { background: #43a047; }  
.btn-load-file-small { padding: 4px 10px; background: transparent; color: #999; border: 1px solid #ddd; border-radius: 4px; font-size: 11px; font-family: Montserrat, sans-serif; cursor: pointer; }  
.btn-load-file-small:hover { color: #666; border-color: #bbb; }  
.slide1-right { display: flex; flex-direction: column; gap: 4px; }  
.slide1-code-row { display: flex; gap: 6px; align-items: center; }  
.project-input.small { width: 140px; padding: 4px 8px; font-size: 12px; }  
.btn-load-small { padding: 4px 12px; background: #eee; color: #666; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; font-family: Montserrat, sans-serif; cursor: pointer; }  
.btn-load-small:hover { background: #ddd; }  
.slide1-size-row { display: flex; align-items: center; gap: 10px; }  
.type-buttons.inline { display: flex; gap: 6px; }  
.type-btn.small { padding: 4px 12px; font-size: 12px; } 
.project-setup-section { padding-right: 35%; } 
.project-setup-section { padding-right: 32%; } 
.reset-confirm-box { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: #fff3e0; border: 1px solid #ffcc80; border-radius: 4px; font-size: 11px; color: #e65100; margin-bottom: 6px; }  
.reset-btns { display: flex; gap: 4px; margin-left: auto; }  
.btn-confirm-yes { padding: 2px 8px; background: #f44336; color: white; border: none; border-radius: 3px; font-size: 10px; cursor: pointer; }  
.btn-confirm-no { padding: 2px 8px; background: #eee; border: 1px solid #ddd; border-radius: 3px; font-size: 10px; cursor: pointer; } 
#gatewayInfo { max-width: 85%; word-break: break-word; font-size: 11px; line-height: 1.4; }  
.slide1-main-content { max-width: 65%; } 
.project-setup-section { position: relative; border: 1px solid #ddd; border-radius: 8px; background: white; padding: 0; min-height: 260px; overflow: hidden; margin-bottom: 24px; }  
.slide1-bg-photo { position: absolute; right: 0; top: 0; bottom: 0; width: 45%; background: url('images/1-slide.webp') right top / auto 100%% no-repeat; }  
.slide1-content { position: relative; z-index: 1; padding: 24px; padding-right: 52%%; min-height: 220px; }  
.slide1-actions { display: flex; flex-direction: column; gap: 8px; }  
.slide1-load-options { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }  
.slide1-load-link { cursor: pointer; font-size: 14px; color: #005EB8; text-decoration: underline; font-weight: 500; padding: 2px 0; }  
.slide1-load-link:hover { color: #004a94; background: #e8f0fe; padding: 2px 6px; border-radius: 4px; }  
.slide1-or { font-size: 12px; color: #999; font-weight: 400; } 
.add-group-label { font-size: 14px; color: #4caf50; cursor: pointer; font-weight: 600; margin-left: 4px; align-self: center; }
.add-group-label:hover { color: #43a047; }
.slide1-main-content { gap: 6px !important; max-width: 100%% !important; }  
.slide1-actions { gap: 4px !important; }  
.project-setup-grid { margin-bottom: 4px; }  
.slide1-size-row { margin-top: 4px; }  
#gatewayInfo { margin-top: 2px; } 
.slide1-start-row { margin-top: 8px; } 
.type-btn[disabled] { opacity: 0.5; cursor: default; pointer-events: none; } 
.type-btn[disabled].active { opacity: 1; } 
.type-btn[disabled]:not(.active) { opacity: 0.4; } 
.btn-generate.disabled { background: #dc3545 !important; color: white !important; opacity: 0.8; cursor: not-allowed; }
.type-btn.small.highlight { background: #dc3545 !important; color: white !important; border-color: #dc3545 !important; animation: pulseRed 0.6s ease-in-out 3; }
@keyframes pulseRed { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Section collapse/expand buttons */
.section-header-buttons {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* Fix button alignment by ensuring consistent spacing */
.section-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
}

.info-btn-section, .collapse-btn {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.collapse-btn {
    background: #f0f7ec;
    border: 1px solid #d4e5cc;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    color: #6BB540;
    transition: all 0.2s;
}

.collapse-btn:hover {
 background: #d4e5cc;
 color: #4a8a2d;
}

.rooms-matrix tbody tr.row-collapsed > .matrix-row-title > .matrix-row-title-content {
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.rooms-matrix tbody tr.row-collapsed > .matrix-row-title > .matrix-row-title-content > .section-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-direction: row !important;
}

.row-collapsed .row-image-wrap {
 display: none !important;
}

.matrix-metric.compact {
 padding: 4px 8px !important;
 min-height: auto !important;
}

.row-collapsed.row-security td,
.row-collapsed.row-accessories td {
 padding: 6px !important;
 height: auto !important;
 min-height: 0 !important;
}

.row-collapsed.row-security .matrix-cell,
.row-collapsed.row-accessories .matrix-cell {
 height: auto !important;
 min-height: 0 !important;
 padding: 6px !important;
}

.row-collapsed.row-security .matrix-row-title,
.row-collapsed.row-accessories .matrix-row-title {
 height: auto !important;
 min-height: 0 !important;
 padding: 6px 12px !important;
}

.rooms-matrix tbody tr.row-collapsed.row-security > .matrix-row-title > .matrix-row-title-content,
.rooms-matrix tbody tr.row-collapsed.row-accessories > .matrix-row-title > .matrix-row-title-content {
 min-height: 0 !important;
 height: auto !important;
}

.row-collapsed.row-security .matrix-metric,
.row-collapsed.row-accessories .matrix-metric {
 gap: 8px !important;
 margin: 0 !important;
 padding: 4px 0 !important;
}

.config-loading .configurator {
    opacity: 0;
    pointer-events: none;
    cursor: wait;
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH MODULE STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* Guest mode: instantly hide restricted sections (prevents flash) */
.bjc-guest #bomSection {
 display: none !important;
}
.bjc-guest #resultSection {
 display: none !important;
}

/* Loading Spinner */
.bjc-loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(135, 188, 73, 0.2);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: bjc-spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin: 0 10px;
}

@keyframes bjc-spin {
    to { transform: rotate(360deg); }
}

.price-loading {
    font-size: 14px;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}



.bom-loading {
    padding: 40px;
    text-align: center;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px dashed #eee;
}

.header-icon-link.logged-in {
 color: var(--green);
}

.header-icon-link.logged-in::after {
 content: '';
 position: absolute;
 bottom: 2px;
 right: 2px;
 width: 8px;
 height: 8px;
 background: var(--green);
 border-radius: 50%;
 border: 2px solid white;
}

/* ─── User dropdown ───────────────────────────────────────────────── */
.user-dropdown {
 position: absolute;
 top: calc(100% + 12px);
 right: 0;
 width: 300px;
 background: white;
 border-radius: 12px;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
 z-index: 2000;
 opacity: 0;
 visibility: hidden;
 transform: translateY(-8px);
 transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
 overflow: hidden;
}

.user-dropdown.open {
 opacity: 1;
 visibility: visible;
 transform: translateY(0);
}

.user-dropdown::before {
 content: '';
 position: absolute;
 top: -6px;
 right: 14px;
 width: 12px;
 height: 12px;
 background: white;
 transform: rotate(45deg);
 box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.user-dropdown-header {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 16px 18px;
 background: linear-gradient(135deg, #f8fdf5 0%, #f0f9eb 100%);
}

.user-avatar {
 width: 42px;
 height: 42px;
 border-radius: 50%;
 background: linear-gradient(135deg, var(--green), #4a9e2a);
 color: white;
 font-size: 15px;
 font-weight: 700;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 letter-spacing: 1px;
}

.user-info {
 overflow: hidden;
}

.user-name {
 font-size: 14px;
 font-weight: 600;
 color: #1a1a1a;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.user-email {
 font-size: 11px;
 color: #888;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 margin-top: 2px;
}

.user-dropdown-divider {
 height: 1px;
 background: #eee;
 margin: 0;
}

.user-dropdown-item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 11px 18px;
 font-size: 13px;
 font-weight: 500;
 color: #444;
 text-decoration: none;
 transition: background 0.15s, color 0.15s;
}

.user-dropdown-item svg {
 width: 18px;
 height: 18px;
 flex-shrink: 0;
 stroke: #888;
 transition: stroke 0.15s;
}

.user-dropdown-item:hover {
 background: #f7f7f7;
 color: var(--green);
}

.user-dropdown-item:hover svg {
 stroke: var(--green);
}

.user-dropdown-logout {
 color: #b44;
}

.user-dropdown-logout svg {
 stroke: #b44;
}

.user-dropdown-logout:hover {
 background: #fef5f5;
 color: #922;
}

.user-dropdown-logout:hover svg {
 stroke: #922;
}

/* ─── Guest state in dropdown ─────────────────────────────────────── */
.user-dropdown-guest {
 padding: 24px 20px;
 text-align: center;
}

.user-dropdown-guest-icon {
 margin-bottom: 12px;
}

.user-dropdown-guest-icon svg {
 width: 44px;
 height: 44px;
 stroke: #ccc;
}

.user-dropdown-guest-text {
 font-size: 13px;
 color: #777;
 line-height: 1.5;
 margin-bottom: 16px;
}

.user-dropdown-login-btn {
 display: inline-block;
 padding: 10px 28px;
 background: var(--green);
 color: white;
 font-size: 13px;
 font-weight: 600;
 text-decoration: none;
 border-radius: 6px;
 transition: background 0.2s;
 letter-spacing: 0.3px;
}

.user-dropdown-login-btn:hover {
 background: var(--dark-blue);
}

/* ─── Auth notice on Slide 1 ──────────────────────────────────────── */
.auth-notice {
 display: flex;
 align-items: center;
 gap: 6px;
 font-size: 11px;
 color: #b57a00;
 background: #fffbeb;
 border: 1px solid #ffe4a0;
 border-radius: 6px;
 padding: 8px 14px;
 margin-top: 10px;
}

.auth-notice a {
 color: var(--green);
 font-weight: 600;
 text-decoration: underline;
}

.auth-notice a:hover {
 color: var(--dark-blue);
}

/* ─── Auth block on Slide 3 (for guests) ──────────────────────────── */
.auth-block-slide3 {
 display: none;
 margin: 20px 0;
}

.auth-block-inner {
 text-align: center;
 padding: 40px 30px;
 background: linear-gradient(135deg, #f8fdf5 0%, #edf7e5 50%, #f0f9eb 100%);
 border: 2px dashed var(--green);
 border-radius: 8px;
}

.auth-block-icon {
 margin-bottom: 16px;
}

.auth-block-icon svg {
 stroke: var(--green);
 opacity: 0.7;
}

.auth-block-title {
 font-size: 18px;
 font-weight: 700;
 color: var(--dark-blue);
 margin-bottom: 12px;
}

.auth-block-text {
 font-size: 13px;
 color: #666;
 line-height: 1.6;
 max-width: 500px;
 margin: 0 auto 20px;
}

.auth-block-btn {
 display: inline-block;
 padding: 14px 40px;
 background: var(--green);
 color: white;
 font-size: 14px;
 font-weight: 600;
 text-decoration: none;
 border-radius: 6px;
 transition: background 0.25s, transform 0.15s;
 letter-spacing: 0.5px;
 text-transform: uppercase;
}

.auth-block-btn:hover {
 background: var(--dark-blue);
 transform: translateY(-1px);
}

/* ─── My Configurations Modal ─────────────────────────────────────── */
.configs-modal-overlay {
 display: none;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: rgba(0, 0, 0, 0.45);
 z-index: 3000;
 align-items: center;
 justify-content: center;
 backdrop-filter: blur(3px);
}

.configs-modal {
 background: white;
 border-radius: 14px;
 width: 90%;
 max-width: 560px;
 max-height: 80vh;
 display: flex;
 flex-direction: column;
 box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
 overflow: hidden;
 animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
 from { opacity: 0; transform: translateY(20px); }
 to { opacity: 1; transform: translateY(0); }
}

.configs-modal-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 18px 24px;
 border-bottom: 1px solid #eee;
}

.configs-modal-header h3 {
 font-size: 16px;
 font-weight: 700;
 color: var(--dark-blue);
 margin: 0;
}

.configs-modal-close {
 width: 32px;
 height: 32px;
 border: none;
 background: #f5f5f5;
 border-radius: 8px;
 font-size: 20px;
 color: #888;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s;
}

.configs-modal-close:hover {
 background: #eee;
 color: #333;
}

.configs-modal-body {
 padding: 16px 24px;
 overflow-y: auto;
 flex: 1;
}

.configs-loading {
 text-align: center;
 padding: 30px;
 color: #999;
 font-size: 13px;
}

.configs-empty {
 text-align: center;
 padding: 30px;
 color: #999;
 font-size: 13px;
}

.configs-list {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.configs-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px 14px;
 background: #fafafa;
 border: 1px solid #eee;
 border-radius: 8px;
 transition: border-color 0.15s, background 0.15s;
}

.configs-item:hover {
 border-color: var(--green);
 background: #f8fdf5;
}

.configs-item-info {
 flex: 1;
 overflow: hidden;
}

.configs-item-code {
 display: block;
 font-family: monospace;
 font-size: 14px;
 font-weight: 700;
 color: var(--green);
 letter-spacing: 1px;
}

.configs-item-name {
 display: block;
 font-size: 12px;
 color: #888;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 margin-top: 2px;
}

.configs-item-date {
 font-size: 11px;
 color: #aaa;
 white-space: nowrap;
}

.configs-item-load {
 padding: 6px 16px;
 background: white;
 border: 1px solid var(--green);
 color: var(--green);
 font-size: 12px;
 font-weight: 600;
 border-radius: 5px;
 cursor: pointer;
 transition: all 0.2s;
 white-space: nowrap;
}

.configs-item-load:hover {
 background: var(--green);
 color: white;
}

/* ─── Responsive adjustments for auth elements ────────────────────── */
@media (max-width: 768px) {
 .user-dropdown {
  width: 280px;
  right: -10px;
 }

 .auth-block-inner {
  padding: 30px 20px;
 }

 .auth-block-title {
  font-size: 16px;
 }

 .configs-modal {
  width: 95%;
  max-height: 85vh;
 }
}
