/* ========================================
   MODERN UI STYLES - Minimal & Trendy
   ======================================== */

/* ============ CSS Variables ============ */
:root {
    /* Modern Color Palette */
    --primary-gradient: linear-gradient(135deg, #2f87cc 0%, #322a66 100%);
    --primary-color: #2f87cc;
    --primary-dark: #1f6ba8;
    --secondary-color: #322a66;
    --accent-color: #4fa3d8;

    /* Neutral Colors */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --bg-dark: #2d3748;

    /* Status Colors */
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    --info: #4299e1;

    /* Border & Shadow */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.4s ease;
}

/* ============ Modern Login Page ============ */
.login-wrapper {
    min-height: 100vh;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #322a66 0%, #2f87cc 100%);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.login-wrapper .login-column {
    max-width: 480px;
    border-right: none;
    z-index: 1;
    position: relative;
}

.login-wrapper .login-column .input-fields {
    background: var(--bg-primary);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    top: 0;
    width: 100%;
    max-width: 440px;
}

.login-wrapper .login-column .input-fields .login-header {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-wrapper .login-column .input-fields .gray {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.login-wrapper .login-column .input-fields .input-header {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.login-wrapper .login-column .input-fields input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition-fast);
    background: var(--bg-secondary);
}

.login-wrapper .login-column .input-fields input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(47, 135, 204, 0.1);
    outline: none;
}

.login-wrapper .login-column .input-fields input::placeholder {
    color: var(--text-light);
}

.login-wrapper .password-recovery {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.login-wrapper .password-recovery:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-wrapper .fancy-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.login-wrapper .fancy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-wrapper .fancy-btn:hover::before {
    left: 100%;
}

.login-wrapper .fancy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-wrapper .fancy-btn:active {
    transform: translateY(0);
}

.login-wrapper .image-column {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.login-wrapper .image-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.pexels.com/photos/7102/notes-macbook-study-conference.jpg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

/* ============ Modern Forms ============ */
.form-control,
.form-select,
select.form-control,
textarea.form-control {
    min-height: 48px;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(47, 135, 204, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.text-muted,
small.text-muted {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============ Modern Cards ============ */
.card {
    background: var(--bg-primary);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: var(--primary-gradient);
    border-bottom: none;
    padding: 20px 24px;
    font-weight: 600;
}

.card-header.bg-primary,
.card-header.bg-info,
.card-header.bg-success,
.card-header.bg-warning {
    background: var(--primary-gradient);
}

.card-body {
    padding: 24px;
}

/* ============ Modern Buttons ============ */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.95;
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--error);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-info {
    background: var(--info);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-info:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn .material-icons {
    font-size: 18px;
}

/* ============ Modern Tables ============ */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    padding: 16px;
    border: none;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table-bordered {
    border: 1px solid var(--border-color);
}

/* ============ Modern Badges ============ */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-primary {
    background: rgba(47, 135, 204, 0.15);
    color: var(--primary-color);
}

.badge-info {
    background: rgba(66, 153, 225, 0.15);
    color: var(--info);
}

.badge-success {
    background: rgba(72, 187, 120, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(237, 137, 54, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(245, 101, 101, 0.15);
    color: var(--error);
}

.badge-secondary {
    background: rgba(113, 128, 150, 0.15);
    color: var(--text-secondary);
}

.badge-light {
    background: rgba(237, 242, 247, 1);
    color: var(--text-primary);
}

/* ============ Modern Alerts ============ */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    border: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error);
    border-left: 4px solid var(--error);
}

/* ============ Modern Sidebar ============ */
.sidebar-wrapper {
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--border-color);
}

.sidebar-wrapper .user-profile {
    padding: 24px;
    background: var(--primary-gradient);
    color: white;
    margin-bottom: 16px;
}

.sidebar-wrapper .user-profile img {
    width: 64px;
    height: 64px;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.sidebar-wrapper .user-profile span {
    font-weight: 600;
    font-size: 16px;
}

.sidebar-wrapper a,
.sidebar-wrapper button {
    padding: 14px 20px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.sidebar-wrapper a::before,
.sidebar-wrapper button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-gradient);
    transition: var(--transition-fast);
    border-radius: 0 4px 4px 0;
}

.sidebar-wrapper a:hover::before,
.sidebar-wrapper button:hover::before,
.sidebar-wrapper a.active::before {
    height: 80%;
}

.sidebar-wrapper a:hover,
.sidebar-wrapper button:hover,
.sidebar-wrapper a.active,
.sidebar-wrapper button[aria-expanded="true"] {
    background: rgba(47, 135, 204, 0.08);
    color: var(--primary-color);
}

.sidebar-wrapper .material-icons.left {
    color: var(--primary-color);
    font-size: 20px;
}

.sidebar-wrapper .collapse a {
    padding-left: 52px;
    font-size: 14px;
}

/* ============ Modern Navbar ============ */
.navbar-wrapper {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md);
    padding: 12px 24px;
}

.navbar-wrapper .navbar-inner img {
    filter: brightness(0) invert(1);
    transition: var(--transition-fast);
}

.navbar-wrapper .navbar-inner img:hover {
    transform: scale(1.05);
}

.navbar-wrapper span {
    color: white;
    font-weight: 600;
}

.navbar-user-dropdown {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 8px 16px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.navbar-user-dropdown:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-user-dropdown img {
    width: 36px;
    height: 36px;
    border: 2px solid white;
}

.navbar-user-dropdown .name {
    color: white;
    font-weight: 600;
}

/* ============ Modern Inputs ============ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
select,
textarea {
    min-height: 48px;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition-fast);
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(47, 135, 204, 0.1);
    outline: none;
}

/* Enhanced File Upload Button */
input[type="file"] {
    cursor: pointer;
    padding: 10px;
}

input[type="file"]::file-selector-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-right: 12px;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 135, 204, 0.3);
}

/* Firefox compatibility */
input[type="file"]::-webkit-file-upload-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-right: 12px;
}

input[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 135, 204, 0.3);
}

/* ============ Modal Improvements ============ */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    padding: 20px 24px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header .close {
    color: white;
    opacity: 0.9;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* ============ List Groups ============ */
.list-group-item {
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    transition: var(--transition-fast);
    background: var(--bg-primary);
}

.list-group-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.list-group-item .material-icons {
    color: var(--primary-color);
}

/* ============ Title Wrapper ============ */
.title-wrapper {
    margin-bottom: 32px;
}

.title-wrapper .title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.title-wrapper .title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ============ Exam Cards Enhancement ============ */
.border-success {
    border: 2px solid var(--success) !important;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.2);
}

.border-warning {
    border: 2px solid var(--warning) !important;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.2);
}

.border-secondary {
    border: 2px solid var(--text-secondary) !important;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.2);
}

.bg-success {
    background: var(--success) !important;
}

.bg-warning {
    background: var(--warning) !important;
}

.bg-secondary {
    background: var(--text-secondary) !important;
}

/* ============ Countdown Timer ============ */
.countdown-timer {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(72, 187, 120, 0.05) 100%);
    border: 2px solid var(--success);
    border-radius: var(--border-radius);
    padding: 20px;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--success);
    text-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.4s ease;
}

/* ============ Responsive Improvements ============ */
@media (max-width: 768px) {
    .login-wrapper .login-column .input-fields {
        padding: 32px 24px;
        border-radius: var(--border-radius);
    }

    .login-wrapper .login-column .input-fields .login-header {
        font-size: 26px;
    }

    .card-body {
        padding: 20px;
    }

    .btn {
        padding: 12px 20px;
        width: 100%;
    }

    .title-wrapper .title {
        font-size: 24px;
    }
}

/* ============ Utility Classes ============ */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded {
    border-radius: var(--border-radius-sm) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.bg-light {
    background: var(--bg-secondary) !important;
}

/* ============ ENHANCED SIDEBAR STYLING ============ */
.sidebar-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 20px rgba(47, 135, 204, 0.08);
    border-right: 1px solid rgba(47, 135, 204, 0.1);
    position: relative;
}

.sidebar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: var(--primary-gradient);
    opacity: 0.03;
    z-index: 0;
}

.sidebar-wrapper > * {
    position: relative;
    z-index: 1;
}

.sidebar-wrapper .user-profile {
    padding: 32px 24px;
    background: var(--primary-gradient);
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.sidebar-wrapper .user-profile::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.sidebar-wrapper .user-profile img {
    width: 72px;
    height: 72px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
    transition: var(--transition-normal);
}

.sidebar-wrapper .user-profile img:hover {
    transform: scale(1.05);
    border-color: white;
}

.sidebar-wrapper .user-profile span {
    font-weight: 700;
    font-size: 17px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-wrapper a,
.sidebar-wrapper button {
    padding: 16px 24px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
    border-radius: 0;
    margin: 2px 0;
}

.sidebar-wrapper a::before,
.sidebar-wrapper button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-gradient);
    transition: var(--transition-fast);
    border-radius: 0 4px 4px 0;
}

.sidebar-wrapper a:hover,
.sidebar-wrapper button:hover,
.sidebar-wrapper a.active,
.sidebar-wrapper button[aria-expanded="true"] {
    background: linear-gradient(90deg, rgba(47, 135, 204, 0.08) 0%, transparent 100%);
    color: var(--primary-color);
}

.sidebar-wrapper a:hover::before,
.sidebar-wrapper button:hover::before,
.sidebar-wrapper a.active::before {
    height: 70%;
}

.sidebar-wrapper .material-icons.left {
    color: var(--primary-color);
    font-size: 22px;
    opacity: 0.9;
}

.sidebar-wrapper a:hover .material-icons.left,
.sidebar-wrapper button:hover .material-icons.left,
.sidebar-wrapper a.active .material-icons.left {
    opacity: 1;
    transform: scale(1.1);
}

.sidebar-wrapper .collapse a {
    padding-left: 60px;
    font-size: 14px;
    font-weight: 400;
}

.sidebar-wrapper .collapse a .material-icons.left {
    font-size: 20px;
}

.sidebar-wrapper .material-icons:not(.left) {
    margin-left: auto;
    font-size: 20px;
    transition: var(--transition-fast);
}

.sidebar-wrapper button[aria-expanded="true"] .material-icons:not(.left) {
    transform: rotate(90deg);
}

/* ============ ENHANCED CARDS STYLING ============ */
.card {
    background: var(--bg-primary);
    border: 1px solid rgba(47, 135, 204, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(47, 135, 204, 0.08);
    transition: var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-fast);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(47, 135, 204, 0.15);
    transform: translateY(-4px);
    border-color: rgba(47, 135, 204, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: var(--primary-gradient);
    border-bottom: none;
    padding: 20px 28px;
    font-weight: 700;
    font-size: 16px;
    color: white;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.card-body {
    padding: 28px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px 28px;
}

/* Special Card Variants */
.card.border-success {
    border-color: var(--success);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.15);
}

.card.border-warning {
    border-color: var(--warning);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(237, 137, 54, 0.15);
}

.card.border-info {
    border-color: var(--info);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(66, 153, 225, 0.15);
}

/* ============ ENHANCED TABLES STYLING ============ */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(47, 135, 204, 0.08);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    padding: 18px 20px;
    border: none;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.8px;
    position: relative;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.table tbody tr {
    transition: var(--transition-fast);
    background: white;
}

.table tbody tr:nth-child(even) {
    background: rgba(47, 135, 204, 0.02);
}

.table tbody tr:hover {
    background: rgba(47, 135, 204, 0.08);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(47, 135, 204, 0.1);
}

.table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(47, 135, 204, 0.08);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-bordered {
    border: 1px solid rgba(47, 135, 204, 0.1);
}

/* Table Action Buttons */
.table tbody td button,
.table tbody td a.btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.table tbody td button:hover,
.table tbody td a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 135, 204, 0.2);
}

/* ============ ENHANCED TOP SECTIONS ============ */
.universal-wrapper .top-section,
.universal-wrapper .bottom-section {
    background: var(--bg-primary);
    border: 1px solid rgba(47, 135, 204, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(47, 135, 204, 0.08);
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
}

.universal-wrapper .top-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.universal-wrapper .bottom-section {
    height: auto;
}

.universal-wrapper .top-section .left span {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.universal-wrapper .top-section .left span i {
    color: var(--primary-color);
    font-size: 28px;
}

/* ============ ENHANCED ADD BUTTON ============ */
.add-button:not(.dropdown-item) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border-radius: 24px;
    padding: 0 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition-normal);
    box-shadow: 0 2px 8px rgba(47, 135, 204, 0.15);
}

.add-button:not(.dropdown-item):hover {
    color: white;
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 135, 204, 0.3);
}

.add-button:not(.dropdown-item) i {
    font-size: 18px;
    transition: var(--transition-fast);
}

.add-button:not(.dropdown-item):hover i {
    transform: rotate(90deg);
}

/* ============ ENHANCED FILE UPLOAD AREA ============ */
.custom-file-upload {
    border: 2px dashed rgba(47, 135, 204, 0.3);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    background: rgba(47, 135, 204, 0.02);
    transition: var(--transition-normal);
    cursor: pointer;
}

.custom-file-upload:hover {
    border-color: var(--primary-color);
    background: rgba(47, 135, 204, 0.05);
}

.custom-file-upload i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: block;
}

.custom-file-upload p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 15px;
}

/* ============ FILTER SECTION ============ */
.filter-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.filter-section .form-row {
    gap: 16px;
}

.filter-section label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
}

/* ============ PAGINATION IMPROVEMENTS ============ */
.pagination {
    gap: 8px;
}

.page-item .page-link {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.page-item .page-link:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(47, 135, 204, 0.3);
}

/* ============ ENHANCED CONTENT WRAPPER ============ */
.content-wrapper {
    background: var(--bg-secondary);
    min-height: 100vh;
    padding: 24px;
}

/* ============ MODERN DASHBOARD CARDS ============ */
.card-body.dedicated {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: 0 4px 16px rgba(47, 135, 204, 0.08);
    border: 1px solid rgba(47, 135, 204, 0.1);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card-body.dedicated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.card-body.dedicated::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    opacity: 0.04;
    border-radius: 50%;
    transition: var(--transition-slow);
}

.card-body.dedicated:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(47, 135, 204, 0.18);
    border-color: rgba(47, 135, 204, 0.3);
}

.card-body.dedicated:hover::after {
    transform: scale(1.2);
    opacity: 0.08;
}

.card-body.dedicated h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.card-body.dedicated h5 i.material-icons {
    color: var(--primary-color);
    font-size: 20px;
}

.card-body.dedicated > div:first-child > div i.material-icons {
    color: var(--primary-color);
    font-size: 48px;
    opacity: 0.15;
}

.card-body.dedicated h3 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 16px 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body.dedicated p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* Dashboard Grid Layout */
.mobo-dashboard {
    gap: 24px;
}

.mobo-dashboard .card-body.dedicated {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ============ RESPONSIVE ENHANCEMENTS ============ */
@media (max-width: 768px) {
    .sidebar-wrapper .user-profile {
        padding: 24px 16px;
    }
    
    .sidebar-wrapper .user-profile img {
        width: 56px;
        height: 56px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 12px 16px;
    }
}
