/**
 * ZibllDev v2 - Dashboard Styles
 * Main Application Layout
 * Author: Nguyễn Hoàng Nhật
 */

/* === LAYOUT === */
.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.container-sm { max-width: 800px; }
.container-md { max-width: 1000px; }
.container-lg { max-width: 1200px; }

/* === HEADER === */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) var(--space-xl);
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo {
    height: 36px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.header-nav-link:hover,
.header-nav-link.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.header-nav-link.active {
    color: var(--primary);
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-coin {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 14px;
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-yellow);
}

.header-coin i {
    font-size: 16px;
}

/* === PAGE HEADER === */
.page-header {
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* === GRID === */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 { grid-template-columns: 1fr; }
}

/* === CHECKER LAYOUT === */
.checker-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .checker-grid {
        grid-template-columns: 1fr;
    }
}

/* === RESULT LIST === */
.result-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.result-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    animation: slideIn 0.3s ease;
    transition: transform var(--transition-fast);
}

.result-item:hover {
    transform: translateX(4px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item.success {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.2) 0%, rgba(46, 204, 113, 0.05) 100%);
}

.result-item.fail {
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.2) 0%, rgba(241, 196, 15, 0.05) 100%);
}

.result-item.twofa {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.05) 100%);
}

.result-item.error {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.2) 0%, rgba(231, 76, 60, 0.05) 100%);
}

.result-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.result-item.success .result-dot { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.result-item.fail .result-dot { background: var(--accent-yellow); box-shadow: 0 0 10px var(--accent-yellow); }
.result-item.twofa .result-dot { background: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue); }
.result-item.error .result-dot { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }

.result-content {
    flex: 1;
    min-width: 0;
}

.result-combo {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-info {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-tag {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    margin-left: var(--space-md);
    flex-shrink: 0;
}

.tag-hit { background: rgba(46, 204, 113, 0.2); color: var(--accent-green); }
.tag-bad { background: rgba(241, 196, 15, 0.2); color: var(--accent-yellow); }
.tag-2fa { background: rgba(52, 152, 219, 0.2); color: var(--accent-blue); }
.tag-err { background: rgba(231, 76, 60, 0.2); color: var(--accent-red); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    display: block;
    margin-bottom: var(--space-md);
}

.empty-state p {
    font-size: var(--text-sm);
}

/* === TABS === */
.tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.tab {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* === TABLE === */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* === FOOTER === */
.app-footer {
    padding: var(--space-lg);
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .app-main {
        padding: var(--space-md);
    }
    
    .app-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .header-nav {
        display: none;
    }
    
    .page-title {
        font-size: var(--text-xl);
    }
}

