:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 60px;
    --primary-color: #0d6efd;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
    min-height: 100vh;
}

/* Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--navbar-height);
}

.sidebar-header i {
    font-size: 1.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    margin: 0.125rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.sidebar-nav .nav-link.active {
    background: var(--primary-color);
    color: var(--sidebar-active);
}

.sidebar-nav .nav-link i {
    font-size: 1.125rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.nav-section {
    padding: 1.5rem 1rem 0.5rem 1.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sidebar-text);
    opacity: 0.6;
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar.collapsed .nav-section {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

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

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
    padding: 0 1.5rem;
}

#sidebarToggle {
    padding: 0;
    line-height: 1;
}

/* Cards */
.card {
    border-radius: 0.75rem;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Login Page */
.login-page {
    background-image: url('../img/login-bg2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem;
    padding-right: 10%;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-form .input-group-text {
    background: #f8fafc;
    border-right: none;
}

.login-form .form-control {
    border-left: none;
}

.login-form .form-control:focus {
    border-color: #dee2e6;
}

.login-form .input-group:focus-within .input-group-text {
    border-color: #86b7fe;
}

.login-form .input-group:focus-within .form-control {
    border-color: #86b7fe;
}

@media (max-width: 768px) {
    .login-container {
        justify-content: center;
        padding-right: 1rem;
    }
}

/* Flash Messages */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.demo-text {
	color: transparent !important;
	text-shadow: 0 0 7px rgba(0, 0, 0, 0.5);
}
