/* static/style.css */
:root {
    --desk-present: #ffd54f;    /* Жёлтый — сотрудник на месте */
    --desk-absent: #9e9e9e;     /* Серый — сотрудника нет */
    --desk-hover: #ffca28;
    --bg-color: #f5f7fa;
    --text-color: #2c3e50;
    --header-bg: #2c3e50;
    --header-text: #ecf0f1;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка */
.office-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.datetime {
    display: flex;
    flex-direction: column;
    font-size: 1.1rem;
}
.datetime #current-time {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: monospace;
}

.stats {
    font-size: 1.2rem;
}
.present-count strong {
    color: #4caf50;
    font-size: 1.4rem;
}

.last-visit {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
}

/* Сетка столов */
.desks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.desk {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.desk.present {
    background: var(--desk-present);
    border-color: #ffc107;
    transform: translateY(-2px);
}

.desk.absent {
    background: var(--desk-absent);
    color: white;
}

.desk:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.desk-top {
    height: 80px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px 10px 0 0;
    margin: -1.5rem -1.5rem 1rem;
}

.desk-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.desk-status {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0.5rem 0;
}

.desk-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    margin: 1rem auto 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Футер */
.office-footer {
    padding: 1rem 2rem;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #666;
}

#refresh-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
#refresh-btn:hover { background: #2980b9; }

.auto-update {
    font-style: italic;
    opacity: 0.8;
}

/* Адаптив */
@media (max-width: 768px) {
    .office-header {
        flex-direction: column;
        text-align: center;
    }
    .desks-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .office-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}