:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-900);
}

.container {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--shadow);
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.logo i {
    font-size: 24px;
    color: var(--primary);
    background: var(--gray-100);
    padding: 12px;
    border-radius: var(--radius);
}

.logo h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.groups h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.groups ul {
    list-style: none;
}

.groups li {
    margin-bottom: 4px;
}

.groups a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--gray-700);
    border-radius: var(--radius);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.groups a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.groups a.active {
    background: var(--primary);
    color: white;
    border-left-color: var(--primary-dark);
}

.groups a i {
    width: 20px;
    text-align: center;
}

.admin-link {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.admin-link a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-weight: 500;
}

.admin-link a:hover {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--gray-900);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-700);
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--gray-700);
}

/* Accounts Grid */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.account-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--gray-200);
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.account-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.group-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gray-100);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.copy-btn {
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

/* OTP Section */
.otp-section {
    text-align: center;
}

.otp-code {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    margin: 16px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer {
    margin-top: 16px;
}

.progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background: var(--success);
    width: 100%;
    animation: progress 30s linear infinite;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

.timer span {
    font-size: 14px;
    color: var(--gray-700);
}

.timer .countdown {
    font-weight: 600;
    color: var(--primary);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-700);
    font-size: 14px;
}

/* Footer */
.footer {
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-700);
    font-size: 14px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
}

.connection-status i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .accounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .groups ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .groups li {
        margin: 0;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .search-box {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .otp-code {
        font-size: 32px;
        letter-spacing: 6px;
    }
    
    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}