/* Modern UI/UX CSS for المستشار */
:root {
    /* Primary Colors */
    --primary-color: #6f42c1;
    --primary-light: #8e6ad9;
    --primary-dark: #5a32a3;

    /* Secondary Colors */
    --secondary-color: #03a9f4;
    /* Brighter blue */
    --secondary-light: #67daff;
    --secondary-dark: #007ac1;

    /* Text Colors */
    --text-on-primary: #ffffff;
    --text-on-secondary: #000000;
    --text-muted: rgba(255, 255, 255, 0.7);

    /* Background Colors */
    --background-light: #f8f9fa;
    --background-dark: #121212;
    --card-bg: #ffffff;

    /* Status Colors */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;

    /* Design Elements */
    --border-radius: 14px;
    --border-radius-lg: 14px;
    --border-radius-sm: 6px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.2s;
    --gradient-bg: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    --gradient-btn: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-btn-hover: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

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

::selection {
    background-color: var(--primary-light);
    color: white;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #dddddd 0%, #e9eef5 50%, #dadcdf 100%);
    background-attachment: fixed;
    color: var(--text-on-primary);
    min-height: 100vh;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Modern Card Styling */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease-in-out;
    overflow: hidden;
    height: 100%;
    border: none;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-btn);
    transition: height var(--transition-speed) ease;
}

.card:hover::before {
    height: 100%;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}


.card-img-top {
    padding: 1.5rem;
    height: 150px;
    object-fit: contain;
    background-color: var(--background-light);
}

.card-body {
    padding: 1rem;
    text-align: center;
}

.card-text {
    font-weight: 600;
    color: var(--primary-color);
}

/* Modern Button Styling */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: none;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: var(--gradient-btn);
    color: var(--text-on-primary);
}

.btn-primary:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: linear-gradient(45deg, var(--secondary-dark), var(--secondary-color));
    color: var(--text-on-primary);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-light));
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(45deg, #388e3c, #4caf50);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #d32f2f, #f44336);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, #f57c00, #ff9800);
    color: white;
}

.btn-info {
    background: linear-gradient(45deg, #0288d1, #03a9f4);
    color: white;
}

.btn .bi {
    margin-left: 0.5rem;
    vertical-align: middle;
    font-size: 1.1em;
}

/* Form Styling */
.form-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 720px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-btn);
}

.form-control {
    border-radius: var(--border-radius);
    padding: 0.85rem 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(94, 53, 177, 0.15);
    background-color: white;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
}

label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

/* Navigation Bar */
.modern-navbar {
    background-color: var(--card-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.modern-navbar.scrolled {
    padding: 0.6rem 1.5rem;
}

.modern-navbar .navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
    position: relative;
    padding-right: 0.5rem;
}

.modern-navbar .navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 30px;
    height: 3px;
    background: var(--gradient-btn);
    border-radius: 3px;
}

.modern-navbar .nav-link {
    color: var(--primary-dark);
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    transition: all var(--transition-speed);
    position: relative;
    margin: 0 0.2rem;
}

.modern-navbar .nav-link:hover {
    color: var(--primary-color);
}

.modern-navbar .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: all var(--transition-speed);
    transform: translateX(50%);
}

.modern-navbar .nav-link:hover::before {
    width: 70%;
}

.modern-navbar .nav-link:hover {
    color: var(--primary-color);
}

.modern-navbar .dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    border: none;
    padding: 0.75rem 0.5rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease-in-out;
    border-top: 3px solid var(--primary-light);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-navbar .dropdown-item {
    padding: 0.7rem 1.2rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed);
    margin-bottom: 0.2rem;
    font-weight: 500;
    position: relative;
    padding-right: 2rem;
}

.modern-navbar .dropdown-item:hover {
    background-color: rgba(94, 53, 177, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.modern-navbar .dropdown-item::before {
    content: '•';
    position: absolute;
    right: 1rem;
    color: var(--primary-light);
    opacity: 0;
    transition: all var(--transition-speed);
}

.modern-navbar .dropdown-item:hover::before {
    opacity: 1;
}

/* Dashboard Items */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
    padding: 0;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    transition: all var(--transition-speed);
}

.dashboard-card:nth-child(even) .card::before {
    background: linear-gradient(to top, var(--secondary-color), var(--secondary-light));
}

.dashboard-card:hover {
    transform: scale(1.03);
}

/* Page Title */
.page-title {
    text-align: center;
    margin: 2.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: none;
    position: relative;
    display: block;
    padding-bottom: 0.5rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-light);
    border-radius: 4px;
}

/* Table Styling */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.modern-table thead {
    position: relative;
}

.modern-table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
}

.modern-table th {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 1.2rem 1.5rem;
    text-align: right;
    font-weight: 600;
    position: relative;
    transition: all var(--transition-speed);
}

.modern-table th:first-child {
    border-top-right-radius: var(--border-radius);
}

.modern-table th:last-child {
    border-top-left-radius: var(--border-radius);
}

.modern-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr {
    transition: all var(--transition-speed);
}

.modern-table tr:hover {
    background-color: rgba(94, 53, 177, 0.05);
}

.modern-table tr:hover td {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }

    .modern-navbar .nav-link {
        padding: 0.5rem 0.8rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 1rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .main-content {
        padding: 15px 20px;
    }

    .form-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
        border-radius: var(--border-radius);
    }

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

    .btn {
        padding: 0.5rem 1.2rem;
    }

    .modern-table {
        border-radius: var(--border-radius);
    }
}

@media (max-width: 576px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 10px 15px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .form-control {
        padding: 0.75rem 1rem;
    }
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 4px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #388e3c;
}

.alert-success::before {
    background-color: var(--success-color);
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
}

.alert-danger::before {
    background-color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: #f57c00;
}

.alert-warning::before {
    background-color: var(--warning-color);
}

.alert-info {
    background-color: rgba(3, 169, 244, 0.1);
    color: #0288d1;
}

.alert-info::before {
    background-color: var(--info-color);
}

/* Badge Styling */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50px;
    transition: all var(--transition-speed);
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1060;
}

.toast {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    overflow: hidden;
    margin-bottom: 10px;
    width: 350px;
    max-width: 100%;
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
    padding: 1rem;
}

/* Login Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadeIn 1s ease-out;
}

/* Login Page Styles */
/* Login Page Styles */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #e1bee7;
    background: radial-gradient(circle at 50% 0%, #f3e5f5 0%, #ba68c8 100%);
}

#aurora-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

/* Ensure content is above aurora */
.login-header,
.login-form,
.login-footer {
    position: relative;
    z-index: 10;
}

/* Floating Particles - Removed for professional look */
.floating-particle {
    display: none;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.login-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 4px 6px rgba(111, 66, 193, 0.2));
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
}

.login-title::after {
    display: none;
}

.login-subtitle {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0;
    font-weight: 600;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.login-form {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.login-form::before {
    display: none;
}

.login-form h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: block;
    text-align: center;
    padding-bottom: 0;
    text-shadow: none;
}

.login-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.3;
}

/* Floating Label Container */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating .form-control {
    height: 3.5rem;
    padding: 1.5rem 2.75rem 0.5rem 0.75rem;
    border-radius: 14px;
    border: 2px solid #e8e8e8;
    background-color: #ffffff;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-floating .form-control:focus {
    border-color: var(--primary-color);
    background-color: #fffef5;
    box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.12);
    outline: none;
}

/* Success state */
.form-floating .form-control.is-valid {
    border-color: #4caf50;
    background-color: #f1f8f4;
}

.form-floating .form-control.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

/* Error state with shake animation */
.form-floating .form-control.is-invalid {
    border-color: #f44336;
    background-color: #fff5f5;
    animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.form-floating .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.15);
}

@keyframes inputShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Hide the actual placeholder */
.form-floating .form-control::placeholder {
    color: transparent;
    opacity: 0;
}

/* Floating Label Styling */
.form-floating label {
    position: absolute;
    top: 50%;
    right: 2.75rem;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #9e9e9e;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
    padding: 0 0.25rem;
    background-color: transparent;
    z-index: 1;
}

/* Floated state - when focused or has content */
/* Floated state - when focused or has content */
.form-floating .form-control:focus~label,
.form-floating .form-control:not(:placeholder-shown)~label {
    top: 0;
    right: 2.75rem;
    transform: scale(0.85) translateY(0.5rem);
    transform-origin: top right;
    color: var(--primary-color);
    background-color: transparent;
    padding: 0;
    font-weight: 600;
    z-index: 2;
}

/* Icons inside inputs */
.input-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    z-index: 5;
}

.form-control:focus~.input-icon {
    color: var(--primary-color);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(111, 66, 193, 0.08);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.login-form .btn-primary {
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    background: var(--primary-color);
    /* Solid brand purple */
    border: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.25);
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
}

.login-form .btn-primary:hover {
    background: #5a32a3;
    /* Slightly darker shade on hover */
    transform: translateY(-2px);
    /* Slight lift */
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.35);
}

.login-form .btn-primary:active {
    transform: translateY(1px);
    /* Press effect - moves down 1px */
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.2);
    /* Reduced shadow for pressed state */
    transition: all 0.1s ease-in-out;
    /* Faster transition for immediate feedback */
}

/* Loading state */
.login-form .btn-primary:disabled,
.login-form .btn-primary.loading {
    background: #8e6bb8;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.15);
}

.login-footer {
    color: #8e8e8e;
    /* Lighter gray for better readability */
    text-align: center;
    font-size: 0.85rem;
    text-shadow: none;
    position: relative;
    z-index: 10;
    font-weight: 400;
    opacity: 0.65;
    /* 65% opacity for subtle appearance */
}

/* Secure Login Micro-text */
.secure-login-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #28a745;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Shake Animation for Errors */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.is-invalid {
    border-color: var(--danger-color) !important;
    background-image: none !important;
    /* Remove default bootstrap validation icon */
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.25) !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--danger-color);
    text-align: right;
}

/* Input Ripple Effect */
.input-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(50);
        opacity: 0;
    }
}

/* Button Ripple Effect */
.button-ripple {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* Input Group Transition */
.login-form .input-group {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Alert styling for login page */
.login-form .alert {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Icon animations in input groups */
.login-form .input-group-text {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.login-form .form-control:focus+.input-group-text,
.login-form .input-group:has(.form-control:focus) .input-group-text {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}


@media (max-width: 576px) {
    .dashboard-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modern-table {
        font-size: 0.875rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.75rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .login-title {
        font-size: 2.5rem;
    }

    .login-form {
        padding: 1.5rem;
    }
}

/* Search Result Styles */
.table-container {
    padding: 20px;
    margin: 20px auto;
    max-width: 95%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-title {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.table-responsive {
    max-height: 70vh;
    /* Limit table height to 70% of viewport height */
    overflow-y: auto;
    /* Enable vertical scrolling */
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    background-color: var(--background-light);
    color: var(--text-on-secondary);
    font-weight: bold;
    padding: 12px;
    text-align: right;
    border-bottom: 2px solid var(--secondary-light);
    /* Add shadow to make header stand out */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: right;
}

.data-table tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Responsive table */
@media screen and (max-width: 1200px) {
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Add some spacing between cells */
.data-table th,
.data-table td {
    min-width: 120px;
    color: black;
}

/* Style for specific columns */
.data-table td:first-child {
    font-weight: bold;
    color: #007bff;
}

/* Style for expired date */
.data-table td:last-child {
    color: #dc3545;
}

thead {
    position: static;
}

/* Dark Mode Toggle Button - Navbar Version */
.navbar-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(94, 53, 177, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.navbar-theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
}

.navbar-theme-toggle:active {
    transform: scale(0.95);
}

.navbar-theme-toggle i {
    transition: transform 0.3s ease;
}

.navbar-theme-toggle:hover i {
    transform: rotate(20deg);
}

/* ============================================
   SIDEBAR NAVIGATION STYLES
   ============================================ */

/* Main layout wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-right: 22.5%;
    transition: margin-right 0.3s ease;
    min-height: 100vh;
    max-width: 1350px;
    margin-left: auto;
    padding: 20px 40px;
}

/* Sidebar container */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(94, 53, 177, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* Sidebar header */
.sidebar-header {
    padding: 1.5rem;
    background: var(--gradient-btn);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-brand i {
    font-size: 1.8rem;
}

/* Sidebar search */
.sidebar-search {
    position: relative;
    margin-top: 0.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.sidebar-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Sidebar menu */
.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
}

/* Sidebar menu item */
.sidebar-item {
    margin-bottom: 0.25rem;
}

/* Sidebar link */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    gap: 0.75rem;
}

.sidebar-link i {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    background: rgba(94, 53, 177, 0.08);
    color: var(--primary-color);
    padding-right: 2rem;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(94, 53, 177, 0.15), transparent);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

/* Collapsible section */
.sidebar-section {
    margin-bottom: 0.25rem;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    color: var(--primary-dark);
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-section-header:hover {
    background: rgba(94, 53, 177, 0.05);
    color: var(--primary-color);
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.sidebar-section-title i {
    font-size: 1.1rem;
}

.sidebar-section-toggle {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.sidebar-section.expanded .sidebar-section-toggle {
    transform: rotate(180deg);
}

/* Collapsible content */
.sidebar-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-section.expanded .sidebar-section-content {
    max-height: 500px;
}

.sidebar-section-content .sidebar-link {
    padding-left: 3.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.sidebar-section-content .sidebar-link i {
    font-size: 0.95rem;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-footer form {
    margin: 0;
    width: 100%;
}

.sidebar-footer .sidebar-link {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-footer button.sidebar-link {
    width: 100%;
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: white;
    border: none;
    cursor: pointer;
}

.sidebar-footer button.sidebar-link:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Theme toggle in sidebar */
.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    background: rgba(94, 53, 177, 0.1);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
    font-weight: 600;
}

.sidebar-theme-toggle:hover {
    background: rgba(94, 53, 177, 0.2);
    transform: translateY(-2px);
}

.sidebar-theme-toggle i {
    font-size: 1.2rem;
}

/* Mobile-only header */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 998;
    border-bottom: 1px solid rgba(94, 53, 177, 0.1);
}

.mobile-header-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Mobile toggle button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-btn);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.3);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(94, 53, 177, 0.4);
}

.sidebar-toggle i {
    font-size: 1.4rem;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 992px) {
    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-right: 0;
        padding: 15px 20px;
    }

    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar-overlay.active {
        pointer-events: all;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 10px 15px;
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-section-content .sidebar-link {
        padding-left: 3rem;
        font-size: 0.85rem;
    }
}

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

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}