/* 
    Modern SaaS Dashboard Design System 
    Author: Antigravity AI
    Framework: Bootstrap 5.3 + Custom CSS
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #ffffff;
    --border-radius-lg: 1rem;
    --border-radius-md: 0.625rem;
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Base Layout Structure */
.app-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.1);
}

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

.nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0;
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link:hover {
    color: var(--sidebar-active-text);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--sidebar-active-text);
    background-color: var(--sidebar-active-bg);
    border-left: 4px solid var(--accent-color);
}

/* Sidebar Section Headers */
.nav-header {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    font-weight: 700;
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-content {
    padding: 1.5rem;
    flex: 1;
}

/* Sidebar Mini / Collapsed State */
.sidebar-collapse .app-sidebar {
    width: var(--sidebar-collapsed-width) !important;
}

.sidebar-collapse .app-main {
    margin-left: var(--sidebar-collapsed-width) !important;
}

.sidebar-collapse .sidebar-brand {
    padding: 0 !important;
    justify-content: center !important;
}

.sidebar-collapse .sidebar-brand img {
    height: 35px !important;
    width: auto !important;
}

.sidebar-collapse .nav-link span,
.sidebar-collapse .nav-header {
    display: none !important;
}

.sidebar-collapse .nav-link {
    justify-content: center !important;
    padding: 0.75rem 0 !important;
    gap: 0 !important;
}

.sidebar-collapse .nav-link i {
    font-size: 1.5rem !important;
    margin: 0 !important;
}

/* Navbar / Topbar */
.app-header {
    background-color: #ffffff;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Cards & Containers */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    background-color: var(--bg-card);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Card Accents (AdminLTE Style) */
.card.card-outline {
    border-top: 4px solid #dee2e6;
}

.card.card-outline.card-primary {
    border-top: 4px solid var(--accent-color);
}

.card.card-outline.card-success {
    border-top: 4px solid var(--success-color);
}

.card.card-outline.card-danger {
    border-top: 4px solid var(--danger-color);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    transition: all 0.2s;
}

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

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

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

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

/* DataTables Styling */
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    margin: 1rem 0;
}

.page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.table thead th {
    background-color: #f1f5f9;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

/* Footer Styling */
.app-footer {
    padding: 1.5rem;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
}

/* Login Page Styling */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    padding: 1rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-card-body {
    padding: 2.5rem;
}

.login-box-msg {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
    font-size: 1.125rem;
}

/* Action Buttons Styling */
.btn-action {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.35rem !important;
    font-size: 0.75rem !important;
    transition: all 0.2s !important;
    border: none !important;
}

.btn-action i {
    font-size: 0.75rem !important;
    line-height: normal !important;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-action i {
    line-height: 1;
}

/* Utility Classes */
.soft-shadow {
    box-shadow: var(--shadow-soft);
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    
    .app-main {
        margin-left: 0 !important;
    }
    
    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}
