/* Main Stylesheet */
@import url('theme.css');

/* Admin Shell specific overrides */
.admin-shell .modal {
    background: radial-gradient(circle at top, rgba(8, 145, 178, 0.38) 0%, rgba(1, 12, 18, 0.92) 70%);
}

.admin-shell .modal-content {
    background: linear-gradient(170deg, rgba(2, 36, 44, 0.94), rgba(1, 16, 24, 0.96));
    border-radius: 28px;
    box-shadow: 0 50px 120px rgba(0, 10, 16, 0.7), inset 0 0 0 1px rgba(94, 234, 212, 0.26);
    color: rgba(236, 254, 255, 0.94);
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.admin-shell .modal-body label {
    color: rgba(236, 254, 255, 0.88);
}

.admin-shell .modal-body input,
.admin-shell .modal-body select,
.admin-shell .modal-body textarea {
    border-radius: 18px;
    background: rgba(236, 254, 255, 0.96);
    color: #000000;
}

.app-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 1.8rem 2rem 2.2rem;
    background: var(--cf-shell);
    border-radius: 28px;
    box-shadow: var(--shadow-shell);
    color: var(--cf-text);
}

.app-shell-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.2rem;
}

.app-shell-title {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cf-heading);
}

.app-shell-subtitle {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cf-text-muted);
}

.app-shell-panel {
    background: transparent;
    border-radius: 28px;
    box-shadow: none;
    padding: 1.2rem 1.4rem;
}

.app-shell-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 999px;
    background: transparent;
    padding: 0.65rem 1.1rem;
    box-shadow: none;
}

.app-shell-toolbar .btn {
    border-radius: 999px;
    background: rgba(45, 205, 190, 0.18);
    border: 1px solid var(--cf-border-strong);
    color: rgba(224, 255, 248, 0.9);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.48rem 0.9rem;
    min-width: 130px;
    transition: background 0.18s ease, color 0.18s ease;
}

.app-shell-toolbar .btn:hover:not(:disabled) {
    background: rgba(94, 234, 212, 0.42);
    color: #022c2a;
}

/* Usage indicator styles */
.usage-indicator {
    font-size: 0.85em;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    display: inline-block;
}

.usage-indicator.usage-ok {
    background-color: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #a8d4a8;
}

.usage-indicator.usage-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.usage-indicator.usage-limit {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Conflict Resolution Modal */
.conflict-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(94, 234, 212, 0.12));
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.conflict-resolution-form {
    background-color: var(--light-color);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--card-outline);
}

.conflict-resolution-form h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.conflict-resolution-form .form-group {
    margin-bottom: 15px;
}

.conflict-resolution-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.conflict-resolution-form input[type="date"],
.conflict-resolution-form input[type="time"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    background: rgba(8, 145, 178, 0.12);
    color: var(--text-color);
}

/* Conflict highlighting for admin page */
.list-item.conflict-warning {
    background: rgba(239, 68, 68, 0.12);
    border-left: 4px solid var(--danger-color);
    border-radius: 10px;
}

.conflict-icon {
    color: #ef4444;
    margin-right: 5px;
}

.list-item.conflict-warning:hover {
    background-color: #fef2f2;
}

/* Saved layouts page editable fields */
.edit-field {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

.edit-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.conflict-alert {
    background: rgba(94, 234, 212, 0.16);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--dark-color);
    font-size: 0.9rem;
    margin-top: 6px;
}

.conflict-alert i {
    color: #f39c12;
    margin-right: 5px;
}

/* Hide room scheduling conflict warning box */
.room-conflict-warning {
    display: none !important;
}

/* Hide only house emoji/icon in canvas placeholder */
.canvas-placeholder i.fas.fa-home {
    display: none !important;
}

/* Hide only text content in no-layout blueprint objects, but allow resize handles */
[data-type="no-layout"] .label,
[data-type="no-layout"] .object-label,
.blueprint-object[data-type="no-layout"] .label,
.blueprint-object-bg[data-type="no-layout"] .label {
    display: none !important;
}

/* Ensure resize handles work for no-layout objects (but follow selection rules) */
[data-type="no-layout"] .handle,
.blueprint-object[data-type="no-layout"] .handle,
.blueprint-object-bg[data-type="no-layout"] .handle {
    visibility: visible;
    opacity: 1;
}

/* Ensure no-layout objects are just gray boxes */
[data-type="no-layout"],
.blueprint-object[data-type="no-layout"],
.blueprint-object-bg[data-type="no-layout"] {
    background-color: #888888 !important;
    border-color: #666666 !important;
}

/* Stairs pattern styling for consistency across all pages */
.bp-bg-stairs,
.blueprint-object-bg[data-type="stairs"] {
    position: relative;
    overflow: hidden;
}

.bp-bg-stairs::before,
.blueprint-object-bg[data-type="stairs"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 6px,
            #000000 6px,
            #000000 7px
        );
    pointer-events: none;
}

/* Equipment shape styling - round base */
.equipment-round {
    border-radius: 50% !important;
}

/* Equipment size variations - round (match table sizes) */
.equipment-round.large,
.equipment-round:not(.small):not(.medium):not(.large) {
    width: 100px !important;
    height: 100px !important;
}

.equipment-round.medium {
    width: 75px !important;
    height: 75px !important;
}

.equipment-round.small {
    width: 50px !important;
    height: 50px !important;
}

/* Equipment square base - sizes defined by size classes below */
.equipment-square {
    border-radius: 4px !important;
}

/* Equipment size variations - square (match table sizes) */
.equipment-square.large,
.equipment-square:not(.small):not(.medium):not(.large) {
    width: 90px !important;
    height: 90px !important;
}

.equipment-square.medium {
    width: 68px !important;
    height: 68px !important;
}

.equipment-square.small {
    width: 45px !important;
    height: 45px !important;
}

/* Equipment rectangular base - sizes defined by size classes below */
.equipment-rectangular {
    border-radius: 4px !important;
}

/* Equipment size variations - rectangular */
.equipment-rectangular.large,
.equipment-rectangular:not(.small):not(.medium):not(.large) {
    width: 120px !important;
    height: 60px !important;
}

.equipment-rectangular.medium {
    width: 90px !important;
    height: 45px !important;
}

.equipment-rectangular.small {
    width: 60px !important;
    height: 30px !important;
}

/* Notification styles */
.notification-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.notification-popup {
    background: linear-gradient(135deg, rgba(6, 64, 74, 0.98), rgba(2, 24, 32, 0.98));
    border: 1px solid rgba(94, 234, 212, 0.28);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    position: relative;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.notification-popup.success {
    border-left: 4px solid var(--success-color);
}

.notification-popup.error {
    border-left: 4px solid var(--error-color);
}

.notification-popup.warning {
    border-left: 4px solid var(--warning-color);
}

.notification-popup.info {
    border-left: 4px solid var(--accent-color);
}

.notification-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.notification-popup-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.notification-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-popup-close:hover {
    background-color: var(--background-color);
}

.notification-popup-message {
    color: var(--text-color);
    line-height: 1.5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--cf-text);
    background: var(--cf-bg);
    scrollbar-color: rgba(94, 234, 212, 0.55) rgba(2, 24, 32, 0.6);
    scrollbar-width: thin;
    height: 100vh;
}

::-webkit-scrollbar {
    width: 12px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: rgba(2, 30, 40, 0.6);
    border-radius: 999px;
    border: 1px solid rgba(4, 120, 136, 0.35);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(45, 205, 190, 0.7), rgba(94, 234, 212, 0.9));
    border-radius: 999px;
    border: 2px solid rgba(1, 18, 26, 0.65);
    box-shadow: 0 6px 16px rgba(6, 180, 190, 0.25);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.95), rgba(167, 255, 244, 0.95));
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.06em;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
}

/* Header styles handled by header-standard.css */

/* Navigation list items */
nav ul li {
    flex-shrink: 0; /* Prevent shrinking */
    white-space: nowrap; /* No wrapping */
}

/* Push the Sign out button to the far right */
nav ul li.signout {
    margin-left: auto;
    flex-shrink: 0; /* Don't shrink sign out button */
}

nav ul li a {
    text-decoration: none;
    color: rgba(236, 254, 255, 0.82);
    padding: 0.55rem 1.1rem;
    border-radius: 14px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap !important;
    flex-shrink: 0;
    border: 1px solid transparent;
    background: rgba(8, 145, 178, 0.18);
}

nav ul li a:hover {
    background: rgba(94, 234, 212, 0.25);
    color: var(--primary-color);
    border-color: rgba(94, 234, 212, 0.35);
}

nav ul li.active a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border-color: rgba(5, 102, 141, 0.6);
    box-shadow: 0 14px 32px rgba(4, 51, 58, 0.35);
}

nav ul li a.disabled {
    color: #999;
    cursor: not-allowed;
}

/* Main content styles */
main {
    padding: 1rem 0;
}

.admin-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Responsive header styles - REMOVED to prevent conflicts with header-standard.css */

@media (min-width: 768px) {
    .admin-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "room saved"
            "inventory inventory";
        gap: 16px;
    }
    section.room-management { grid-area: room; }
    /* Calendar removed */
    section.saved-layouts { grid-area: saved; }
    section.inventory-management { grid-area: inventory; }
    section.spacer-panel { display: none; }
}

/* Ensure any leftover calendar styles don't affect layout if present */
section.event-calendar { display: none !important; }

section {
    background: var(--card-surface);
    border-radius: 30px;
    box-shadow: 0 26px 55px rgba(4, 51, 58, 0.2);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

section h2 {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(14, 116, 144, 0.92));
    color: #ECFEFF;
    padding: 1rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.panel-content {
    padding: 1.6rem;
    background: rgba(12, 74, 110, 0.18);
    border-radius: 26px;
    overflow: hidden;
}

/* Calendar styles */
.calendar {
    background: #ffffff;
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.calendar-title {
    font-weight: 700;
    color: var(--primary-color);
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.calendar-grid .day-name {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    padding: 6px 0;
}
.calendar-grid .day {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 64px;
    padding: 6px;
    position: relative;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}
.calendar-grid .day:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}
.calendar-grid .day .date-num {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.85rem;
    color: #475569;
}
.calendar-grid .day.muted {
    background: #F3F6FB;
    color: #6b7280;
}
.calendar-grid .day.has-event {
    border-color: var(--primary-color);
    background: rgba(11, 59, 113, 0.06);
}
.calendar-grid .day.selected {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}
.calendar-grid .event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    position: absolute;
    left: 8px;
    bottom: 8px;
}
.calendar-details {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: #fff;
}
.calendar-details .empty {
    color: #6b7280;
}
.calendar-details .event-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.calendar-details .event-item:last-child {
    border-bottom: none;
}

/* Form styles */
.form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

input, select {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    flex: 1;
    background-color: #ffffff;
    color: #000000;
    transition: var(--transition);
}

select option {
    color: #000000;
    background-color: #ffffff;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 59, 113, 0.20);
    background-color: #ffffff !important;
}

/* Prevent browser autofill from changing input colors */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Inventory Modal Styles */
.inventory-modal {
    max-width: 800px;
    width: 90%;
}

.inventory-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.inventory-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inventory-preview-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inventory-preview-section h4 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.preview-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.preview-object {
    background: #ffffff;
    border: 2px solid #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

/* Large sizes (current default) */
.preview-object.round.large {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.preview-object.square.large {
    border-radius: 4px;
    width: 70px;
    height: 70px;
}

.preview-object.rectangular.large {
    border-radius: 4px;
    width: 120px;
    height: 60px;
}

/* Medium sizes (75% of large) */
.preview-object.round.medium {
    border-radius: 50%;
    width: 60px;
    height: 60px;
}

.preview-object.square.medium {
    border-radius: 4px;
    width: 52px;
    height: 52px;
}

.preview-object.rectangular.medium {
    border-radius: 4px;
    width: 90px;
    height: 45px;
}

/* Small sizes (50% of large) */
.preview-object.round.small {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.preview-object.square.small {
    border-radius: 4px;
    width: 35px;
    height: 35px;
}

.preview-object.rectangular.small {
    border-radius: 4px;
    width: 60px;
    height: 30px;
}

/* Fallback for objects without size class (default to large) */
.preview-object.round:not(.small):not(.medium):not(.large) {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.preview-object.square:not(.small):not(.medium):not(.large) {
    border-radius: 4px;
    width: 70px;
    height: 70px;
}

.preview-object.rectangular:not(.small):not(.medium):not(.large) {
    border-radius: 4px;
    width: 120px;
    height: 60px;
}

.preview-label {
    pointer-events: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    position: relative;
    z-index: 10;
    font-size: 0.8rem;
    color: #000000;
}

/* Smaller text for smaller objects */
.preview-object.small .preview-label {
    font-size: 0.7rem;
}

.preview-object.medium .preview-label {
    font-size: 0.75rem;
}

/* Table shape and size styling for saved-layouts page - Large sizes (default) */
.table-round.large, .table-round:not(.small):not(.medium):not(.large) { 
    border-radius: 50%; 
    width: 100px !important;
    height: 100px !important;
}

.table-square.large, .table-square:not(.small):not(.medium):not(.large) { 
    border-radius: 4px; 
    width: 90px !important;
    height: 90px !important;
}

.table-rectangular.large, .table-rectangular:not(.small):not(.medium):not(.large) { 
    border-radius: 4px; 
    width: 120px !important;
    height: 60px !important;
}

/* Table shape and size styling for saved-layouts page - Medium sizes (75% of large) */
.table-round.medium { 
    border-radius: 50%; 
    width: 75px !important;
    height: 75px !important;
}

.table-square.medium { 
    border-radius: 4px; 
    width: 68px !important;
    height: 68px !important;
}

.table-rectangular.medium { 
    border-radius: 4px; 
    width: 90px !important;
    height: 45px !important;
}

/* Table shape and size styling for saved-layouts page - Small sizes (50% of large) */
.table-round.small { 
    border-radius: 50%; 
    width: 50px !important;
    height: 50px !important;
}

.table-square.small { 
    border-radius: 4px; 
    width: 45px !important;
    height: 45px !important;
}

.table-rectangular.small { 
    border-radius: 4px; 
    width: 60px !important;
    height: 30px !important;
}

.preview-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
}

.preview-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.inventory-actions {
    margin-bottom: 1rem;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .inventory-modal-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .inventory-modal {
        width: 95%;
        max-width: none;
    }
}

.btn {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(94, 234, 212, 0.35);
    border-radius: 16px;
    cursor: pointer;
    background: rgba(12, 74, 110, 0.18);
    color: var(--dark-color);
    transition: var(--transition);
    box-shadow: 0 18px 30px rgba(4, 51, 58, 0.18);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #04333A;
    border-color: rgba(6, 95, 70, 0.65);
    box-shadow: 0 22px 44px rgba(4, 51, 58, 0.32);
}

.btn.danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 48px rgba(4, 51, 58, 0.28);
}

/* List styles */
.list-container {
    margin-top: 1.5rem;
}

h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.list {
    list-style: none;
    border: 1px solid var(--card-outline);
    border-radius: 18px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(12, 74, 110, 0.14);
    backdrop-filter: blur(8px);
}

.list-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(94, 234, 212, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item .item-name {
    font-weight: bold;
}

.list-item .item-quantity {
    color: #666;
}

.list-item .actions {
    display: flex;
    gap: 0.5rem;
}

/* Conflict Warning Styles for Admin Page */
.list-item.conflict-warning {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
    border-color: #fecaca;
}

.list-item.conflict-warning:hover {
    background-color: #fef2f2;
}

.conflict-icon {
    color: var(--danger-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.action-btn {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #cfd8e3;
    background: #ffffff;
    color: #2f3b52;
    transition: var(--transition);
}

.action-btn:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Variants for specific actions */
/* Load button (has data-load attribute) */
.actions .action-btn[data-load] {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}
.actions .action-btn[data-load]:hover {
    filter: brightness(0.95);
}

/* Rename button */
.actions .action-btn.edit {
    background: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.actions .action-btn.edit:hover {
    background: var(--secondary-color);
    color: #ffffff;
}

/* Delete button */
.actions .action-btn.delete {
    background: transparent;
    border-color: var(--error-color);
    color: var(--error-color);
}
.actions .action-btn.delete:hover {
    background: var(--error-color);
    color: #ffffff;
}

/* Advanced options panel */
.advanced-options {
    margin: 1rem 0;
    padding: 0.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.advanced-options h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hidden {
    display: none;
}

/* Modal styles */
.spacer-panel {
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    pointer-events: none;
}

.spacer-panel .panel-content { display: none; }

.spacer-panel h2 { display: none; }

.spacer-panel * { display: none !important; }

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: radial-gradient(circle at top, rgba(8, 145, 178, 0.32) 0%, rgba(3, 24, 34, 0.92) 65%);
    backdrop-filter: blur(18px);
    padding: 4vh 0;
}

.modal-content {
    background: linear-gradient(160deg, rgba(4, 52, 64, 0.88), rgba(2, 20, 28, 0.92));
    margin: 0 auto;
    padding: 28px 32px;
    border-radius: 28px;
    box-shadow: 0 45px 110px rgba(1, 12, 18, 0.65), inset 0 0 0 1px rgba(94, 234, 212, 0.22);
    width: min(680px, 90%);
    position: relative;
    color: rgba(236, 254, 255, 0.92);
}

.modal-header h3,
.modal-header h2 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(252, 254, 255, 0.98);
    text-shadow: 0 2px 14px rgba(1, 8, 12, 0.55);
}

.modal-body {
    margin-top: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-footer {
    margin-top: 1.6rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.modal-body label,
.modal-body p,
.modal-body strong,
.modal-body span {
    color: rgba(252, 254, 255, 0.98);
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(1, 8, 12, 0.55);
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    border-radius: 18px;
    background: rgba(236, 254, 255, 0.92);
    border: 1px solid rgba(6, 116, 121, 0.45);
    color: #053038;
    padding: 0.65rem 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 20px rgba(3, 20, 28, 0.22);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: rgba(45, 205, 190, 0.7);
    box-shadow: 0 0 0 2px rgba(45, 205, 190, 0.35);
}

.modal-footer .btn.primary {
    background: linear-gradient(135deg, rgba(45, 205, 190, 0.9), rgba(94, 234, 212, 0.95));
    color: #02292b;
    border: none;
    box-shadow: 0 18px 40px rgba(6, 116, 121, 0.45);
}

.modal-footer .btn.secondary,
.modal-footer .btn.btn-secondary {
    background: rgba(236, 254, 255, 0.22);
    border: 1px solid rgba(236, 254, 255, 0.55);
    color: rgba(10, 44, 52, 0.92);
    font-weight: 600;
}

.modal-footer .btn.btn-danger {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: rgba(255, 214, 214, 0.92);
}

.modal-footer .btn.btn-danger:hover {
    background: rgba(239, 68, 68, 0.28);
    color: rgba(255, 238, 238, 0.92);
}

.close {
    position: absolute;
    right: 22px;
    top: 16px;
    font-size: 28px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close:hover {
    color: rgba(94, 234, 212, 1);
    transform: scale(1.05);
}

/* Page Layout for Layout and Blueprint pages */
.page-layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* Narrower sidebar */
    gap: 1.5rem;
    align-items: flex-start;
}

.sidebar {
    background-color: #fff;
    padding: 1rem; /* Reduced padding */
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.full-width {
    width: 100%;
}

/* Refined form styles for sidebar */
.sidebar .form-group {
    display: flex;
    flex-direction: column; /* Stack label and input */
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.sidebar label {
    font-weight: bold;
    font-size: 0.9rem;
}

.sidebar .radio-group, .sidebar .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sidebar .radio-option, .sidebar .checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer styles */
footer {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    color: #777;
}

/* Equipment styles */
.equipment {
    position: absolute;
    background-color: #ffffff !important;
    border: 2px solid #000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
    z-index: 10;
    box-shadow: none !important;
    transition: box-shadow 0.1s ease;
    transform-origin: center center;
}

.equipment:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Chair items within seating groups */
.chair-item {
    background-color: #ffffff !important;
    border: 2px solid #000000 !important;
}

/* Equipment shape styles */
.equipment-round {
    border-radius: 50%;
}

.equipment-square {
    border-radius: 4px;
}

.equipment-rectangular {
    border-radius: 4px;
}

.equipment-name {
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 0 2px;
    color: #4682b4;
}
