/* The Node - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --border: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-light);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.nav-icon {
    font-size: 1.25rem;
}

.badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--white);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    max-width: 1400px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    color: var(--white);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-secondary {
    background: var(--dark-light);
    color: var(--light);
    border: 1px solid var(--border);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
}

.stat-change {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

/* Cards */
.card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.card-action {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Post Items */
.post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: background 0.2s;
    cursor: pointer;
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--white);
}

.post-content {
    flex: 1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-author {
    font-weight: 600;
    color: var(--white);
}

.post-time {
    color: var(--gray);
    font-size: 0.875rem;
}

.post-title {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.post-excerpt {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
}

/* Profile Widget */
.profile-widget {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    color: var(--white);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.profile-role {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Activity Feed */
.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: var(--light);
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(255, 255, 255, 0.03);
}

th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--white);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--light);
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--light);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.action-btn:hover {
    background: var(--border);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-icon {
    font-size: 1.5rem;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--dark);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.link:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--gray);
}

.text-muted {
    color: var(--gray);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* OAuth Buttons */
.oauth-buttons { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.btn-oauth { padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 0.75rem; font-weight: 600; transition: all 0.2s; text-decoration: none; color: var(--white); }
.btn-oauth:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* Divider */
.divider { display: flex; align-items: center; margin: 1.5rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { padding: 0 1rem; color: var(--gray); }

/* Categories Grid */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.category-card { background: var(--dark-light); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; text-align: center; text-decoration: none; transition: transform 0.2s; }
.category-card:hover { transform: translateY(-4px); }

/* Profile */
.profile-header-card { background: var(--dark-light); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 2rem; }
.profile-cover { height: 200px; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.profile-avatar-xl { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); margin-top: -60px; border: 4px solid var(--dark); }
