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

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --secondary-dark: #1976D2;
    --danger-color: #f44336;
    --danger-dark: #da190b;
    --warning-color: #ff9800;
    --background-light: #f5f5f5;
    --background-white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* LOGIN SECTION */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    background: #ffebee;
    color: var(--danger-color);
    padding: 12px;
    border-radius: 6px;
    margin-top: 20px;
    border-left: 4px solid var(--danger-color);
}

.demo-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.6;
}

/* CONTAINER */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER */
.header {
    background: var(--background-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.user-name {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* BUTTONS */
.btn-logout {
    padding: 10px 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--danger-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-hand-up {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.btn-hand-up:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-hand-up:active {
    transform: scale(0.98);
}

.btn-hand-down {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--warning-color), #e68900);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.btn-hand-down:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* CARDS */
.card {
    background: var(--background-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5em;
}

.card.full-width {
    width: 100%;
}

/* USER CONTENT */
.user-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

.position-number {
    font-size: 2.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin: 20px 0;
}

.position-number.in-queue {
    color: var(--warning-color);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.message.success {
    background: #e8f5e9;
    color: var(--primary-color);
    display: block;
    border-left: 4px solid var(--primary-color);
}

.message.error {
    background: #ffebee;
    color: var(--danger-color);
    display: block;
    border-left: 4px solid var(--danger-color);
}

.queue-count {
    font-size: 1.3em;
    color: var(--secondary-color);
    text-align: center;
}

/* QUEUE LIST */
.queue-list {
    max-height: 600px;
    overflow-y: auto;
}

.empty-queue {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
    font-size: 1.1em;
}

.queue-item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s;
}

.queue-item:hover {
    background: #f0f0f0;
    box-shadow: var(--shadow);
}

.queue-item-info {
    flex: 1;
}

.queue-item-position {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 15px;
    min-width: 50px;
}

.queue-item-number {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.queue-item-name {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
}

.queue-item-time {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.queue-item-actions {
    display: flex;
    gap: 10px;
}

.btn-force-down {
    padding: 8px 15px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-force-down:hover {
    background: var(--danger-dark);
    transform: translateY(-2px);
}

/* ADMIN CONTENT */
.admin-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-content {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 25px;
    }

    .login-box h1 {
        font-size: 2em;
    }

    .position-number {
        font-size: 2em;
    }

    .queue-item {
        flex-wrap: wrap;
    }

    .queue-item-number {
        margin-bottom: 10px;
    }
}
