    :root {
      --booth-size: 100px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      background-color: white;
      font-family: 'Poppins', sans-serif;
      color: #333;
    }

    .main-row {
      margin-top: 100px;
    }

    .legend {
      text-align: center;
      padding: 20px;
    }

    .layout {
      display: grid;
      grid-template-columns: repeat(9, var(--booth-size));
      grid-auto-rows: var(--booth-size);
      justify-content: center;
      padding: 20px;
      overflow-x: auto;
    }

    /* Machinery Layout Styles - Matching Exhibition */
    .machinery-layout {
        position: relative;
        margin: 0 auto;
        max-width: 900px;
    }

    .layout-header {
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #e9ecef;
    }

    .layout-header h4 {
        color: #2c5530;
        font-weight: 600;
        margin-bottom: 10px;
    }

    .layout-header p {
        color: #6c757d;
        font-size: 14px;
        max-width: 600px;
        margin: 0 auto;
    }

    .entry-exit-labels {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        padding: 0 20px;
    }

    .entry-label, .exit-label {
        background-color: #40b349;
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .machinery-grid-container {
        padding: 20px;
        position: relative;
        display: grid;
        grid-template-columns: repeat(9, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 12px;
        margin: 0 auto;
        background-color: white;
        min-height: 400px;
    }

    .machine-layout-container{
       border: 2px solid #333;
       background-color: #f9f9f9;
    }

    .machinery-layout-container {
        border: 2px solid #333;
        padding: 20px;
        background-color: #f9f9f9;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .booth {
      background-color: #2CAB4C;
      color: white;
      font-weight: bold;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid white;
      border-radius: 4px;
      position: relative;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    /* Machinery Plot Specific Styles */
    .machinery-plot {
        background-color: #40b349;
        color: white;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #2c5530;
        border-radius: 6px;
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 80px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .machinery-plot .plot-number {
        font-size: 18px;
        font-weight: 700;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    .machinery-plot.booth-available {
        background-color: #40b349;
        border-color: #2c5530;
    }

    .machinery-plot.booth-available:hover {
        background-color: #369c3e;
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .machinery-plot.booth-reserved {
        background-color: #6c757d;
        color: #212529;
        border-color: #6c757d;
        cursor: not-allowed;
    }

    .machinery-plot.booth-booked {
        background-color: #dc3545;
        border-color: #b02a37;
        cursor: not-allowed;
    }

    .machinery-plot.booth-reserved:hover,
    .machinery-plot.booth-booked:hover {
        transform: none;
    }

    /* Entry/Exit Area Styles */
    .entry-exit-area {
        /* background-color: #f8f9fa; */
        /* border: 2px dashed #6c757d; */
        border-radius: 8px;
        display: flex;
        align-items: left;
        justify-content: center;
        min-height: 80px;
        position: relative;
    }

    .entry-exit-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 10px;
    }

    .entry-exit-text {
        font-weight: 600;
        color: #495057;
        text-align: center;
        font-size: 12px;
        flex: 1;
    }

    .entry-arrow, .exit-arrow {
        font-size: 10px;
        font-weight: 600;
        color: #40b349;
        white-space: nowrap;
    }

    .entry-arrow.left {
        text-align: left;
    }

    .exit-arrow.right {
        text-align: right;
    }

    /* Plot Status Styles */
    .booth-available {
        background-color: #2CAB4C;
        color: white;
    }

    .booth-available:hover {
        background-color: #28a745;
        transform: scale(1.05);
    }

    .booth-reserved {
        background-color: #6C757D;
        color: #fff;
        cursor: not-allowed;
    }

    .booth-booked {
        background-color: #dc3545;
        color: white;
        cursor: not-allowed;
    }

    .booth-reserved:hover,
    .booth-booked:hover {
        transform: none;
    }

    .d-block{
      display: block;
    }

    .empty {
      background-color: transparent;
    }

    /* Machinery Key Styles - Matching Exhibition Layout */
    .machinery-key {
        margin: 0 0 20px 0;
        padding: 15px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f5f5f5;
        width: 100%;
    }

    .machinery-key-header {
        font-weight: bold;
        text-align: center;
        margin-bottom: 15px;
        font-size: 16px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 8px;
    }

    .machinery-key-body {
        display: flex;
        align-items: flex-start;
        gap: 25px;
        justify-content: center;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .machinery-key-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 10px 10px;
        flex: 1;
        min-width: 200px;
    }

    .key-subheader {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 5px;
        text-align: center;
    }

    .machinery-key-item {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        gap: 5px;
    }

    .plot-key {
        height: 10px;
        width: 10px;
        border: 1px solid black;
        margin-right: 5px;
    }

    .plot-available {
        background-color: #28a745;
    }

    .plot-reserved {
        background-color: #6c757d;
    }

    .plot-booked {
        background-color: #dc3545;
    }

    /* Admin reset button styles - Consistent with Exhibition */
    .admin-reset-btn {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: #dc3545;
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 100;
        border: 1px solid white;
        box-shadow: 0 0 5px rgba(0,0,0,0.3);
        visibility: hidden;
    }

    .booth-reserved:hover .admin-reset-btn,
    .booth-booked:hover .admin-reset-btn {
        visibility: visible;
    }

    /* Layout Information Styles */
    .layout-info {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        padding: 20px;
        margin-top: 20px;
    }

    .layout-info h6 {
        color: #2c5530;
        font-weight: 600;
        margin-bottom: 15px;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 8px;
    }

    .layout-info ul li {
        margin-bottom: 8px;
        color: #495057;
    }

    .legend-box {
        display: inline-block;
        width: 20px;
        height: 20px;
        margin-right: 10px;
        border: 1px solid #333;
        border-radius: 3px;
        vertical-align: middle;
    }

    .legend-box.available {
        background-color: #40b349;
    }

    .legend-box.reserved {
        background-color: #6c757d;
    }

    .legend-box.booked {
        background-color: #dc3545;
    }

    /* Entry/Exit Areas - SVG Only */
    .entry-exit-area {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 80px;
        height: 80px;
    }
    
    .entry-icon {
        width: 40px;
        height: 20px;
        transform: rotate(90deg);
        opacity: 0.7;
        filter: invert(0.3);
    }

    /* Enhanced Custom Tooltip Styles */
    .custom-tooltip {
        display: flex;
        flex-direction: column;
        color: #fff !important;
        padding: 8px !important;
        text-align: left !important;
        align-items: flex-start !important;
        min-width: 200px;
        font-size: 13px;
    }
    
    .tooltip-plot-number {
        font-weight: bold !important;
        font-size: 14px !important;
        margin-bottom: 6px !important;
        text-align: center !important;
        width: 100%;
        color: #fff !important;
        border-bottom: 1px solid rgba(255,255,255,0.3);
        padding-bottom: 4px !important;
    }
    
    .tooltip-status {
        margin: 4px 0 !important;
        text-align: center !important;
        width: 100%;
    }
    
    .tooltip-status .badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
        font-weight: 600 !important;
    }
    
    .tooltip-org {
        font-weight: 600 !important;
        margin: 6px 0 !important;
        color: #ffd700 !important;
        text-align: center !important;
        width: 100%;
        font-size: 12px !important;
    }
    
    .tooltip-info {
        font-style: italic !important;
        color: #90EE90 !important;
        margin: 4px 0 !important;
        text-align: center !important;
        width: 100%;
        font-size: 11px !important;
    }
    
    .tooltip-details {
        margin-top: 6px !important;
        padding-top: 6px !important;
        border-top: 1px solid rgba(255,255,255,0.3);
        width: 100%;
    }
    
    .tooltip-size {
        font-size: 11px !important;
        color: #ccc !important;
        margin-bottom: 3px !important;
    }
    
    .tooltip-price {
        font-weight: 600 !important;
        color: #fff !important;
        font-size: 12px !important;
    }
    
    .tooltip-title {
        font-weight: bold !important;
        margin-bottom: 4px !important;
        color: #fff !important;
    }
    
    .tooltip-dimensions {
        font-size: 12px !important;
        color: #ccc !important;
        margin-bottom: 4px !important;
    }
    
    .tooltip-price {
        font-weight: 600 !important;
        margin-bottom: 4px !important;
        color: #fff !important;
    }
    
    .tooltip-status {
        margin-top: 2px !important;
    }
    
    .tooltip-status .badge {
        font-size: 11px !important;
        padding: 2px 6px !important;
        border-radius: 3px !important;
    }
    
    .tooltip-status .bg-success {
        background-color: #28a745 !important;
        color: white !important;
    }
    
    .tooltip-status .bg-warning {
        background-color: #ffc107 !important;
        color: #000 !important;
    }
    
    .tooltip-status .bg-danger {
        background-color: #dc3545 !important;
        color: white !important;
    }

    /* Add tooltip enhancements */
    .tooltip {
        position: absolute;
        z-index: 1070;
        display: block;
        margin: 0;
        font-style: normal;
        font-weight: 400;
        line-height: 1.5;
        text-align: left;
        text-decoration: none;
        text-shadow: none;
        text-transform: none;
        letter-spacing: normal;
        word-break: normal;
        word-spacing: normal;
        white-space: normal;
        line-break: auto;
        font-size: 0.875rem;
        word-wrap: break-word;
        opacity: 0;
    }

    .tooltip.show {
        opacity: 0.9;
    }

    .tooltip-dark .tooltip-inner {
        background-color: #000 !important;
        color: #fff !important;
        max-width: 250px !important;
        padding: 0.5rem 0.75rem !important;
        text-align: left !important;
        border-radius: 0.375rem !important;
        font-size: 0.875rem !important;
    }

    .tooltip-inner {
        max-width: 250px !important;
        padding: 0.5rem 0.75rem !important;
        color: #fff !important;
        text-align: left !important;
        background-color: #000 !important;
        border-radius: 0.375rem !important;
        font-size: 0.875rem !important;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .machinery-grid-container {
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(7, 1fr);
            gap: 10px;
            padding: 15px;
        }

        .machinery-plot {
            min-height: 60px;
        }

        .machinery-plot .plot-number {
            font-size: 14px;
        }

        .entry-exit-labels {
            padding: 0 10px;
        }

        .layout-header p {
            font-size: 12px;
        }
    }

    @media (max-width: 480px) {
        .machinery-grid-container {
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(10, 1fr);
            gap: 8px;
            padding: 10px;
        }

        .machinery-plot {
            min-height: 50px;
        }

        .machinery-plot .plot-number {
            font-size: 12px;
        }
    }

    /* Tooltip styles - Consistent with Farm and Exhibition */
    .tooltip-inner {
        max-width: 200px;
        padding: 0.25rem 0.5rem;
        color: #fff;
        text-align: center;
        background-color: rgba(0, 0, 0, 0.9);
        border-radius: 0.25rem;
    }
    
    /* Tooltip badge styles */
    .tooltip .badge {
        font-size: 0.75em;
        padding: 0.25em 0.5em;
    }
    
    .tooltip .bg-success {
        background-color: #28a745 !important;
    }
    
    .tooltip .bg-warning {
        background-color: #6C757D !important;
        color: #fff !important;
    }
    
    .tooltip .bg-danger {
        background-color: #dc3545 !important;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        :root {
            --booth-size: 60px;
        }
        
        .machinery-key-body {
            flex-direction: column;
            gap: 15px;
        }
        
        .machinery-key-section {
            min-width: auto;
        }
    }

    @media (max-width: 480px) {
        :root {
            --booth-size: 45px;
        }
    }

    /* Modal Styles - Consistent with Farm Modal */
    #machinery-modal .modal-header {
        background-color: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
    }

    #machinery-modal .modal-title {
        color: #333;
        font-weight: 600;
    }

    #machinery-modal .alert-light-primary {
        background-color: #e3f2fd;
        border: 1px solid #bbdefb;
        color: #1976d2;
    }

    #machinery-modal .form-label {
        font-weight: 600;
        color: #333;
        margin-bottom: 0.5rem;
    }

    #machinery-modal .form-control {
        border: 1px solid #d1d3e2;
        border-radius: 0.35rem;
        padding: 0.75rem 1rem;
    }

    #machinery-modal .form-control:focus {
        border-color: #40b349;
        box-shadow: 0 0 0 0.2rem rgba(64, 179, 73, 0.25);
    }

    #machinery-modal .btn-primary {
        background-color: #40b349;
        border-color: #40b349;
    }

    #machinery-modal .btn-primary:hover {
        background-color: #369e3f;
        border-color: #369e3f;
    }

    #machinery-modal .btn-primary:focus {
        box-shadow: 0 0 0 0.2rem rgba(64, 179, 73, 0.5);
    }

    /* Machinery Grid Container */
    .machinery-grid-container {
        display: grid;
        grid-template-columns: repeat(9, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 12px;
        margin: 0 auto;
        background-color: white;
        min-height: 400px;
        padding: 20px;
        border-radius: 6px;
        border: 1px solid #dee2e6;
    }

    .machinery-plot {
        background-color: #40b349;
        color: white;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #2c5530;
        border-radius: 6px;
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 60px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .machinery-plot .plot-number {
        font-size: 16px;
        font-weight: 700;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    .machinery-plot.booth-available {
        background-color: #40b349;
        color: white;
        border-color: #2c5530;
    }

    .machinery-plot.booth-available:hover {
        background-color: #369c3e;
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .machinery-plot.booth-reserved {
        background-color: #6c757d;
        color: white;
        border-color: #6c757d;
        cursor: not-allowed;
    }

    .machinery-plot.booth-booked {
        background-color: #dc3545;
        color: white;
        border-color: #b02a37;
        cursor: not-allowed;
    }

    .machinery-plot.booth-reserved:hover,
    .machinery-plot.booth-booked:hover {
        transform: none;
    }

    .entry-exit-area {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 60px;
    }
    
    /* Override for grid layout entry-exit areas */
    .machinery-grid-container .entry-exit-area {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .entry-label-small {
        background-color: #17a2b8;
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: center;
        line-height: 1.2;
    }

    .plot-status-indicator {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        border: 2px solid;
        display: inline-block;
    }

    .plot-status-indicator.available {
        background-color: #28a745;
        border-color: #1e7e34;
    }

    .plot-status-indicator.reserved {
        background-color: #6c757d;
        border-color: #545b62;
    }

    .plot-status-indicator.booked {
        background-color: #dc3545;
        border-color: #bd2130;
    }

    .entry-labels {
        display: flex;
        justify-content: space-between;
        margin-top: 15px;
        padding: 0 20px;
    }

    .entry-label {
        background-color: #17a2b8;
        color: white;
        padding: 6px 12px;
        border-radius: 15px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Status Legend Below Layout */
    .machinery-status-legend {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        padding: 15px;
        margin: 20px auto;
        max-width: 400px;
        text-align: center;
    }
    
    .status-legend-header {
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 15px;
        color: #2c5530;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 8px;
    }
    
    .status-legend-body {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .status-legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: #495057;
    }
    
    .status-indicator {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        border: 2px solid;
    }
    
    .status-indicator.available {
        background-color: #40b349;
        border-color: #2c5530;
    }
    
    .status-indicator.reserved {
        background-color: #6c757d;
        border-color: #545b62;
    }
    
    .status-indicator.booked {
        background-color: #dc3545;
        border-color: #bd2130;
    }

    /* Card containment for machinery layout */
    .card .machinery-grid-container {
        overflow-x: auto;
        overflow-y: visible;
    }
    
    /* Responsive adjustments for new layout */
    @media (max-width: 768px) {
        .machinery-grid-container {
            grid-template-columns: repeat(9, 60px);
            grid-template-rows: repeat(5, 60px);
            gap: 8px;
            padding: 15px;
            margin: 10px auto;
        }
        
        .machinery-plot {
            width: 60px;
            height: 60px;
            font-size: 12px;
        }
        
        .machinery-plot .plot-number {
            font-size: 14px;
        }
        
        .entry-exit-area {
            width: 60px;
            height: 60px;
        }
        
        .entry-icon {
            width: 30px;
            height: 15px;
        }
    }

    @media (max-width: 480px) {
        .machinery-grid-container {
            grid-template-columns: repeat(9, 45px);
            grid-template-rows: repeat(5, 45px);
            gap: 6px;
            padding: 10px;
            margin: 10px auto;
        }
        
        .machinery-plot {
            width: 45px;
            height: 45px;
            font-size: 10px;
        }
        
        .machinery-plot .plot-number {
            font-size: 12px;
        }
        
        .entry-exit-area {
            width: 45px;
            height: 45px;
        }
        
        .entry-icon {
            width: 25px;
            height: 12px;
        }
    }

    /* Enhanced Tooltip Styling */
    .machinery-tooltip {
        background-color: #333 !important;
        color: #fff !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        padding: 8px 12px !important;
        border-radius: 6px !important;
        text-align: left !important;
        white-space: pre-line !important;
        max-width: 200px !important;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    }
    
    .tooltip.show {
        opacity: 1 !important;
    }
    
    .tooltip .arrow::before {
        border-top-color: #333 !important;
    }
