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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

/* Страница авторизации */
.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    max-width: 450px;
    margin: 0 auto;
}

.auth-container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 32px;
}

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

.form-group label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

/* Дашборд */
.dashboard-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    min-height: 500px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h1 {
    color: #333;
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-admin {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-admin:hover {
    transform: translateY(-2px);
}

.activity-section {
    margin-top: 30px;
}

.activity-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.activity-list {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
}

.activity-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.activity-type {
    font-weight: 600;
    color: #667eea;
}

.activity-time {
    color: #999;
    font-size: 14px;
}

/* Админ панель */
.admin-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-header h1 {
    color: #333;
    font-size: 28px;
}

.create-user-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.create-user-form h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.users-list {
    margin-top: 30px;
}

.users-list h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.users-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr:hover {
    background: #f9f9f9;
}

.admin-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.token-display {
    background: #fffbea;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.token-display strong {
    display: block;
    color: #92400e;
    margin-bottom: 8px;
}

.token-value {
    background: white;
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-all;
    color: #1f2937;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 60px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container,
    .dashboard-container,
    .admin-container {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .users-table {
        overflow-x: auto;
    }
}
