:root {
    --sidebar-width: 260px;
    --navbar-height: 56px;
    --footer-height: 54px;
    --primary-color: #1f2937;
    --secondary-color: #f3f4f6;
    --accent-color: #3b82f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navbar Styles */
.navbar-custom {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-custom .navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
    margin-right: 2rem;
    letter-spacing: -0.5px;
}

.navbar-custom .nav-link {
    color: var(--text-secondary) !important;
    margin: 0 0.75rem;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    /* test */
    text-align: right;
}

.navbar-custom .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-custom .toggle-sidebar-btn {
    color: var(--text-primary);
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-custom .toggle-sidebar-btn:hover {
    background-color: var(--secondary-color);
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    margin-top: 0px;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    color: var(--text-primary);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 999;
    max-height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
}

/* .sidebar.collapsed {
    width: 120px;
} */

.sidebar-header {
    padding: 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-item-title {
    display: inline-flex;
}

.sidebar-item-title.visible {
    display: none;
}


.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.sidebar-menu-item {
    /* position: relative; */
    flex-direction: row;
    margin: 0.25rem 0;
}

.sidebar-menu-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.sidebar-menu-link:hover {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border-left-color: var(--accent-color);
    padding-left: 1.5rem;
}

.sidebar-menu-link.active {
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu-right {
    display: none;
    position: relative;
    list-style: none;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 9;
    flex-direction: column;
    left: 0;
}

.sidebar-menu-item:hover .sidebar-submenu-right.show {
    display: block;
    position: absolute;
    float: inline-end;
    left: 70px;
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border-left-color: var(--accent-color);
}
/* 
.menu-shift {
    display: blosk;
    position: relative;
    left: 0;
    top: -20px;
    z-index: 10;
} */


/* .sidebar-submenu-right.show {
    display: inline-block;
} */


.sidebar-submenu.show {
    max-height: 500px;
}

.sidebar-submenu.hidden {
    display: none;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 2.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sidebar-submenu-link:hover {
    color: var(--text-primary);
    padding-left: 3rem;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: 70px;
    /* position: absolute; */
    left: 0;
}

.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .sidebar-menu-link span,
.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed .bi-chevron-down {
    display: none;
}

.sidebar.collapsed .sidebar-menu-link {
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu {
    padding: 0.5rem 0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - var(--navbar-height));
}

.main-content.collapsed {
    margin-left: 70px;
}

.content-wrapper {
    flex: 1;
    padding: 2rem;
}

.page-title {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.75rem;
}

/* Footer Styles */
.footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 1rem 2rem;
    text-align: center;
    margin-top: auto;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 1rem;
    transition: var(--transition);
}

.footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Scrollbar Styling */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }

    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        max-height: none;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    }

    .sidebar.show {
        left: 0;
    }

    .main-container {
        margin-top: 0;
        overflow: visible;
    }

    .main-content {
        height: calc(100vh - var(--navbar-height));
    }

    .content-wrapper {
        padding: 1.5rem;
    }

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




.password-done-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
}

.success-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #16a34a;
}

.success-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.success-message {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.success-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #374151;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    font-size: 1.2rem;
    color: #16a34a;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.info-box {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 2rem;
    color: #374151;
}

.info-box strong {
    color: #3b82f6;
    display: block;
    margin-bottom: 0.5rem;
}




.change-password-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.change-password-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.change-password-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.change-password-header p {
    margin: 0;
    opacity: 0.95;
}

.change-password-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.help-text {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #374151;
}

.help-text strong {
    color: #3b82f6;
    display: block;
    margin-bottom: 0.5rem;
}

.help-text ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.help-text li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.errorlist li {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 0.75rem;
    color: #991b1b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.non-field-errors {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 1rem;
    color: #991b1b;
    margin-bottom: 1.5rem;
}

.non-field-errors li {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.messages li {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 1rem;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
