/* MyWebCode - Stili Monitor */

.monitor-body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    font-family: var(--font-family);
    overflow: hidden;
    color: white;
}

/* Header */
.monitor-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: #4fc3f7;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.current-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4fc3f7;
    font-variant-numeric: tabular-nums;
}

.current-date {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.status-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--success-color);
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.connection-status.offline {
    background: var(--danger-color);
}

/* Main Content */
.monitor-main {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    padding: 1rem 2rem;
    height: calc(100vh - 200px);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.update-indicator.show {
    opacity: 1;
}

.update-indicator i {
    animation: spin 1s linear infinite;
}

.total-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 1rem;
    min-width: 100px;
}

.total-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4fc3f7;
}

.total-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Served Section */
.served-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.served-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.served-item {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    animation: slideInRight 0.5s ease-out;
    border-left: 5px solid;
}

.served-item.new {
    animation: pulse 1s ease-in-out 3;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.served-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.served-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.served-service {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.served-counter {
    text-align: right;
}

.counter-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.counter-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Queue Section */
.queue-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.queue-item {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border-left: 5px solid;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.queue-item:hover {
    transform: translateY(-2px);
}

.queue-service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.queue-service-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.queue-count {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.queue-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Waiting Section */
.waiting-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    max-height: 300px;
}

.waiting-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.waiting-scroll::-webkit-scrollbar {
    height: 8px;
}

.waiting-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.waiting-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.waiting-number {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    min-width: 120px;
    border-left: 5px solid;
    animation: fadeIn 0.5s ease-out;
}

.waiting-number-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.waiting-service {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Footer */
.monitor-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instructions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.instructions i {
    color: #4fc3f7;
}

.last-update {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* System Overlay */
.system-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.system-overlay.show {
    opacity: 1;
    visibility: visible;
}

.system-message {
    background: white;
    color: var(--primary-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    animation: pulse 1s ease-in-out infinite;
}

.system-message i {
    font-size: 2rem;
    color: var(--warning-color);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Empty States */
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    font-size: 1.1rem;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .monitor-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .current-time {
        font-size: 2rem;
    }
    
    .monitor-main {
        grid-template-rows: auto auto auto;
        height: auto;
        min-height: calc(100vh - 200px);
    }
    
    .served-grid {
        grid-template-columns: 1fr;
        max-height: 150px;
    }
    
    .queue-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .logo-icon {
        font-size: 2rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .current-time {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .served-item {
        padding: 1rem;
    }
    
    .served-number {
        font-size: 1.5rem;
    }
    
    .queue-item {
        padding: 1rem;
    }
    
    .queue-count {
        font-size: 2rem;
    }
    
    .waiting-number {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .waiting-number-text {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .monitor-body {
        background: white !important;
        color: black !important;
    }
    
    .monitor-header,
    .monitor-footer {
        display: none !important;
    }
    
    .served-item,
    .queue-item,
    .waiting-number {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .monitor-body {
        background: #000;
    }
    
    .served-item,
    .queue-item,
    .waiting-number {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
