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%;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #06d6a0;
    --background-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --sidebar-width: 240px;
    --topbar-height: 60px;
}

/* Base Styles */
body {
    background: var(--background-gradient);
    min-height: 100vh;
    padding-top: var(--topbar-height);
/*    padding-left: var(--sidebar-width);*/
    margin: 0; /* Reset margin */
    display: flex;
    flex-direction: column;
}
@media (max-width: 768px) {
    body {
        padding-left: 0;
    }
}

/* Main Content Area — desktop default; overridden per breakpoint in _Navigation.cshtml */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

.main-content main {
    flex: 1;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive sidebar rules moved to _Navigation.cshtml to keep all nav styles together */

/* Navigation Styles */
.top-navbar {
    height: var(--topbar-height);
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.side-navbar {
    width: var(--sidebar-width);
    background: white;
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    overflow-y: auto;
    transition: all 0.3s;
}

/* Auth Card Styles */
.auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h2 {
        color: var(--primary-color);
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background-color: #3a50c7;
        transform: translateY(-1px);
    }

/* Profile Styles */
.profile-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin-top: 0.75rem;
}

.profile-pic {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.3);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Navigation Links */
.nav-link {
    color: #495057;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

    .nav-link:hover {
        background: rgba(67, 97, 238, 0.1);
        color: var(--primary-color);
    }

    .nav-link.active {
        background: var(--primary-color);
        color: white !important;
    }

/* Input with icon styles */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.input-icon input {
    padding-left: 40px;
}

/* Role card styles */
.role-card {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
    position: relative;
}

.role-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.role-card.active {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-card label {
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
}

/* Sidebar headings for navigation sections */
.sidebar-heading {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-heading .small {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Add styling for conditional form sections */
.conditional-section {
    display: none;
    transition: all 0.3s ease;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--primary-color);
}

/* Add styles for validation messages */
.field-validation-error {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
}

/* Add styling for select elements */
select.form-select {
    appearance: auto;
}

select.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

/* Add styling for select option placeholder */
select.form-select option:first-child {
    color: #6c757d;
}

/* Add styling for file inputs */
input[type="file"].form-control {
    padding: 0.375rem 0.75rem;
}

/* Add styling for date inputs */
input[type="date"].form-control {
    padding-right: 10px;
}

/* Typography Helpers */
.fw-semi-bold {
    font-weight: 600;
}

.dropdown-header {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: #6c757d;
}

/* Logout form styling */
#logoutForm {
    margin: 0;
    padding: 0;
}

#logoutForm button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

#logoutForm button:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Image Viewer Styles */
.image-zoom-trigger {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-zoom-trigger:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

#imageViewerModal .modal-content {
    background-color: transparent;
    border: none;
}

#imageViewerModal .modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fullScreenImage {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.5);
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1060;
}