html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Sidebar and Layout Styles */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: #2747E8;
    color: white;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, left 0.3s ease;
    z-index: 2000;
    overflow: hidden;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
}

.sidebar.collapsed {
    width: 5vw;
    min-width: 50px;
    max-width: 70px;
}

.sidebar:not(.collapsed) {
    width: 250px;
}

.sidebar .nav-link {
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-text,
.sidebar.collapsed .sidebar-footer {
    display: none !important;
}

.sidebar.collapsed form {
    justify-content: center;
}

.sidebar.collapsed .bi-box-arrow-right {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .logout-button {
    justify-content: center;
}

.logo-img svg {
    width: 125px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: width 0.3s ease;
}

.sidebar.collapsed .logo-img svg {
    width: 36px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar.collapsed .user-avatar {
    width: 28px;
    height: 28px;
}

.toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    text-align: left;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2100;
    background: rgba(39,71,232,0.95);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    margin-left: 0;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Overlay backdrop for sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    z-index: 1999;
    transition: opacity 0.3s ease;
}
.sidebar.open ~ .sidebar-backdrop {
    display: block;
}

/* Responsive: always overlay, never push */
@media (max-width: 991.98px) {
    .sidebar {
        width: 80vw;
        max-width: 300px;
    }
    .sidebar.collapsed {
        width: 5vw;
        min-width: 50px;
        max-width: 70px;
    }
}