/* Custom styles for MySQL CRUD Application */

/* Authentication Styles */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url('images/loginb.jpg') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050; /* lower than Bootstrap modal (default 1055+) */
    overflow-y: auto;
    padding: 20px;
}

.auth-form {
    width: min(92vw, 560px);
    max-width: 560px;
    animation: fadeInUp 0.6s ease-out;
}

.auth-card {
    position: relative;
    background: #ffffff; /* solid white */
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.auth-card::before { content: none; }

.auth-card::after { content: none; }

.auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-logo i {
    font-size: 2rem;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
}

.auth-logo h2 {
    margin: 0;
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.5rem;
}

.auth-header h3 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.auth-inline-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 8px;
	margin: 10px 0 0 0;
	font-size: 14px;
}

.auth-inline-icon {
	font-size: 18px;
	line-height: 1;
	margin-top: 2px;
}

.auth-inline-danger {
	background: #fde8e8;
	color: #b42318;
}

.auth-inline-warning {
	background: #fff4e5;
	color: #b54708;
}

.auth-inline-info {
	background: #e8f4fd;
	color: #0b6bcb;
}

.auth-inline-success {
	background: #ecfdf3;
	color: #027a48;
}

.auth-form-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.register-btn-message {
	margin-top: 8px;
	font-size: 0.9rem;
	color: #dc3545; /* red */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-right: none;
    color: #6c757d;
    padding: 0.75rem;
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.input-group .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group .btn {
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.form-check-label {
    color: #666;
    font-size: 0.9rem;
}

/* Avatar upload in modal */
.avatar-input-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.avatar-preview {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f1f3f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	border: 1px solid #e9ecef;
	overflow: hidden;
}

.avatar-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.avatar-preview i {
	font-size: 28px;
}

.avatar-actions {
	flex: 1;
}

.forgot-password {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

.auth-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Forgot password modal tweaks */
#forgotPasswordModal .modal-dialog { z-index: 1060; }
#forgotPasswordModal { z-index: 1060; }
#qr-container canvas, #qr-container img {
    width: 220px !important;
    height: 220px !important;
}

#qr-link-wrapper {
    word-break: break-all;
}

/* Compact Register Card (reduce height) */
#register-form .auth-card { padding: 1.25rem; }
#register-form .auth-header { margin-bottom: 0.75rem; }
#register-form .auth-header p { margin-bottom: 0; font-size: 0.9rem; }
#register-form .auth-form-content { gap: 0.75rem; }
#register-form .form-group { gap: 0.4rem; }
#register-form .auth-btn { padding: 0.6rem 1.1rem; }
#register-form .password-strength .strength-bar { height: 3px; }
#register-form .password-strength .strength-text { font-size: 0.8rem; }

/* Mobile: extra compact register card */
@media (max-width: 576px) {
    #register-form .auth-card { padding: 1rem; }
    #register-form .auth-header { margin-bottom: 0.6rem; }
    #register-form .auth-header h3 { font-size: 1.1rem; }
    #register-form .auth-header p { font-size: 0.85rem; }
    #register-form .auth-form-content { gap: 0.65rem; }
    #register-form .auth-btn { padding: 0.55rem 1rem; font-size: 0.95rem; }
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.strength-fill.good {
    width: 75%;
    background: #17a2b8;
}

.strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    color: #666;
    font-size: 0.8rem;
}

.terms-link {
    color: #0d6efd;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Authentication Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.auth-form.fade-out {
    animation: fadeOutDown 0.3s ease-in forwards;
}

/* Responsive Authentication */
@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-form { width: 94vw; max-width: none; }
    .auth-card { padding: 1.25rem; border-radius: 15px; }
    
    .auth-logo h2 {
        font-size: 1.3rem;
    }
    
    .auth-header h3 { font-size: 1.2rem; }
    
    .form-group { gap: 0.4rem; }
    
    .auth-form-content { gap: 0.9rem; }
}

/* Larger screens: give card a bit more width and keep height compact */
@media (min-width: 992px) {
    .auth-form { width: 560px; max-width: 560px; }
    .auth-card { padding: 1.75rem; }
}

/* Portrait orientation optimizations */
@media (orientation: portrait) {
    .auth-container {
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .auth-form { width: 94vw; max-width: 600px; margin: 12px auto; }
    .auth-card { padding: 1.25rem; }
    .auth-form-content { gap: 0.9rem; }
}

/* Very short screens (small portrait height) */
@media (max-height: 700px) and (orientation: portrait) {
    .auth-container { padding-top: 12px; }
    .auth-logo i { font-size: 1.6rem; padding: 0.5rem; }
    .auth-logo h2 { font-size: 1.2rem; }
    .auth-header { margin-bottom: 0.75rem; }
    .auth-card { padding: 1rem; }
    .auth-btn { padding: 0.6rem 1rem; }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 1.25rem;
    }
    
    .auth-logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-logo i {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    .auth-logo h2 {
        font-size: 1.2rem;
    }
}

/* Export buttons styling */
.btn-group .btn {
    margin-right: 0;
}

.btn-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

/* Button toolbar spacing */
.btn-toolbar .btn-group {
    margin-right: 10px;
}

.btn-toolbar .btn-group:last-child {
    margin-right: 0;
}

/* Fixed Header Wrapper */
.sticky-header-wrapper {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 1000;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px 20px 20px;
    width: calc(100% - 280px);
}

/* Dropdown container z-index */
.dropdown {
    position: relative;
    z-index: 9999;
}

.dropdown-menu {
    z-index: 9999 !important;
}

/* Page title section */
.page-title-section {
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Button toolbar padding */
.btn-toolbar {
    padding-top: 10px;
    flex-wrap: wrap;
    overflow-x: visible;
}

/* Modern Dropdown Styling */
.modern-dropdown {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 8px;
    min-width: 220px;
    animation: dropdownFadeIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    overflow: hidden;
    position: relative;
    z-index: 9999;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modern-dropdown .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px 4px 16px;
    margin: 0;
}

.modern-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px;
    position: relative;
    overflow: hidden;
    max-width: calc(100% - 16px);
    box-sizing: border-box;
}

.modern-dropdown .dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.modern-dropdown .dropdown-item:hover::before {
    left: 100%;
}

.modern-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transform: none;
    box-shadow: none;
    border-radius: 6px;
    margin: 2px 8px;
    max-width: calc(100% - 16px);
    overflow: hidden;
}

.modern-dropdown .dropdown-item:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    max-width: calc(100% - 16px);
    overflow: hidden;
}

.modern-dropdown .dropdown-divider {
    margin: 8px 0;
    border-color: #e9ecef;
}

/* Options Button Styling */
.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

/* Keep button green when dropdown is open */
.btn-outline-secondary[aria-expanded="true"] {
    background: linear-gradient(135deg, #198754, #157347);
    border-color: #157347;
    color: white;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #198754, #157347);
    border-color: #157347;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

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

/* Sidebar Container */
.sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* Main Content Container */
.main-content-container {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content {
    padding: 20px;
    padding-top: 300px;
    width: 100%;
    min-height: 100vh;
}

/* Modern Sidebar Styling */
.modern-sidebar {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.modern-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.sidebar-content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    justify-content: space-between;
}

/* Sidebar Header */
.sidebar-header {
    padding: 2rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.logo-text {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Sidebar Close Button */
.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-close-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-close-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* User Info Section within Navigation */
.user-info-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info-section .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0 1.5rem;
}

.user-info-section .user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
}

.user-info-section .user-details {
    flex: 1;
}

.user-info-section .user-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.user-info-section .user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0;
}

.user-info-section .copyright {
    text-align: center;
    padding: 0 1.5rem;
}

.user-info-section .copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin: 0;
}

/* Old sidebar footer styles removed - now using user-info-section */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive Modern Sidebar */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .sidebar-container {
        width: 280px;
    }
    
    .main-content-container {
        margin-left: 280px;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
    
    .nav-text {
        font-size: 1rem;
    }
}

/* Medium screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .sidebar-container {
        width: 260px;
    }
    
    .main-content-container {
        margin-left: 260px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .nav-text {
        font-size: 0.95rem;
    }
}

/* Small screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar-container {
        width: 240px;
    }
    
    .main-content-container {
        margin-left: 240px;
    }
    
    .sidebar-header {
        padding: 1.5rem 1rem 0.75rem 1rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav-link {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .nav-text {
        font-size: 0.9rem;
    }
    
    .user-info-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .user-info-section .user-info {
        padding: 0 1rem;
    }
    
    .user-info-section .copyright {
        padding: 0 1rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.75rem;
    }
    
    .sidebar-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Mobile screens (below 768px) */
@media (max-width: 767px) {
    .sidebar-container {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-container.show {
        transform: translateX(0);
    }
    
    .main-content-container {
        margin-left: 0;
    }
    
    /* Fixed header adjustments for mobile */
    .sticky-header-wrapper {
        left: 0;
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    
    /* Mobile title positioning */
    .page-title-section {
        padding-left: 0;
        margin-left: 0;
        padding-top: 0;
        margin-top: 0;
    }
    
    .page-title {
        font-size: 1.2rem;
        font-weight: bold;
        margin-left: 0;
        padding-left: 0;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    /* Move mobile cards much higher on mobile */
    .mobile-cards {
        margin-top: -80px;
    }
    
    .sidebar-content {
        height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
        justify-content: space-between;
    }
    
    .sidebar-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .sidebar-content::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .sidebar-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    .sidebar-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    
    /* Add overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
        border: none;
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
    }
    
    .mobile-menu-toggle:active {
        transform: translateY(0);
    }
    
    /* Improve touch targets for mobile */
    .nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .mobile-menu-toggle {
        min-width: 48px;
        min-height: 48px;
    }
    
    .sidebar-close-btn {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
}

/* Extra small screens (below 576px) */
@media (max-width: 575px) {
    .sidebar-container {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: 15px;
        left: 15px;
    }
    
    .sidebar-header {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .sidebar-close-btn {
        width: 35px;
        height: 35px;
        font-size: 0.95rem;
    }
    
    .nav-link {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }
    
    .nav-text {
        font-size: 0.95rem;
    }
    
    .user-info-section {
        margin-top: 1.25rem;
        padding-top: 1rem;
    }
    
    .user-info-section .user-info {
        padding: 0 1.25rem;
    }
    
    .user-info-section .copyright {
        padding: 0 1.25rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .user-name {
        font-size: 0.9rem;
    }
    
    .user-role {
        font-size: 0.8rem;
    }
}

/* Very small screens (below 400px) */
@media (max-width: 399px) {
    .sidebar-container {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: 10px;
        left: 10px;
    }
    
    .sidebar-header {
        padding: 1.25rem 0.75rem 0.75rem 0.75rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .sidebar-close-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .nav-link {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .nav-text {
        font-size: 0.9rem;
    }
    
    .user-info-section {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .user-info-section .user-info {
        padding: 0 0.75rem;
    }
    
    .user-info-section .copyright {
        padding: 0 0.75rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.75rem;
    }
}

/* Responsive dropdown styling */
@media (max-width: 768px) {
    .modern-dropdown {
        min-width: 200px;
        margin-top: 5px;
    }
    
    .btn-outline-secondary {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .modern-dropdown {
        min-width: 180px;
        margin-top: 5px;
    }
    
    .btn-outline-secondary {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .modern-dropdown .dropdown-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Responsive page title */
.page-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0;
    line-height: 1.2;
    width: 100%;
    text-align: left;
}

/* Responsive title section */
@media (max-width: 768px) {
    .page-title-section {
        padding-left: 0;
        margin-left: 0;
        width: 100%;
    }
    
    .page-title {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0;
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .page-title-section {
        padding-left: 0;
        margin-left: 0;
        width: 100%;
    }
    
    .page-title {
        font-size: 1.25rem;
        font-weight: bold;
        margin-bottom: 0;
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 400px) {
    .page-title-section {
        padding-left: 0;
        margin-left: 0;
        width: 100%;
    }
    
    .page-title {
        font-size: 1.1rem;
        font-weight: bold;
        margin-bottom: 0;
        width: 100%;
        text-align: left;
    }
}

/* Responsive header layout */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .btn-toolbar {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .btn-toolbar {
        margin-top: 15px;
        width: 100%;
        justify-content: flex-start;
    }
}

/* Individual button spacing within toolbar */
.btn-toolbar .btn {
    margin-right: 8px;
    margin-bottom: 5px;
    white-space: nowrap;
}

.btn-toolbar .btn:last-child {
    margin-right: 0;
}

.btn-toolbar .btn-group {
    margin-bottom: 5px;
}

/* Responsive button padding */
@media (max-width: 768px) {
    .btn-toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    
    .btn-toolbar .btn {
        padding: 12px 24px;
        font-size: 14px;
        margin-right: 5px;
        margin-bottom: 8px;
        white-space: nowrap;
        min-height: 44px;
        min-width: 80px;
    }
    
    .btn-toolbar .btn i {
        margin-right: 5px !important;
        font-size: 16px;
    }
    
    .btn-toolbar .btn-group {
        margin-right: 10px;
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .btn-toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    
    .btn-toolbar .btn {
        padding: 10px 20px;
        font-size: 13px;
        margin-right: 4px;
        margin-bottom: 6px;
        white-space: nowrap;
        min-height: 44px;
        min-width: 70px;
    }
    
    .btn-toolbar .btn i {
        margin-right: 4px !important;
        font-size: 15px;
    }
    
    .btn-toolbar .btn-group {
        margin-right: 8px;
        margin-bottom: 6px;
    }
    
    .btn-toolbar .btn span {
        display: none;
    }
    
    .btn-toolbar .btn i {
        margin-right: 0 !important;
    }
}

/* Export button hover effects */
.btn-success:hover {
    background-color: #198754;
    border-color: #198754;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

/* Print button hover effects */
.btn-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

/* Print-specific styles */
@media print {
    .sidebar,
    .btn-toolbar,
    .search-section,
    .btn-group,
    .btn,
    .modal,
    .alert,
    .scroll-to-top-btn,
    .mobile-notification,
    .modal-validation-alert,
    .form-validation-messages {
        display: none !important;
    }
    
    .col-md-9 {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .table-responsive {
        overflow: visible !important;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    .table th {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
    
    body {
        margin: 0 !important;
        padding: 20px !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
}

/* Email validation icon styles */
.email-validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 10;
}

/* Invalid email icon (red error) */
.email-validation-icon.invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
}

/* Valid email icon (green checkmark) */
.email-validation-icon.valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.email-input-container {
    position: relative;
}

.email-input-container .form-control {
    padding-right: 35px; /* Make space for the icon */
}

.email-input-container .form-control.is-valid {
    padding-right: 35px; /* Keep space even when valid */
}

.email-input-container .form-control.is-invalid {
    padding-right: 35px; /* Keep space when invalid */
}

/* Legacy sidebar styles removed - using new sidebar-container structure */

.sidebar .nav-link {
    color: #adb5bd;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.15s ease-in-out;
}

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

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main content adjustments - handled by main-content-container */

/* Advanced Responsive Table Styles */
.table-responsive-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

.responsive-table {
    min-width: 800px;
    margin-bottom: 0;
}

.responsive-table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.responsive-table td {
    vertical-align: middle;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Avatar column */
.col-avatar {
	width: 64px;
}

.table-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #e9ecef;
}

/* Table header primary blue background */
.table-dark {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.table-dark th {
    background-color: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Column Priority System */
@media (max-width: 1200px) {
    .col-address { display: none !important; }
}

@media (max-width: 992px) {
    .col-created { display: none !important; }
}

@media (max-width: 768px) {
    .col-phone { display: none !important; }
}

@media (max-width: 576px) {
    .col-id { display: none !important; }
}

/* Mobile Card View */
.mobile-cards {
    display: none;
    margin-top: 0;
    padding-top: 0;
}

@media (max-width: 991.98px) {
    .table-responsive-container {
        display: none;
    }
    
    .mobile-cards {
        display: block;
        margin-top: -50px;
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

.mobile-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-top: 0;
    overflow: visible;
}

.mobile-card:first-child {
    margin-top: 0;
}

.mobile-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    margin-top: 0;
    padding-top: 0;
}

.mobile-card-title {
    font-weight: 600;
    color: #0d6efd;
    margin: 0;
}

.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile card action buttons - larger on mobile */
@media (max-width: 768px) {
    .mobile-card-actions .btn {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 40px;
        min-width: 60px;
    }
    
    .mobile-card-actions .btn i {
        font-size: 16px;
    }
}

.mobile-card-body {
    display: grid;
    gap: 0.5rem;
}

.mobile-card-field {
    display: flex;
    flex-direction: column;
}

.mobile-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.mobile-card-value {
    color: #495057;
    word-break: break-word;
}

.mobile-card-value.empty {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Typography */
@media (max-width: 576px) {
    .responsive-table th,
    .responsive-table td {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .mobile-card {
        padding: 0.75rem;
        margin-top: 0;
        margin-bottom: 0.75rem;
    }
    
    .mobile-card-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .mobile-card-title {
        font-size: 1rem;
        margin: 0;
    }
    
    .mobile-card-value {
        font-size: 0.9rem;
    }
}

/* Sticky Actions Column */
@media (min-width: 992px) {
    .col-actions {
        position: sticky;
        right: 0;
        background-color: #0d6efd;
        z-index: 1;
    }
    
    .col-actions + td {
        background-color: inherit;
    }
}

/* Enhanced Focus States */
.responsive-table tbody tr:focus-within {
    background-color: rgba(13, 110, 253, 0.1);
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

/* Loading State for Mobile Cards */
.mobile-cards.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Search Section Styles */
.search-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    margin-bottom: 0 !important;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.search-input-group .input-group-text {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.search-input-group .form-control {
    border-left: none;
    border-right: none;
}

.search-input-group .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-input-group .btn-outline-secondary {
    border-left: none;
    border-color: #ced4da;
}

.search-input-group .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.search-results-info {
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 0.9rem;
}

#search-results-count {
    font-weight: 500;
}

/* Search Highlighting */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
    font-weight: 600;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h5 {
    margin-bottom: 0.5rem;
}

.no-results p {
    margin-bottom: 0;
}

/* Search Animation */
.search-section {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Section Toggle Styles */
.search-section {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.search-section.d-none {
    display: none !important;
}

.search-section.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

/* Search Button Styles */
#search-toggle-btn {
    border: 2px solid #0d6efd;
    color: #0d6efd;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

#search-toggle-btn:hover {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border-color: #0b5ed7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#search-toggle-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#search-toggle-btn:active {
    transform: translateY(0);
}

/* Search button active state when search section is visible */
#search-toggle-btn.active {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border-color: #0b5ed7;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Responsive Search */
@media (max-width: 768px) {
    .search-section {
        padding: 1rem;
    }
    
    .search-section .row {
        margin: 0;
    }
    
    .search-section .col-md-6,
    .search-section .col-md-3 {
        padding: 0.25rem;
    }
    
    #search-input {
        font-size: 0.9rem;
    }
    
    .search-results-info {
        font-size: 0.8rem;
        text-align: center;
    }
}

/* Button styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline-primary:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Form styles */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty state */
.text-muted {
    color: #6c757d !important;
}

/* Card styles for future enhancements */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Responsive adjustments - handled by new sidebar-container structure */

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Page Scrollbar */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 8px;
    border: 2px solid #f1f1f1;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
    border: 2px solid #e9ecef;
}

::-webkit-scrollbar-thumb:active {
    background: #0a58ca;
}

::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top-btn:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.scroll-to-top-btn:active {
    background-color: #0a58ca;
    transform: translateY(0);
}

.scroll-to-top-btn.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive scroll to top button */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #343a40;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer p {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #ffc107 !important;
}

.sidebar-footer p:last-child {
    margin-bottom: 0;
}

/* Responsive sidebar footer */
@media (max-width: 767.98px) {
    .sidebar-footer {
        margin-top: 1rem;
        background-color: transparent;
        border-top: none;
        padding: 0.5rem 1rem;
    }
    
    .sidebar-footer p {
        font-size: 0.7rem;
        color: #ffc107 !important;
    }
}

/* Status indicators */
.status-online {
    color: #28a745;
}

.status-offline {
    color: #dc3545;
}

/* Hover effects */
.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid #80bdff;
    outline-offset: 2px;
}


/* Mobile Topmost Notification */
.mobile-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    padding: 0;
    margin: 0;
    display: none;
    pointer-events: none;
}

.mobile-notification.show {
    transform: translateY(0);
    display: block;
    pointer-events: auto;
}

.mobile-notification-content {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.mobile-notification.success .mobile-notification-content {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.mobile-notification.warning .mobile-notification-content {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.mobile-notification.info .mobile-notification-content {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.mobile-notification-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.mobile-notification-message {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mobile-notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.mobile-notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile-specific validation styles */
@media (max-width: 768px) {
    .mobile-notification {
        display: block;
    }
    
    .mobile-notification-content {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .mobile-notification-icon {
        font-size: 14px;
    }
    
    .mobile-notification-close {
        font-size: 12px;
        padding: 2px;
    }
}

/* Email input restriction styling */
.email-input-restricted {
    position: relative;
}

.email-input-restricted::after {
    content: "Only ASCII characters allowed";
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 11px;
    color: #6c757d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-input-restricted:focus-within::after {
    opacity: 1;
}

/* Unicode validation error styling */
.form-control.is-invalid.unicode-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    animation: unicodeErrorShake 0.5s ease-in-out;
}

@keyframes unicodeErrorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Unicode error message styling */
.invalid-feedback.unicode-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 5px;
    color: #721c24;
    font-weight: 500;
    border-left: 4px solid #dc3545;
}

/* Mobile form validation improvements */
@media (max-width: 768px) {
    .form-control.is-invalid {
        border-width: 2px;
        animation: shake 0.5s ease-in-out;
    }
    
    .form-control.is-valid {
        border-width: 2px;
    }
    
    .invalid-feedback {
        font-size: 12px;
        margin-top: 4px;
        padding: 4px 8px;
        background-color: #f8d7da;
        border: 1px solid #f5c6cb;
        border-radius: 4px;
        color: #721c24;
    }
    
    .valid-feedback {
        font-size: 12px;
        margin-top: 4px;
        padding: 4px 8px;
        background-color: #d4edda;
        border: 1px solid #c3e6cb;
        border-radius: 4px;
        color: #155724;
    }
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Mobile notification positioning adjustments */
@media (max-width: 576px) {
    .mobile-notification-content {
        padding: 8px 12px;
        font-size: 12px;
        gap: 8px;
    }
    
    .mobile-notification-icon {
        font-size: 12px;
    }
    
    .mobile-notification-close {
        font-size: 10px;
        padding: 1px;
    }
}

/* Mobile notification z-index handled in main rule */

/* Fix for unwanted modal backdrop overlay */
.modal-backdrop {
    display: none !important;
}

.modal-backdrop.show {
    display: none !important;
}

/* Ensure no unwanted overlays */
body.modal-open {
    overflow: auto !important;
}

/* Hide any Bootstrap backdrop that might appear */
.modal-backdrop.fade {
    display: none !important;
}

/* Additional overlay fixes */
.modal-backdrop.fade.show {
    display: none !important;
}

/* Ensure no dark overlays on body */
body {
    background-color: #f8f9fa !important;
}

/* Remove any unwanted dark backgrounds */
.container-fluid {
    background-color: transparent !important;
}

/* Fix for any remaining overlay issues */
* {
    box-sizing: border-box;
}

/* Ensure main content is always visible */
main {
    background-color: transparent !important;
    position: relative;
    z-index: 1;
}

/* Responsive main content adjustments */
@media (max-width: 767px) {
    .main-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 350px !important;
    }
    
    /* Fixed header adjustments for mobile */
    .sticky-header-wrapper {
        padding: 0 15px 15px 15px;
    }
    
    /* Add top padding for mobile menu toggle */
    .page-title-section {
        padding-top: 100px !important;
    }
}

@media (max-width: 575px) {
    .main-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 330px !important;
    }
    
    /* Fixed header adjustments for small screens */
    .sticky-header-wrapper {
        padding: 0 10px 10px 10px;
    }
    
    .page-title-section {
        padding-top: 90px !important;
    }
}

@media (max-width: 399px) {
    .main-content {
        padding-left: 5px !important;
        padding-right: 5px !important;
        padding-top: 310px !important;
    }
    
    /* Fixed header adjustments for very small screens */
    .sticky-header-wrapper {
        padding: 0 5px 5px 5px;
    }
    
    .page-title-section {
        padding-top: 80px !important;
    }
}

/* Modal Validation Alert */
.modal-validation-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1055;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    padding: 0;
    margin: 0;
    display: none;
    pointer-events: none;
}

.modal-validation-alert.show {
    transform: translateY(0);
    display: block;
    pointer-events: auto;
}

.modal-validation-content {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 15px;
    border-radius: 8px;
}

.modal-validation-alert.success .modal-validation-content {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.modal-validation-alert.warning .modal-validation-content {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.modal-validation-alert.info .modal-validation-content {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.modal-validation-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.modal-validation-message {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-validation-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.modal-validation-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive for modal validation */
@media (max-width: 768px) {
    .modal-validation-content {
        padding: 10px 14px;
        font-size: 13px;
        margin: 0 10px;
    }
    
    .modal-validation-icon {
        font-size: 14px;
    }
    
    .modal-validation-close {
        font-size: 12px;
        padding: 2px;
    }
}

@media (max-width: 576px) {
    .modal-validation-content {
        padding: 8px 12px;
        font-size: 12px;
        margin: 0 5px;
    }
    
    .modal-validation-icon {
        font-size: 12px;
    }
    
    .modal-validation-close {
        font-size: 10px;
        padding: 1px;
    }
}

/* Form Validation Messages */
.form-validation-messages {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

.form-validation-content {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-left: 4px solid #dc3545;
}

.form-validation-messages.success .form-validation-content {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-left-color: #28a745;
}

.form-validation-messages.warning .form-validation-content {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border-left-color: #ffc107;
}

.form-validation-messages.info .form-validation-content {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-left-color: #17a2b8;
}

.form-validation-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.form-validation-message {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.form-validation-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.form-validation-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive for form validation */
@media (max-width: 768px) {
    .form-validation-content {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .form-validation-icon {
        font-size: 14px;
    }
    
    .form-validation-close {
        font-size: 12px;
        padding: 2px;
    }
}

@media (max-width: 576px) {
    .form-validation-content {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .form-validation-icon {
        font-size: 12px;
    }
    
    .form-validation-close {
        font-size: 10px;
        padding: 1px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .btn,
    .modal,
    .mobile-notification {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
    }
    
    .table {
        font-size: 12px;
    }
}
