/* =================== CSS VARIABLES (Design System) =================== */
:root {
    --primary-color: #2563eb;
    --primary-darker: #1d4ed8;
    --primary-darkest: #1e40af;
    --accent-color: #60a5fa;
    --secondary-color: #6c757d;
    --secondary-darker: #5a6268;
    --tertiary-color: #0891b2;
    --tertiary-darker: #0e7490;
    --gradient-primary: linear-gradient(45deg, #2563eb 0%, #60a5fa 100%);
    --gradient-primary-135: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --dark: #1e293b;
    --dark-lighter: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* =================== RESET & BASE =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-width: 320px;
    height: 100%;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

/* =================== LOADING SPINNER =================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =================== OFFLINE BANNER =================== */
.offline-banner {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #ff9800;
    color: var(--white);
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 99;
}

.offline-banner.active {
    display: block;
}

/* =================== EMPTY STATE =================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-text {
    font-size: 0.9rem;
}

/* =================== ERROR STATE =================== */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.error-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-retry:hover {
    background: var(--primary-darker);
}

.btn-retry:active {
    background: var(--primary-darkest);
}

/* =================== UTILITIES =================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* =================== RESPONSIVE =================== */
@media (min-width: 768px) {
    .login-card {
        padding: 2.5rem 2rem;
    }

    .content-screen {
        max-width: 600px;
        margin: 0 auto;
    }

    .slot-service-select {
        min-width: 160px;
    }
}

@media (max-width: 470px) {
    .slot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .slot-info {
        width: 100%;
    }

    .slot-actions {
        width: 100%;
    }

    .slot-service-select {
        flex: 1;
        min-width: 0;
    }
}
