:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 172, 254, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.1) 0px, transparent 50%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    color: white;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn:active { transform: translateY(0); }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); color: #000; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Session Card */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.card:hover { border-color: var(--primary); }

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Forms */
.input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: white;
    outline: none;
    transition: 0.2s;
}

.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.2); }

/* Table - Mobile Responsive */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* QR Container */
.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    width: fit-content;
    margin: 1rem auto;
}

.qr-container img {
    max-width: 200px;
    display: block;
}

/* Utility */
.hidden { display: none !important; }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Floating Telegram Support (Compact) */
/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}
.tab-btn.active {
    background: var(--primary);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tg-float {
    position: fixed;
    bottom: 90px;
    right: 25px;
    background: #0088cc;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    transition: 0.3s;
    text-decoration: none;
    overflow: hidden;
}

.tg-float:hover {
    transform: scale(1.1);
}

.tg-float svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .header-info {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
    }

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

    .glass-panel {
        padding: 1rem;
    }

    h1 { font-size: 1.5rem; }
    
    .table td, .table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .card {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Authentication Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.4rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-input-group {
    position: relative;
}

.auth-input-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

.ref-banner {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #4ade80;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: slideDown 0.4s ease-out;
}

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