/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --sidebar-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    overflow-x: hidden;
}

/* Typography Utility */
.text-primary-custom {
    color: var(--primary-color);
}

.bg-primary-custom {
    background-color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1rem;
}

.login-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: row;
}

.login-image {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1555664424-778a1e5e1b48?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
    display: none;
}

@media (min-width: 768px) {
    .login-image {
        display: block;
    }
}

.login-form-container {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-floating>label {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(14, 165, 233, 0.25);
}

/* Dashboard Layout */
.wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: var(--sidebar-bg);
    color: var(--text-dark);
    transition: var(--transition);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

#sidebar.active {
    margin-left: -280px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .brand-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.menu-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu ul li a {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu ul li a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar-menu ul li a:hover,
.sidebar-menu ul li.active a {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-menu ul li a:hover i,
.sidebar-menu ul li.active a i {
    color: var(--primary-color);
}

/* Main Content */
#content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-light);
    transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
    background: #ffffff;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.sidebar-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    border-radius: 0.5rem;
}

.sidebar-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.top-navbar .user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.top-navbar .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.top-navbar .user-info {
    display: flex;
    flex-direction: column;
}

.top-navbar .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.top-navbar .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dashboard Cards */
.main-body {
    padding: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-right: 1.25rem;
}

.stat-icon.primary {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.stat-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-details h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        height: 100vh;
        margin-left: -280px;
    }

    #sidebar.active {
        margin-left: 0;
    }

    .wrapper #content {
        margin-left: 0 !important;
    }
}