/* ========================================
   Dashboard - Glassmorphism Style
   Streamer Dashboard for Tiny Pet
   ======================================== */

/* ===== Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, rgba(76, 175, 255, 0.3), rgba(138, 43, 226, 0.3));
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #4cafff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== Hidden Utility ===== */
.hidden {
    display: none !important;
}

/* ===== Login Screen ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    text-align: center;
    max-width: 450px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo .logo-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(76, 175, 255, 0.4));
}

.login-container h1 {
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #4cafff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 500;
}

.login-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Platform Status */
.platform-status {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.platform-item.available {
    border-color: rgba(76, 255, 157, 0.3);
    background: rgba(76, 255, 157, 0.05);
}

.platform-item.coming-soon {
    opacity: 0.7;
}

.platform-item:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.1);
}

.platform-icon {
    font-size: 18px;
}

/* Channel Input Group */
.channel-input-group {
    margin-bottom: 25px;
    text-align: left;
}

.channel-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.channel-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.channel-input::placeholder {
    color: var(--text-muted);
}

.channel-input:focus {
    outline: none;
    border-color: #4cafff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(76, 175, 255, 0.3);
}

.channel-input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.channel-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.channel-hint code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #4cafff;
}

.login-features {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 24px;
}

/* ===== Dashboard Header ===== */
.dashboard-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.4s ease-out;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 10px;
    filter: drop-shadow(0 2px 8px rgba(76, 175, 255, 0.4));
}

.header-left {
    display: flex;
    align-items: center;
    justify-self: start;
}

.header-center {
    justify-self: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-center h1 {
    font-size: 26px;
    margin-bottom: 5px;
    font-weight: 700;
    background: linear-gradient(135deg, #4cafff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 255, 0.5))
            drop-shadow(0 4px 8px rgba(138, 43, 226, 0.3))
            drop-shadow(0 0 20px rgba(76, 175, 255, 0.2));
    text-shadow: 0 0 30px rgba(76, 175, 255, 0.4);
}

.header-title {
    height: 40px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 8px rgba(76, 175, 255, 0.6))
            drop-shadow(0 4px 12px rgba(138, 43, 226, 0.4))
            drop-shadow(0 0 25px rgba(76, 175, 255, 0.3));
}

.streamer-name {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: end;
}

/* ===== Bot Status Toggle ===== */
.bot-status-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-label span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.toggle-checkbox {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-checkbox:checked + .toggle-slider {
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-color: rgba(76, 175, 80, 0.5);
}

.toggle-checkbox:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

.toggle-checkbox:checked ~ span,
.toggle-label:has(.toggle-checkbox:checked) #botStatusText {
    color: #4caf50 !important;
}

/* ===== Navigation Tabs ===== */
.dashboard-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    position: sticky;
    top: 81px;
    z-index: 99;
}

.dashboard-nav::-webkit-scrollbar {
    height: 2px;
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background: var(--glass-border);
}

.nav-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 255, 0.15), rgba(138, 43, 226, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-tab.active {
    color: #4cafff;
    background: rgba(76, 175, 255, 0.15);
    border-color: rgba(76, 175, 255, 0.3);
    box-shadow: 0 4px 16px rgba(76, 175, 255, 0.25),
                0 0 0 1px rgba(76, 175, 255, 0.2) inset;
}

.nav-tab.active::before {
    opacity: 1;
}

/* ===== Main Content ===== */
.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

.section-header {
    display: none; /* Скрыты заголовки - понятно по активной кнопке что за раздел */
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ===== Templates Grid ===== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.template-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.template-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(76, 175, 255, 0.2);
}

.template-card:hover::before {
    transform: scaleX(1);
}

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

.template-icon {
    font-size: 32px;
}

.template-type {
    padding: 4px 10px;
    background: rgba(76, 175, 255, 0.2);
    border: 1px solid rgba(76, 175, 255, 0.4);
    border-radius: 6px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #4cafff;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.template-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.template-cost {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.cost-value {
    color: #4cafff;
    font-weight: 600;
    font-size: 16px;
}

/* Кнопка внизу карточки шаблона */
.template-card .btn {
    margin-top: auto;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4cafff, #8a2be2);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 255, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Rewards Container ===== */
.rewards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.reward-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    animation: fadeInUp 0.4s ease-out;
}

/* Reward Toggle Switch */
.reward-toggle-container {
    position: absolute;
    top: 15px;
    right: 15px;
}

.reward-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.reward-toggle-checkbox {
    display: none;
}

.reward-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.reward-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.reward-toggle-checkbox:checked + .reward-toggle-slider {
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-color: rgba(76, 175, 80, 0.5);
}

.reward-toggle-checkbox:checked + .reward-toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

.reward-toggle-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    min-width: 70px;
}

.reward-toggle-checkbox:checked ~ .reward-toggle-text {
    color: #4caf50;
}

.reward-info {
    margin-bottom: 20px;
    padding-top: 10px;
}

.reward-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.reward-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

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

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #4cafff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ===== Leaderboards ===== */
.leaderboards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.leaderboard-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    animation: fadeInUp 0.5s ease-out;
}

.leaderboard-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.leaderboard-position {
    font-size: 18px;
    font-weight: 700;
    min-width: 30px;
}

.leaderboard-position.gold {
    color: #ffd700;
}

.leaderboard-position.silver {
    color: #c0c0c0;
}

.leaderboard-position.bronze {
    color: #cd7f32;
}

.leaderboard-username {
    flex: 1;
    font-weight: 500;
}

.leaderboard-value {
    color: #4cafff;
    font-weight: 600;
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.4s ease-out;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast-error {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
    color: #ff6b6b;
}

.toast-success {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    animation: scaleIn 0.3s ease-out;
}

.modal-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px 15px;
    }

    .templates-grid,
    .rewards-container {
        grid-template-columns: 1fr;
    }

    .leaderboards {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .dashboard-nav {
        padding: 0 15px;
    }

    .header-content {
        padding: 0;
    }

    .toast {
        right: 15px;
        left: 15px;
        bottom: 15px;
    }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 15px;
}

/* ===== Management Section ===== */
.management-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.management-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.management-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ===== Accounts List ===== */
.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.account-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.account-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(76, 175, 255, 0.4);
    transform: translateY(-2px);
}

.account-card.active {
    background: rgba(76, 175, 255, 0.1);
    border-color: rgba(76, 175, 255, 0.5);
}

.account-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.account-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.account-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.account-status {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.account-status.active {
    background: rgba(76, 255, 163, 0.2);
    color: #4cffa3;
}

.account-status.inactive {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
}

.account-status.expired {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.account-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* ===== Bot Toggle (moved to management) ===== */
.management-card .bot-status-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* ===== Responsive для Management ===== */
@media (max-width: 768px) {
    .management-card {
        padding: 20px;
    }

    .account-card {
        padding: 15px;
    }

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

    .account-icon {
        font-size: 28px;
    }

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

    .account-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

/* ===== Terms Agreement Checkbox ===== */
.terms-agreement {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    flex-shrink: 0;
    height: 22px;
    width: 22px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    margin-right: 12px;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(76, 175, 255, 0.5);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, #4cafff 0%, #8a2be2 100%);
    border-color: #4cafff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.checkbox-text a {
    color: #4cafff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.checkbox-text a:hover {
    color: #8a2be2;
    border-bottom: 1px solid #8a2be2;
}

/* Кнопка disabled state */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 8px 20px rgba(76, 175, 255, 0.3);
}

@media (max-width: 768px) {
    .terms-agreement {
        padding: 15px;
        margin: 20px 0;
    }

    .checkbox-text {
        font-size: 13px;
    }
}
