/* RenewalHub - Premium CSS Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    
    /* Theme Light Variables */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Premium Palette Accent Colors */
    --accent-primary: #6366f1; /* Indigo */
    --accent-primary-hover: #4f46e5;
    --accent-secondary: #0ea5e9; /* Sky blue */
    
    /* Status Colors */
    --status-paid: #10b981; /* Emerald */
    --status-paid-bg: rgba(16, 185, 129, 0.12);
    --status-pending: #f59e0b; /* Amber */
    --status-pending-bg: rgba(245, 158, 11, 0.12);
    --status-overdue: #ef4444; /* Rose */
    --status-overdue-bg: rgba(239, 68, 68, 0.12);
    
    --sidebar-width: 260px;
    --sidebar-bg: #1e1b4b; /* Deep indigo */
    --sidebar-text: #e0e7ff;
    
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --glass-blur: 10px;
}

[data-theme="dark"] {
    --bg-primary: #09090b;
    --bg-secondary: #121214;
    --bg-card: rgba(18, 18, 20, 0.8);
    --border-color: #27272a;
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    
    --accent-primary: #818cf8;
    --accent-primary-hover: #6366f1;
    
    --sidebar-bg: #09090b;
    --sidebar-text: #f4f4f5;
    --border-color: #1f1f23;
    
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    opacity: 0.75;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-top {
    height: 70px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
}

/* Cards with Premium Glassmorphism */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.12);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover) 0%, var(--accent-secondary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
}

/* Badges for status */
.badge-status-paid {
    background-color: var(--status-paid-bg);
    color: var(--status-paid);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-status-pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-status-overdue {
    background-color: var(--status-overdue-bg);
    color: var(--status-overdue);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Tables styling */
.premium-table th {
    background-color: rgba(99, 102, 241, 0.04);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 12px 16px;
}

.premium-table td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.premium-table tr:hover {
    background-color: rgba(99, 102, 241, 0.01);
}

/* Breadcrumbs */
.breadcrumb-item a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.2s;
}

.theme-toggle-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* Mobile responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        left: -var(--sidebar-width);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}
