/* Enhanced Shop Display CSS */

/* ========================================================================= */
/* AUTHENTICATION MESSAGES                                                   */
/* ========================================================================= */

.shop-display-login-required,
.shop-display-access-denied {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.shop-display-access-denied {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.shop-display-access-denied > div {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.login-container h2,
.shop-display-access-denied h2 {
    margin: 0 0 20px 0;
    font-size: 2.2em;
    font-weight: 300;
    color: #333;
}

.login-container p,
.shop-display-access-denied p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: #666;
}

.login-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #495057;
    text-decoration: none;
}

/* Animation for the containers */
.login-container,
.shop-display-access-denied > div {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================= */
/* 1. GLOBAL SCOPE & RESET (Theme Isolation)                                 */
/* ========================================================================= */
.shop-display-container {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    max-width: 100%;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: #333;

    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 10000;
}

.shop-display-container * {
    box-sizing: inherit;
}

/* Reset Headers/Paragraphs */
.shop-display-container h1 { font-size: 2.5em; margin: 0 0 10px 0; line-height: 1.2; }
.shop-display-container h2 { font-size: 1.8em; margin: 0 0 15px 0; line-height: 1.2; }
.shop-display-container h3 { font-size: 1.3em; margin: 0 0 10px 0; line-height: 1.2; }
.shop-display-container p { margin: 0 0 8px 0; }

/* ========================================================================= */
/* 2. HEADER SECTION                                                         */
/* ========================================================================= */
.shop-header {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.company-info h1 {
    font-weight: 300;
    margin-bottom: 10px;
}

.company-info p {
    opacity: 0.8;
    font-size: 1.2em;
    margin: 0;
}

.live-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    display: block;
    color: #3498db;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.current-time {
    text-align: center;
}

#live-clock {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

#live-date {
    font-size: 0.9em;
    opacity: 0.8;
}

/* ========================================================================= */
/* 3. CONTROL PANEL                                                          */
/* ========================================================================= */
.control-panel {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.view-toggles {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.toggle-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.refresh-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.refresh-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* ========================================================================= */
/* 4. MAIN CONTENT AREA                                                      */
/* ========================================================================= */
.main-content {
    /* REMOVED min-height: 600px; - Let flex handle height */
    padding: 30px;
    
    /* ADDED: Flexbox context for vertical layout */
    display: flex;
    flex-direction: column; 
    flex: 1; /* Allows it to fill the remaining height of the shop-display-container */
    min-height: 0;
    overflow-y: auto; 
    overflow-x: hidden; 
}

/* View States */
.projects-view,
.kanban-view,
.calendar-view {
    display: none;
    flex: 1; /* ADDED: Allow views to stretch vertically */
    min-height: 0;
    overflow-y: auto; /* ADDED: Allow scrolling *within* the view content */
    padding: 0; /* Adjusted padding as it's set on main-content wrapper */
}

.projects-view.active,
.kanban-view.active,
.calendar-view.active {
    display: flex; /* Changed from block to flex/grid for internal layout */
    flex-direction: column; /* Most views will be column layouts */
}


/* ========================================================================= */
/* 5. PROJECTS GRID VIEW                                                     */
/* ========================================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--priority-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Priority Color Variables */
.project-card.priority-urgent {
    --priority-color: #e74c3c;
}

.project-card.priority-high {
    --priority-color: #f39c12;
}

.project-card.priority-medium {
    --priority-color: #3498db;
}

.project-card.priority-low {
    --priority-color: #2ecc71;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.client-name {
    color: #7f8c8d;
    font-size: 0.95em;
    margin: 0;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-in-progress {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-on-hold {
    background: #f8d7da;
    color: #721c24;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.project-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.meta-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.meta-label {
    font-size: 0.8em;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-top: 2px;
}

.progress-section {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.progress-percentage {
    font-weight: 700;
    color: var(--priority-color);
    font-size: 1em;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--priority-color), #2ecc71);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: move 2s linear infinite;
}

.resource-section {
    margin-bottom: 15px;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-tag {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.next-steps {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
}

/* No Projects State */
.no-projects {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-projects-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-projects-message {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.no-projects-submessage {
    opacity: 0.7;
}

/* ========================================================================= */
/* 6. KANBAN BOARD VIEW - FIXED FOR SCROLLING                                */
/* ========================================================================= */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    /* FIX: Use flex properties for vertical sizing */
    flex: 1; 
    min-height: 0;
    overflow: hidden;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    position: relative; 
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.column-header h3 {
    color: #2c3e50;
    font-size: 1.1em;
    margin: 0;
}

.task-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto; 
    overflow-x: hidden;
    padding-right: 8px;
    margin-right: -8px;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.auto-scroll-indicator {
    z-index: 1000 !important;
    pointer-events: none !important;
}

.kanban-cards::-webkit-scrollbar {
    width: 6px;
}

.kanban-cards::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.kanban-cards::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.kanban-cards::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 4px solid var(--priority-color);
    flex-shrink: 0;
    min-height: fit-content;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

.kanban-card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: #7f8c8d;
}

.kanban-card-progress {
    margin-top: 10px;
}

.kanban-progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.kanban-progress-fill {
    height: 100%;
    background: var(--priority-color);
    transition: width 0.3s ease;
}

.kanban-cards::after {
    content: '';
    height: 20px;
    flex-shrink: 0;
}

/* ========================================================================= */
/* 7. CALENDAR VIEW                                                          */
/* ========================================================================= */
.calendar-view {
    padding: 0;
    /* Default state: clip children */
    overflow-y: hidden; 
}

/* 💥 NEW CRITICAL FIX: Hide calendar elements when parent container is not active 💥 */
.calendar-view:not(.active) .calendar-header,
.calendar-view:not(.active) .calendar-view-switcher,
.calendar-view:not(.active) .calendar-day-names,
.calendar-view:not(.active) .calendar-sub-view {
    display: none !important;
}


.calendar-view.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* FIX: Crucial to allow scroll if total calendar height exceeds container */
    overflow-y: auto; 
    min-height: 0;
    /* ADDED: Re-introduce padding for aesthetic spacing */
    padding: 20px; 
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    flex-shrink: 0;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.month-year {
    font-size: 1.8em;
    font-weight: 600;
    min-width: 220px;
    text-align: center;
}

.today-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.today-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.calendar-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    margin-bottom: 1px;
    flex-shrink: 0;
}

.calendar-day-name {
    background: #2c3e50;
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    flex: 1; /* Allow the grid to take up remaining vertical space */
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* FIX: Set flexible grid rows with a minimum size (Option A) */
    grid-auto-rows: minmax(150px, 1fr); 
    gap: 1px;
    background: #e9ecef;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.calendar-day {
    background: white;
    padding: 12px;
    position: relative;
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
	min-height: 0; /* FIX: Removed fixed min-height to allow grid to manage size */
}

.calendar-day:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.calendar-day.other-month {
    background: #f8f9fa;
    opacity: 0.6;
}

.calendar-day.other-month .day-number {
    color: #adb5bd;
}

.calendar-day.today {
    background: #e3f2fd;
    border-color: #2196f3;
}

.calendar-day.today .day-number {
    background: #2196f3;
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    font-weight: 600;
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

.day-number {
    font-size: 0.9em;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    flex-shrink: 0;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.calendar-event {
    background: var(--priority-color, #667eea);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.calendar-event:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.calendar-event.priority-urgent { --priority-color: #e74c3c; }
.calendar-event.priority-high { --priority-color: #f39c12; }
.calendar-event.priority-medium { --priority-color: #3498db; }
.calendar-event.priority-low { --priority-color: #2ecc71; }

.calendar-event.status-completed {
    opacity: 0.7;
    text-decoration: line-through;
}

.calendar-event.status-on-hold {
    background: repeating-linear-gradient(45deg, var(--priority-color), var(--priority-color) 2px, rgba(255, 255, 255, 0.3) 2px, rgba(255, 255, 255, 0.3) 4px);
}

/* ========================================================================= */
/* 8. FOOTER SECTION                                                         */
/* ========================================================================= */
.shop-footer {
    background: #2c3e50;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    font-size: 0.9em;
    opacity: 0.8;
}

.footer-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ========================================================================= */
/* 9. ANIMATIONS                                                             */
/* ========================================================================= */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================================================= */
/* 10. RESPONSIVE DESIGN                                                     */
/* ========================================================================= */
@media (max-width: 1200px) {
    .shop-header {
        flex-direction: column;
        text-align: center;
    }
    
    .live-stats {
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .kanban-board {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .calendar-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .calendar-nav {
        gap: 15px;
    }
    
    .month-year {
        min-width: auto;
        font-size: 1.5em;
    }
    
    .calendar-day {
        min-height: 100px;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    .login-container,
    .shop-display-access-denied > div {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-container h2,
    .shop-display-access-denied h2 {
        font-size: 1.8em;
    }
    
    .login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }

    .main-content {
        padding: 20px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-toggles {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .filter-controls {
        order: 1;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .kanban-column {
        max-height: 400px;
        min-height: 300px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }

    .calendar-event {
        font-size: 0.6em;
        padding: 1px 4px;
    }
    
    .day-number {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .calendar-day-name {
        padding: 10px 8px;
        font-size: 0.8em;
    }
    
    .shop-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .shop-display-login-required,
    .shop-display-access-denied {
        padding: 10px;
    }
    
    .login-container,
    .shop-display-access-denied > div {
        padding: 25px 15px;
    }
    
    .login-container h2,
    .shop-display-access-denied h2 {
        font-size: 1.5em;
    }
    
    .login-container p,
    .shop-display-access-denied p {
        font-size: 1em;
    }

    .shop-display-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .shop-header {
        padding: 20px;
    }
    
    .company-info h1 {
        font-size: 2em;
    }
    
    .live-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
    }
    
    .control-panel {
        padding: 15px 20px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .toggle-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .kanban-column {
        max-height: 350px;
        min-height: 250px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-event {
        font-size: 0.5em;
        padding: 1px 3px;
    }

    .day-number {
        font-size: 0.7em;
        margin-bottom: 2px;
    }

    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
    
    .month-year {
        font-size: 1.2em;
    }
}

/* ========================================================================= */
/* 11. PRINT STYLES                                                          */
/* ========================================================================= */
@media print {
    .shop-display-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .control-panel,
    .shop-footer {
        display: none;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .kanban-view,
    .calendar-view {
        display: none !important;
    }
    
    .projects-view {
        display: block !important;
    }

    .calendar-header {
        background: none !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    .nav-btn,
    .today-btn {
        display: none;
    }
    
    .calendar-event {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    .calendar-day.today {
        background: #f0f0f0 !important;
        border-color: #000 !important;
    }
}

/* ========================================================================= */
/* 12. FULL SCREEN LAYOUT & THEME ISOLATION                                  */
/* ========================================================================= */

.shop-display-container {
    display: flex;
    flex-direction: column;
    /* FIX: Set height to take viewport, removed redundant max-height */
    height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
    /* FIX: Added class-based positioning for fullscreen toggle compatibility */
    position: relative; 
    width: 100vw;
    z-index: 10000; 
    margin: 0 !important;
    border-radius: 0 !important;
}

/* NEW: Fullscreen class positioning (For JavaScript to toggle) */
.shop-display-container.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999; /* Below WP admin bar z-index 10000 */
}

/* NEW: Adjust for WordPress Admin Bar */
body.admin-bar .shop-display-container.fullscreen-mode {
    top: 32px;
    height: calc(100vh - 32px);
}


.shop-header, .control-panel, .shop-footer {
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 20px;
}

.projects-view, .kanban-view {
    height: 100%;
    overflow-y: auto; 
}

/* Theme Override Protection */
.shop-display-container * {
    box-sizing: border-box !important;
}

/* Ensure no theme interference */
body .shop-display-container { /* FIX: Increased specificity for background */
    background: #f8f9fa !important;
    background-image: none !important;
}
