/* 
 * Hub Portal - Main Stylesheet
 * Modern SaaS Layout with Sidebar + Content
 * 100% Vanilla CSS - No Tailwind
 */

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors - Dark Sidebar */
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #eaeaea;
    --sidebar-hover: #16213e;
    --sidebar-active: #0f3460;
    
    /* Colors - Light Content */
    --content-bg: #f8f9fa;
    --content-card: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    
    /* Accent */
    --accent: #e94560;
    --accent-hover: #d63050;
    
    /* Layout */
    --sidebar-width: 250px;
    --header-height: 60px;
    
    /* Shadows */
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition: all 0.25s ease;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--content-bg);
}

/* Layout Grid - 2 Columns */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* Sidebar - Dark Theme */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.sidebar-logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-logo span {
    font-size: 0.85rem;
    color: var(--accent);
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin: 4px 12px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: var(--sidebar-hover);
}

.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-menu .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    grid-column: 2;
    min-height: 100vh;
    padding: 32px;
    background: var(--content-bg);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Product Card */
.product-card {
    background: var(--content-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.product-card .card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eee;
}

.product-card .card-body {
    padding: 20px;
}

.product-card .card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 8px;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-card .card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.product-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.product-card .card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #e9ecef;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #dee2e6;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    background: #fff;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

/* Cards */
.card {
    background: var(--content-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

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

.stat-card {
    background: var(--content-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--content-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.data-table td {
    border-top: 1px solid #eee;
}

.data-table tr:hover td {
    background: #fafafa;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        grid-column: 1;
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
