* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

/* Авторизация */
.auth-container {
    width: 100%;
    max-width: 420px;
    margin-top: 40px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-title {
    font-size: 2rem;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 10px;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

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

.btn-small {
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-logout {
    background: #ff4757;
    color: white;
    width: auto;
    padding: 10px 24px;
}

.btn-logout:hover {
    background: #ff3344;
}

.btn-danger {
    background: #ff4757;
    color: white;
    width: auto;
}

.btn-success {
    background: #2ed573;
    color: white;
    width: auto;
}

.btn-warning {
    background: #ffa502;
    color: white;
    width: auto;
}

.btn-back {
    background: #666;
    color: white;
    width: auto;
    margin-bottom: 15px;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
}

.auth-footer p {
    color: #888;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

/* ========== ЛИЧНЫЙ КАБИНЕТ ========== */
.account-page, .admin-page {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.account-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.account-header h1 {
    color: white;
    font-size: 1.4rem;
}

/* Вкладки */
.tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 0 0 20px 20px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

.content-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.content-card h4 {
    color: #555;
    margin: 20px 0 10px;
    font-size: 1rem;
}

/* Записи */
.notes-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.notes-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
}

.notes-input input:focus {
    border-color: #667eea;
}

.notes-list {
    max-height: 300px;
    overflow-y: auto;
}

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

.note-text {
    flex: 1;
    color: #333;
}

.note-date {
    font-size: 0.75rem;
    color: #999;
    margin-left: 10px;
}

.note-delete {
    background: #ff4757;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1rem;
}

/* Валюты */
.currency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.currency-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.currency-name {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.currency-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.currency-item.up .currency-value {
    color: #2ed573;
}

.currency-item.down .currency-value {
    color: #ff4757;
}

/* Погода */
.weather-card {
    background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: white;
    margin-bottom: 15px;
}

.weather-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.weather-desc {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.weather-city {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Время */
.time-display {
    text-align: center;
    padding: 20px;
}

.time-clock {
    font-size: 3.5rem;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.time-date {
    font-size: 1.2rem;
    color: #666;
    margin-top: 10px;
}

/* ========== АДМИН ========== */
.admin-header {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 10px 40px rgba(255, 65, 108, 0.4);
}

.admin-tabs .tab-btn.active {
    color: #ff416c;
    border-bottom-color: #ff416c;
}

.users-list, .history-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-item, .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
}

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

.user-avatar-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-item-name {
    font-weight: 600;
    color: #333;
}

.user-item-status {
    font-size: 0.8rem;
    color: #888;
}

.status-active {
    color: #2ed573;
}

.status-blocked {
    color: #ff4757;
}

.user-actions-row {
    display: flex;
    gap: 8px;
}

.btn-small-admin {
    padding: 8px 12px;
    font-size: 0.8rem;
    width: auto;
}

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

.history-action {
    font-weight: 600;
    color: #333;
}

.history-time {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.user-view {
    margin-top: 15px;
}

.user-details {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-label {
    color: #888;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

.password-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-show-pass {
    background: #667eea;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.user-notes .note-item {
    background: #fff;
}

/* Сообщения */
.message-form {
    margin-bottom: 20px;
}

.message-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.message-form textarea:focus {
    border-color: #667eea;
    outline: none;
}

.messages-list, .admin-messages-list {
    max-height: 300px;
    overflow-y: auto;
}

.message-item {
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 4px solid #667eea;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
}

.message-text {
    color: #555;
    line-height: 1.4;
}

.admin-message-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-message-author {
    font-weight: 600;
    color: #333;
}

.admin-message-time {
    font-size: 0.75rem;
    color: #999;
}

.admin-message-text {
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.admin-message-actions {
    display: flex;
    gap: 8px;
}

.btn-delete {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .tab-btn {
        padding: 12px 5px;
        font-size: 0.75rem;
    }
    
    .currency-grid {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .user-actions .btn {
        width: 100%;
    }
}
