main > .container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #dc3545;
    background: #fdf7f7;
    border-left: 3px solid #dc3545;
    padding: 10px 20px;
    margin: 0 0 15px 0;
    border-radius: 4px;
}


/* Form Validation Error Styling */
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline,
.has-error.radio label,
.has-error.checkbox label,
.has-error.radio-inline label,
.has-error.checkbox-inline label {
    color: #dc3545;
}

.has-error .form-control {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.help-block {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Existing margin utilities remain the same */
.mr-1 { margin-right: 1rem; }
.mr-2 { margin-right: 2rem; }
.mr-3 { margin-right: 3rem; }

.ml-1 { margin-left: 1rem; }
.ml-2 { margin-left: 2rem; }
.ml-3 { margin-left: 3rem; }

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.menu-icon{
    font-size: medium;
    margin: 10px;
}

.mr-1{
    margin-right: 1rem;
}
.mr-2{
    margin-right: 2rem;
}
.mr-3{
    margin-right: 3rem;
}

.ml-1{
    margin-left: 1rem;
}
.ml-2{
    margin-left: 2rem;
}
.ml-3{
    margin-left: 3rem;
}

.category-info {
    line-height: 1.3;
}
.grid-view .table th {
    background-color: #f8f9fa;
}
.grid-view .table td {
    vertical-align: middle;
}
.action-column {
    white-space: nowrap;
}
.topic-info {
    line-height: 1.3;
}
.grid-view .table th {
    background-color: #f8f9fa;
}
.grid-view .table td {
    vertical-align: middle;
}
.action-column {
    white-space: nowrap;
}
.user-info {
    line-height: 1.3;
}
.grid-view .table th {
    background-color: #f8f9fa;
}
.grid-view .table td {
    vertical-align: middle;
}
.action-column {
    white-space: nowrap;
}

/* Dashboard Layout Color Matching - Dashboard Theme */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* purple-blue gradient */
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.app-sidebar {
    background: linear-gradient(180deg, #111827 0%, #020617 100%); /* dark gray tones */
}

.app-sidebar .vertical-nav-menu > li > a {
    color: #94a3b8;
    transition: all 0.3s ease;
}

.app-sidebar .vertical-nav-menu > li > a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* purple-blue gradient */
    color: white;
    transform: translateX(5px);
}

.app-sidebar .vertical-nav-menu > li.mm-active > a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.app-sidebar .app-sidebar__heading {
    color: #667eea; /* accent purple-blue */
    font-weight: 600;
}

.app-main__inner {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: calc(100vh - 70px);
}

.widget-heading {
    color: #334155;
}

.widget-subheading {
    color: #64748b;
}

/* ===== STANDARDIZED INDEX PAGE DESIGN SYSTEM ===== */

/* Color Variables for Index Pages - Dashboard Theme */
:root {
    --index-primary-bg: #FFFFFF;
    --index-text-dark: #111827;
    --index-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --index-primary-color: #667eea;
    --index-secondary-color: #764ba2;
    --index-accent-orange: #f5576c;
    --index-accent-blue: #667eea;
    --index-border-light: #e5e7eb;
    --index-shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.08);
    --index-shadow-medium: 0 4px 16px rgba(15, 23, 42, 0.18);
    --index-hover-bg: rgba(102, 126, 234, 0.06); /* subtle purple-blue hover */
}

/* Index Page Container */
.index-page {
    background: var(--index-primary-bg);
    min-height: 100vh;
    padding: 2rem;
}

/* RTL support for backend layout */
html[dir="rtl"] .fixed-sidebar .app-main .app-main__outer {
    padding-left: 0;
    padding-right: 280px;
}

html[dir="rtl"] .fixed-sidebar:not(.fixed-header) .app-header {
    margin-left: 0;
    margin-right: 280px;
}

html[dir="rtl"] .closed-sidebar.fixed-sidebar .app-main__outer {
    padding-right: 80px;
    padding-left: 0;
}

html[dir="rtl"] .closed-sidebar.fixed-sidebar:not(.fixed-header) .app-header {
    margin-right: 80px;
    margin-left: 0;
}

html[dir="rtl"] .app-main .app-main__inner {
    /* Keep padding symmetric for RTL */
    padding: 1.5rem 2rem 0;
}

/* RTL header user block alignment */
html[dir="rtl"] .app-header .app-header__content .app-header-right {
    margin-left: 0;
    margin-right: auto;
}

/* RTL dropdown positioning so full menu is visible */
html[dir="rtl"] .dropdown-menu.dropdown-menu-right {
    right: auto !important;
    left: 0;
}

/* Page Header Section */
.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--index-border-light);
}

.index-title {
    color: var(--index-text-dark);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.index-subtitle {
    color: var(--index-text-dark);
    opacity: 0.7;
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Action Buttons */
.index-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-index-primary {
    background: var(--index-primary-gradient);
    border: 2px solid var(--index-primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-index-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--index-shadow-medium);
}

.btn-index-secondary {
    background: var(--index-accent-blue);
    border: 2px solid var(--index-accent-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-index-secondary:hover {
    background: #764ba2;
    border-color: #764ba2;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--index-shadow-medium);
}

/* Main Content Card */
.index-content-card {
    background: var(--index-primary-bg);
    border: 1px solid var(--index-border-light);
    border-radius: 12px;
    box-shadow: var(--index-shadow-soft);
    overflow: hidden;
    transition: all 0.3s ease;
}

.index-content-card:hover {
    box-shadow: var(--index-shadow-medium);
    border-color: var(--index-primary-color);
}

.index-card-header {
    background: var(--index-primary-gradient);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.index-card-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.index-card-body {
    padding: 1.5rem;
}

/* Enhanced GridView Styling */
.index-gridview {
    background: transparent;
    border: none;
    box-shadow: none;
}

.index-gridview .table {
    background: var(--index-primary-bg);
    border: 1px solid var(--index-border-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

.index-gridview .table thead th {
    background: #f8f9fa;
    color: #374151;
    font-weight: 600;
    border: none;
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.index-gridview .table tbody td {
    padding: 1rem 0.50rem;
    border-color: var(--index-border-light);
    vertical-align: middle;
    color: var(--index-text-dark);
}

.index-gridview .table tbody tr {
    transition: all 0.2s ease;
}

.index-gridview .table tbody tr:hover {
    background: var(--index-hover-bg);
    transform: scale(1.01);
}

/* Action Column Buttons */
.index-action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-index-view {
    background: var(--index-accent-blue);
    border: 1px solid var(--index-accent-blue);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-index-view:hover {
    background: #764ba2;
    border-color: #764ba2;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--index-shadow-soft);
}

.btn-index-edit {
    background: var(--index-primary-gradient);
    border: 1px solid var(--index-primary-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-index-edit:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--index-shadow-soft);
}

.btn-index-delete {
    background: var(--index-accent-orange);
    border: 1px solid var(--index-accent-orange);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-index-delete:hover {
    background: #f5576c;
    border-color: #f5576c;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--index-shadow-soft);
}

/* Status Badges */
.index-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.index-badge-secondary {
    background: #6c757d;
    color: white;
}

/* User Info Display */
.index-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.index-user-name {
    font-weight: 600;
    color: var(--index-text-dark);
    font-size: 0.95rem;
}

.index-user-email {
    color: var(--index-text-dark);
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Profile Image */
.index-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--index-border-light);
    transition: all 0.3s ease;
}

.index-profile-img:hover {
    border-color: var(--index-primary-color);
    transform: scale(1.1);
}

/* Large Profile Image for View Page */
.index-profile-img-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--index-border-light);
    box-shadow: var(--index-shadow-soft);
    transition: all 0.3s ease;
}

.index-profile-img-large:hover {
    border-color: var(--index-primary-color);
    transform: scale(1.05);
    box-shadow: var(--index-shadow-medium);
}

/* Profile Placeholder */
.index-profile-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--index-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    border: 4px solid var(--index-border-light);
    box-shadow: var(--index-shadow-soft);
    transition: all 0.3s ease;
}

.index-profile-placeholder:hover {
    transform: scale(1.05);
    box-shadow: var(--index-shadow-medium);
}

/* Large User Info for View Page */
.index-user-name-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--index-text-dark);
    margin-bottom: 0.5rem;
}

.index-user-email-large {
    font-size: 1.1rem;
    color: var(--index-text-dark);
    opacity: 0.7;
    margin-bottom: 1rem;
}

/* Links */
.index-link {
    color: var(--index-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.index-link:hover {
    color: var(--index-secondary-color);
    text-decoration: underline;
}

/* Fixed Height Cards for View Page */
.index-content-card.h-100 {
    height: 300px !important;
    display: flex;
    flex-direction: column;
}

.index-content-card.h-100 .index-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Pagination Styling */
.index-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem;
}

.index-pagination .pagination {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--index-shadow-soft);
    display: flex;
    gap: 5px;
}

.index-pagination .page-item {
    list-style: none;
}

.index-pagination .page-link {
    color: #667eea;
    border: 2px solid var(--index-border-light);
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 8px;
    background: white;
    min-width: 45px;
    justify-content: center;
}

.index-pagination .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: var(--index-shadow-medium);
}

.index-pagination .page-item.active .page-link {
    background: var(--index-primary-gradient);
    border-color: var(--index-primary-color);
    color: white;
    font-weight: 700;
    box-shadow: var(--index-shadow-soft);
}

.index-pagination .page-item.disabled .page-link {
    color: var(--muted-text);
    border-color: var(--index-border-light);
    background: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
    height: 100%;
    display: flex !important;
}

.index-pagination .page-item.disabled .page-link:hover {
    background: #f8f9fa;
    color: var(--muted-text);
    border-color: var(--index-border-light);
    transform: none;
    box-shadow: none;
}

.index-pagination .page-item.disabled span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
}

.index-pagination .page-link i {
    font-size: 0.8rem;
}

.index-pagination .page-item:last-child .page-link {
    border-right: 2px solid var(--index-border-light);
}

.index-pagination .page-item:last-child.active .page-link {
    border-right: 2px solid var(--index-primary-color);
}

.index-pagination .page-item:last-child.disabled .page-link {
    border-right: 2px solid var(--index-border-light);
}

.index-pagination .page-item:last-child .page-link:hover {
    border-right: 2px solid #667eea;
}

/* Filter Section */
.index-filters {
    background: #f8f9fa;
    border: 1px solid var(--index-border-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.index-filter-title {
    color: var(--index-text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .index-page {
        padding: 1.5rem;
    }
    
    .index-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .index-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .index-page {
        padding: 1rem;
    }
    
    .index-title {
        font-size: 1.75rem;
    }
    
    .index-card-body {
        padding: 1rem;
    }
    
    .index-gridview .table {
        font-size: 0.875rem;
    }
    
    .index-gridview .table thead th,
    .index-gridview .table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .index-action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-index-view,
    .btn-index-edit,
    .btn-index-delete {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 575px) {
    .index-page {
        padding: 0.75rem;
    }
    
    .index-title {
        font-size: 1.5rem;
    }
    
    .index-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-index-primary,
    .btn-index-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .index-gridview .table {
        font-size: 0.8rem;
    }
    
    .index-gridview .table thead th,
    .index-gridview .table tbody td {
        padding: 0.5rem 0.25rem;
    }
}