/* Стили для страниц аутентификации (вход, регистрация, профиль) */

* {
    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;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
}

.auth-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

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

.form-row.display-flex {
    display: flex;
    gap: 20px;
}

.form-col {
    width: 100%;
}

.form-row.display-flex .form-col {
    flex: 1;
}

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

.form-col .required {
    color: #e74c3c;
}

.form-col input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

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

.form-col input::placeholder {
    color: #aaa;
}

.error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.help-text {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    line-height: 1.4;
}

.form-actions {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

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

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

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.auth-links p {
    margin: 10px 0;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.admin-login-link a {
    color: #764ba2;
    font-weight: 600;
}

.admin-login-link a:hover {
    text-decoration: underline;
}

/* Telegram auth section styles */
.telegram-auth-section {
    margin-top: 25px;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
    color: #888;
    font-size: 14px;
}

#telegram-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

/* Profile page styles */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.profile-header h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-name {
    font-size: 20px;
    font-weight: 600;
}

.user-email, .user-phone {
    font-size: 14px;
    opacity: 0.9;
}

.balance-info {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.balance-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
}

.sidebar-wrapper {
    margin-bottom: 30px;
}

.sidebar-wrapper .custom-sidebar {
    display: block !important;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-wrapper .sidebar-section {
    margin-bottom: 20px;
}

.sidebar-wrapper .sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-wrapper .sidebar-section h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-wrapper .sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-wrapper .sidebar-section ul li {
    margin-bottom: 8px;
}

.sidebar-wrapper .sidebar-section ul li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-wrapper .sidebar-section ul li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.profile-content {
    display: grid;
    gap: 30px;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.profile-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 22px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.sessions-list {
    display: grid;
    gap: 15px;
}

.session-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.session-card.past {
    opacity: 0.8;
    background: #f5f5f5;
}

.session-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.session-time .date {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.session-time .time {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.session-details {
    flex: 1;
}

.session-details h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.session-details .hall-name {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.session-details .duration {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

/* Responsive styles */
@media (max-width: 600px) {
    .auth-card {
        padding: 25px;
    }

    .form-row.display-flex {
        flex-direction: column;
        gap: 0;
    }

    .session-card {
        flex-direction: column;
        gap: 15px;
    }

    .session-time {
        flex-direction: row;
        gap: 15px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 10px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
