/* TrendFuser Global Theme - Light Mode */
/* Unified Design System - Clean, Professional, White/Yellow */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    /* Brand Colors */
    --primary: #FFDE59;
    --primary-dark: #E5C845;
    --primary-light: #FFF0B3;
    --primary-gradient: linear-gradient(135deg, #FFDE59 0%, #FFD700 100%);

    /* Light Theme Palette */
    --bg-body: #F8F9FA;
    /* Light Gray Background */
    --bg-card: #FFFFFF;
    /* White Card Background */
    --bg-card-hover: #FFFFFF;
    --bg-input: #FFFFFF;

    /* Text Colors */
    --text-main: #2D2D2D;
    /* Dark Gray Text */
    --text-muted: #6C757D;
    /* Muted Text */
    --text-dark: #000000;

    /* Borders & Accents */
    --border-color: #E9ECEF;
    --border-hover: #DEE2E6;

    /* Status Colors */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Dimensions - Matched to admin.css */
    --sidebar-width: 260px;
    --header-height: 80px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(255, 222, 89, 0.2);
    --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.08);

    /* Sidebar Specific (Dark Theme - Unified) */
    --sidebar-bg: #0A0A0A;
    --sidebar-active-bg: rgba(255, 222, 89, 0.1);
    --sidebar-text: rgba(251, 250, 242, 0.8);
    --sidebar-text-active: #FFDE59;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
}

/* ============================================
   LAYOUT
   ============================================ */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR (Dark/Premium)
   ============================================ */

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    /* Dark theme hover */
    color: #FFFFFF;
    border-left-color: var(--primary);
}

.nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-icon {
    width: 24px;
    display: flex;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    box-shadow: none;
}

.user-details .user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFF;
}

.user-details .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: #FFF;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    border: 1px solid transparent;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.admin-main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    background: var(--bg-body);
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.header-title h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -1px;
    color: var(--text-dark);
}

.header-title p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* ============================================
   CARDS & STATS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-meta {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.trend-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.trend-up {
    color: var(--success);
    background: #ECFDF5;
}

.trend-down {
    color: var(--danger);
    background: #FEE2E2;
}

.trend-pending {
    color: var(--warning);
    background: #FFFBEB;
}

.content-card,
.chart-section,
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
}

/* ============================================
   CONTENT ITEMS (GRID)
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.content-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.content-item-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.content-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.content-item-icon {
    font-size: 2rem;
    line-height: 1;
}

.content-item-type {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.content-item-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1.4;
    font-family: 'Outfit', sans-serif;
}

.content-item-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.content-item-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.content-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-icon-sm:hover {
    background: var(--bg-body);
    color: var(--primary-dark);
    border-color: var(--border-color);
}

.btn-icon-sm.delete:hover {
    color: var(--danger);
    background: #FEF2F2;
    border-color: #FEE2E2;
}


/* ============================================
   TABLES
   ============================================ */


.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: #F9FAFB;
}

.custom-table th:first-child {
    border-top-left-radius: 12px;
}

.custom-table th:last-child {
    border-top-right-radius: 12px;
}

.custom-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background: #F9FAFB;
}

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    width: 100%;
    padding: 0.6rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
}

.form-control:focus,
.form-select:focus {
    color: var(--text-main);
    background-color: #fff;
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 222, 89, 0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.form-control.has-icon {
    padding-left: 2.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: 0.45rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-export {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-export:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    transform: translateY(-1px);
}

/* Mobile Responsive */

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        border-right: none;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-float);
    }

    .admin-main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .mobile-header {
        display: flex;
    }
}

.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}