@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --red: #E8192C;
    --red-dark: #b5121f;
    --red-glow: rgba(232, 25, 44, 0.35);
    --bg: #0a0a0a;
    --bg2: #111111;
    --bg3: #1a1a1a;
    --border: rgba(255,255,255,0.07);
    --text: #ffffff;
    --text-muted: #888888;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Фоновая декорация */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,25,44,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232,25,44,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* Логотип */
.logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-text {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
}

.logo-text span {
    color: var(--red);
}

.logo-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Карточка */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    opacity: 0.6;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Поля */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: #444;
}

.form-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

/* Кнопка */
.btn-primary {
    width: 100%;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--red-dark);
    box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:active {
    transform: scale(0.99);
}

/* Ошибка */
.error-box {
    background: rgba(232, 25, 44, 0.1);
    border: 1px solid rgba(232, 25, 44, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #ff6b78;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-box::before {
    content: '⚠';
    font-size: 14px;
}

/* Ссылка внизу */
.card-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.card-footer a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.card-footer a:hover {
    color: #ff3d4e;
}

/* Разделитель */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Dashboard */
.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.navbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-logo span {
    color: var(--red);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    font-size: 14px;
    color: var(--text-muted);
}

.navbar-user strong {
    color: var(--text);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn-logout-red {
    background: var(--red);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-logout-red:hover {
    background: var(--red-dark);
    box-shadow: 0 2px 12px var(--red-glow);
}

/* Профиль в navbar */
.navbar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}

.profile-balance {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.profile-avatar svg {
    width: 18px;
    height: 18px;
}

.dashboard-content {
    padding: 48px 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.welcome-block {
    margin-bottom: 40px;
}

.welcome-block h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-block h1 span {
    color: var(--red);
}

.welcome-block p {
    color: var(--text-muted);
    font-size: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
    opacity: 0.5;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-value.red {
    color: var(--red);
}
