/* Wax Paper Designer Styles — Single-page layout */

.wax-paper-designer-container {
    padding: 2rem 0;
}

/* ===== 3-Column Grid Layout ===== */
.wax-designer-layout {
    display: grid;
    grid-template-columns: 280px minmax(600px, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
    max-width: none;
    margin: 0 auto;
    width: 100%;
    padding: 0 0.5rem;
}

.wax-panel {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wax-panel-controls {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.wax-panel-controls::-webkit-scrollbar {
    width: 5px;
}
.wax-panel-controls::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wax-panel-order {
    position: sticky;
    top: 20px;
}

.left-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.left-vertical-wrap {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.6rem;
    align-items: start;
}

.left-tabs-vertical {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.left-tab-content {
    min-height: 320px;
}

.left-tab-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.left-tab-btn.is-active {
    border-color: #e4aa3f;
    background: #fff8eb;
    color: #92400e;
}

.compact-preview-box {
    max-width: 540px;
    margin: 0 auto;
    height: 420px !important;
}

.wax-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.wax-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wax-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #e4aa3f;
}

/* ===== Upload Area ===== */
.upload-area {
    cursor: pointer;
    border: 2px dashed #e4aa3f !important;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #d69e36 !important;
    background: linear-gradient(145deg, #fff9f0 0%, #f8f9fa 100%);
    box-shadow: 0 8px 25px rgba(228, 170, 63, 0.2);
}

.upload-area.dragover {
    border-color: #28a745 !important;
    background: linear-gradient(145deg, #e8f5e8 0%, #f8f9fa 100%);
}

.upload-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
}

.upload-spinner-small {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.upload-spinner .spinner-border,
.upload-spinner-small .spinner-border {
    color: #e4aa3f !important;
}

/* ===== Template Card Styles ===== */
.template-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.template-card:hover {
    border-color: #e4aa3f;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.template-card.selected {
    border-color: #e4aa3f;
    background: #fff9f0;
    box-shadow: 0 8px 20px rgba(228, 170, 63, 0.2);
}

.template-card.small {
    border-radius: 6px;
    margin-bottom: 0.5rem;
    max-width: 100%;
}

.template-card.small:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card.small.selected {
    box-shadow: 0 3px 10px rgba(228, 170, 63, 0.3);
}

.template-card.small .template-info {
    padding: 0.3rem;
    text-align: center;
}

.template-card.small .template-info small {
    font-weight: 500;
    color: #333;
    font-size: 0.75rem;
}

.template-card.small .template-image {
    height: 60px;
    overflow: hidden;
}

.template-card.small .template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-image {
    position: relative;
    overflow: hidden;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(228, 170, 63, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card.selected .template-overlay {
    opacity: 1;
}

.template-overlay i {
    color: white;
    font-size: 2rem;
}

.template-info {
    padding: 1rem;
    text-align: center;
}

.template-info h6 {
    margin-bottom: 0.5rem;
    color: #333;
}

.template-info p {
    margin: 0;
    color: #666;
    font-size: 0.875rem;
}

/* ===== Scale Slider ===== */
.scale-slider {
    width: 100%;
    accent-color: #e4aa3f;
    height: 6px;
    cursor: pointer;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.control-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    padding: 0.55rem;
}

/* ===== Design Preview ===== */
.preview-section {
    background: white;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dimensions-display {
    position: relative;
    margin-bottom: 0.5rem;
}

.dimension-label {
    position: absolute;
    background: #e4aa3f;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

.height-box {
    top: 10px;
    left: -60px;
    transform: rotate(-90deg);
    transform-origin: center;
}

.width-box {
    position: static;
}

.form-control{
    margin-bottom: 0px !important;
}

.main-paper-box {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    transition: all 0.3s ease;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    padding: 8px;
    position: relative;
}

.preview-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #6b7280;
    font-size: 0.92rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(249,250,251,0.9), rgba(255,255,255,0.9));
    border-radius: 8px;
    z-index: 1;
    pointer-events: none;
}

.preview-empty-state i {
    font-size: 1.4rem;
    color: #9ca3af;
}

.main-paper-box.has-pattern {
    height: 600px;
    transition: height 0.3s ease;
}

.main-paper-box.has-pattern.pattern1 { height: 600px; }
.main-paper-box.has-pattern.pattern2 { height: 600px; }
.main-paper-box.has-pattern.pattern3 { height: 600px; }
.main-paper-box.has-pattern.pattern4 { height: 600px; }
.main-paper-box.has-pattern.pattern5 { height: 600px; }
.main-paper-box.has-pattern.pattern6 { height: 600px; }
.main-paper-box.has-pattern.pattern7 { height: 600px; }
.main-paper-box.has-pattern.pattern8 { height: 600px; }
.main-paper-box.has-pattern.pattern9 { height: 600px; }
.main-paper-box.has-pattern.pattern10 { height: 600px; }
.main-paper-box.has-pattern.pattern11 { height: 600px; }
.main-paper-box.has-pattern.pattern12 { height: 600px; }

/* Logo Builder Area */
.logo-builder-area {
    width: 100%;
    height: 100%;
    position: relative;
}

#designCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#legacyRenderHost {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    z-index: -1;
}

#legacyPaperBox {
    margin: 0 !important;
    width: 600px;
    height: 420px;
    overflow: hidden;
}

.styles {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
}

.pattern5 .logo-box:nth-child(2n){
    opacity: 1 !important;
}

.logo-box {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ===== Template Pattern Styles ===== */
.main-paper-box .styles.pattern1 .logo-box {
    width: calc(100% / 8) !important;
    padding: 10px;
    justify-content: center;
}

.main-paper-box .styles.pattern1 .logo-box img {
    max-width: 65px;
    min-width: 51px;
}

.pattern1-height {
    height: 400px !important;
}

.main-paper-box .styles.pattern2 .logo-box {
    width: calc(100% / 5) !important;
    padding: 7px;
    display: flex;
    justify-content: center;
}

.main-paper-box .styles.pattern3 .logo-box {
    width: calc(100% / 13) !important;
    padding: 7px;
    display: flex;
    justify-content: center;
}

.main-paper-box .styles.pattern3 .logo-box:nth-child(2n) {
    opacity: 0;
    padding: 0px !important;
}

.main-paper-box .styles.pattern4 .logo-box {
    width: calc(100% / 9) !important;
    padding: 7px;
    display: flex;
    justify-content: center;
}

.main-paper-box .styles.pattern4 .logo-box:nth-child(2n) {
    opacity: 0;
}

.main-paper-box .styles.pattern5 .logo-box {
    width: calc(100% / 8) !important;
    padding: 5px;
    display: flex;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.main-paper-box .styles.pattern5 .logo-box:nth-child(3n) {
    opacity: 0.3;
}

.main-paper-box .styles.pattern5 .logo-box:nth-child(5n) {
    transform: scale(0.8);
}

.main-paper-box .styles.pattern6 .logo-box {
    width: calc(100% / 9) !important;
    padding: 7px;
    display: flex;
    justify-content: center;
    transform: rotate(-50deg);
}

.main-paper-box .styles.pattern6 .logo-box:nth-child(2n) {
    opacity: 0;
}

.main-paper-box .styles.pattern7 .logo-box {
    width: calc(100% / 13) !important;
    padding: 2px;
    display: flex;
    justify-content: center;
    transform: rotate(4deg);
}

.main-paper-box .styles.pattern8 .logo-box {
    display: none;
}

.main-paper-box .styles.pattern8 .logo-box:nth-child(1) {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-paper-box .styles.pattern8 .logo-box:nth-child(1) img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-paper-box .styles.pattern9 .logo-box {
    width: calc(100% / 8) !important;
    padding: 6px;
    display: flex;
    justify-content: center;
    transform: rotate(12deg);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-paper-box .styles.pattern9 .logo-box:nth-child(3n) {
    opacity: 0.8;
    transform: rotate(12deg) scale(0.9);
}

.main-paper-box .styles.pattern9 .logo-box:nth-child(5n) {
    opacity: 0.6;
    transform: rotate(12deg) scale(1.1);
}

.main-paper-box .styles.pattern10 .logo-box {
    width: calc(100% / 7) !important;
    padding: 8px;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(228, 170, 63, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.main-paper-box .styles.pattern10 .logo-box:nth-child(2n) {
    opacity: 0.85;
    transform: scale(0.95);
}

.main-paper-box .styles.pattern10 .logo-box:nth-child(4n) {
    opacity: 0.7;
    transform: scale(1.05);
}

.main-paper-box .styles.pattern11 .logo-box {
    width: calc(100% / 11) !important;
    padding: 4px;
    display: flex;
    justify-content: center;
    transform: rotate(-8deg);
    border-radius: 50%;
    overflow: hidden;
}

.main-paper-box .styles.pattern11 .logo-box:nth-child(3n) {
    opacity: 0.75;
    transform: rotate(-8deg) scale(0.85);
}

.main-paper-box .styles.pattern11 .logo-box:nth-child(5n) {
    opacity: 0.6;
    transform: rotate(-8deg) scale(1.15);
}

.main-paper-box .styles.pattern12 .logo-box {
    width: calc(100% / 9) !important;
    padding: 7px;
    display: flex;
    justify-content: center;
    transform: rotate(6deg);
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(228, 170, 63, 0.15);
}

.main-paper-box .styles.pattern12 .logo-box:nth-child(2n) {
    opacity: 0.9;
    transform: rotate(6deg) scale(0.9);
}

.main-paper-box .styles.pattern12 .logo-box:nth-child(3n) {
    opacity: 0.7;
    transform: rotate(6deg) scale(1.1);
}

/* ===== Form Section Styles ===== */
.design-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.specifications-panel {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.specifications-panel h5 {
    color: #333;
    border-bottom: 2px solid #e4aa3f;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control-color {
    width: 60px;
    height: 38px;
    border-radius: 6px;
}

.color-preview {
    font-family: monospace;
    font-size: 0.875rem;
    color: #666;
}

/* ===== Order Form Styles ===== */
.order-form-wrapper {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.5rem;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e4aa3f;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.summary-content p {
    margin-bottom: 0.5rem;
}

.summary-content strong {
    color: #333;
}

/* ===== Button Styles ===== */
.btn-success {
    background-color: #e4aa3f;
    border-color: #e4aa3f;
}

.btn-success:hover {
    background-color: #d69e36;
    border-color: #d69e36;
}

/* ===== Modal Styles ===== */
.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-number {
    font-size: 4rem;
    font-weight: bold;
    color: #e4aa3f;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    background: linear-gradient(90deg, #e4aa3f, #d69e36, #e4aa3f);
    background-size: 200% 100%;
}

.processing-steps {
    text-align: left;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.step-item i {
    margin-right: 0.5rem;
    width: 16px;
}

.step-item.completed {
    color: #28a745;
}

.step-item.active {
    color: #007bff;
    font-weight: bold;
}

.success-icon {
    color: #28a745;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1199px) {
    .wax-designer-layout {
        grid-template-columns: 240px 1fr 280px;
        gap: 1rem;
    }
}

@media (max-width: 991px) {
    .wax-designer-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .wax-panel-controls {
        max-height: none;
        overflow-y: visible;
    }

    .wax-panel-order {
        position: static;
    }

    .main-paper-box {
        height: 250px;
        width: 100%;
        max-width: 100%;
    }

    .left-vertical-wrap {
        grid-template-columns: 1fr;
    }

    .left-tabs-vertical {
        grid-template-columns: 1fr 1fr;
    }

    .compact-preview-box {
        height: 300px !important;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .wax-paper-designer-container {
        padding: 1rem 0;
    }

    .wax-designer-layout {
        padding: 0 0.5rem;
    }

    .wax-panel {
        padding: 1rem;
    }

    .main-paper-box {
        height: 200px;
        max-width: 100%;
        padding: 6px;
    }

    .template-card {
        margin-bottom: 0.5rem;
    }

    .template-card.small .template-info {
        padding: 0.25rem;
    }

    .template-card.small .template-info small {
        font-size: 0.7rem;
    }

    .template-card.small .template-image {
        height: 50px;
    }

    .dimension-label {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .form-control, .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .control-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure dropdowns show all options */
.form-select {
    max-height: none !important;
    overflow: visible !important;
}

.form-select option {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-select optgroup {
    display: block !important;
    visibility: visible !important;
}

.form-select optgroup option {
    padding-left: 20px !important;
}

@media (max-width: 576px) {
    .wax-paper-designer-container {
        padding: 0.5rem 0;
    }

    .wax-designer-layout {
        padding: 0 0.25rem;
    }

    .wax-panel {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .main-paper-box {
        height: 180px;
        padding: 4px;
        border-width: 1px;
    }

    .template-card.small .template-info small {
        font-size: 0.65rem;
    }

    .dimension-label {
        display: none;
    }

    .form-control, .form-select {
        font-size: 16px;
        padding: 0.75rem 0.5rem;
    }

    .color-picker-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .form-control-color {
        width: 100%;
        height: 45px;
        border-radius: 6px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .btn-lg {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

    .templates-grid .col-4 {
        margin-bottom: 0.5rem;
        padding: 0.125rem;
    }
}

/* ===== Touch and Mobile Optimizations ===== */
@media (max-width: 768px) {
    .template-card {
        min-height: 60px;
        touch-action: manipulation;
    }

    .btn, button {
        min-height: 44px;
        touch-action: manipulation;
    }

    .template-card, .btn {
        -webkit-tap-highlight-color: transparent;
    }

    .template-card, .wax-panel-controls .btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* ===== Allow text selection ===== */
.wax-paper-designer-container * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.wax-paper-designer-container input,
.wax-paper-designer-container select,
.wax-paper-designer-container textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.wax-paper-designer-container img {
    -webkit-user-drag: auto;
    -khtml-user-drag: auto;
    -moz-user-drag: auto;
    -o-user-drag: auto;
    user-drag: auto;
}

/* ===== Utility Classes (Bootstrap-replacement) ===== */
.wax-hidden {
    display: none !important;
}
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-muted { color: #6b7280 !important; }
.text-warning { color: #e4aa3f !important; }
.text-success { color: #16a34a !important; }
.text-primary { color: #2563eb !important; }
.bg-light { background: #f8f9fa !important; }
.bg-white { background: #ffffff !important; }
.rounded { border-radius: 0.5rem !important; }
.rounded-lg { border-radius: 0.75rem !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important; }
.border { border: 1px solid #e5e7eb !important; }
.border-top { border-top: 1px solid #e5e7eb !important; }
.w-100 { width: 100% !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.gap-2 { gap: 0.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.pt-3 { padding-top: 0.75rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin-left: -0.5rem; margin-right: -0.5rem; }
.row > [class*="col-"] { padding-left: 0.5rem; padding-right: 0.5rem; }
.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333333%; }

@media (max-width: 767px) {
    .col-md-6, .col-md-12 { width: 100%; }
}
@media (min-width: 768px) {
    .col-md-6 { width: 50%; }
    .col-md-12 { width: 100%; }
}
@media (max-width: 991px) {
    .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6 { width: 100%; }
}
@media (min-width: 992px) {
    .col-lg-3 { width: 25%; }
    .col-lg-4 { width: 33.333333%; }
    .col-lg-5 { width: 41.666667%; }
    .col-lg-6 { width: 50%; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { font-size: 0.82rem; padding: 0.4rem 0.65rem; }
.btn-lg { font-size: 1rem; padding: 0.7rem 1rem; }
.btn-warning { background: #e4aa3f; border-color: #e4aa3f; color: #111827; }
.btn-warning:hover { background: #d69e36; border-color: #d69e36; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-secondary { background: #6b7280; border-color: #6b7280; color: #fff; }
.btn-info { background: #0891b2; border-color: #0891b2; color: #fff; }
.btn-outline-primary { background: transparent; border-color: #2563eb; color: #2563eb; }
.btn-outline-secondary { background: transparent; border-color: #6b7280; color: #374151; }

.form-control,
.form-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    color: #111827;
    padding: 0.55rem 0.65rem;
}
.form-label { display: block; margin-bottom: 0.35rem; font-weight: 600; color: #374151; }
.form-control-color { padding: 0.2rem; }

.spinner-border {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-top-color: currentColor;
    border-radius: 9999px;
    animation: wax-spin 0.8s linear infinite;
}
.spinner-border-sm { width: 0.85rem; height: 0.85rem; }
@keyframes wax-spin { to { transform: rotate(360deg); } }

.modal { display: none; position: fixed; inset: 0; background: rgba(17, 24, 39, 0.55); z-index: 100050; padding: 1rem; }
.modal.is-open { display: flex; align-items: center; justify-content: center; z-index: 100050; }
.wax-modal-open { overflow: hidden; }
.modal-dialog { width: min(100%, 900px); }
.modal-content { background: #fff; border-radius: 0.75rem; box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25); overflow: hidden; }
.modal-header, .modal-footer { padding: 0.85rem 1rem; border-bottom: 1px solid #e5e7eb; }
.modal-footer { border-bottom: none; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 0.5rem; }
.modal-body { padding: 1rem; }
.modal-title { margin: 0; }
.btn-close { background: none; border: 0; width: 1.5rem; height: 1.5rem; cursor: pointer; position: relative; }
.btn-close::before, .btn-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 1rem; height: 2px; background: #6b7280; }
.btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.wax-alert {
    border-radius: 0.5rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.8rem;
    border: 1px solid transparent;
    font-weight: 500;
}
.wax-alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.wax-alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.wax-alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.wax-alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.img-fluid { max-width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
