/* ==========================================================================
   Kuwait Maritime Association - Custom Brand Theme & Admin Styling
   Palette Inspired by Maritime Deep Navy, Ocean Blue & Brass Gold
   ========================================================================== */

:root {
    --kma-navy-royal: #1f2965;
    --kma-navy-dark: #161c47;
    --kma-navy: #1f2965;
    --kma-navy-light: #2c3a8c;
    --kma-blue: #0072c7;
    --kma-blue-light: #3394db;
    --kma-gold: #c59b27;
    --kma-gold-light: #e5b842;
    --kma-gold-subtle: #fef9c3;
    --kma-surface: #ffffff;
    --kma-bg-subtle: #f4f6fa;
    --kma-border: #e2e8f0;
    --kma-radius-sm: 6px;
    --kma-radius-md: 10px;
    --kma-radius-lg: 14px;
}

body, .page, .card, .table, button, input, select, textarea, .sidebar, .navbar, h1, h2, h3, h4, h5, h6, p, span, a {
    font-family: 'The Year of Handicrafts', 'TheYearofHandicrafts', 'Cairo', 'Roboto', sans-serif !important;
    line-height: 180%;
    letter-spacing: 0%;
}

html[dir="rtl"] body {
    text-align: right;
}

/* ==========================================================================
   Admin Sidebar - Premium Spacing, Padding & Margins
   ========================================================================== */
.sidebar.sidebar-dark {
    background: #1f2965 !important;
    width: 260px !important;
}

.sidebar-account {
    padding: 18px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar-stats-box {
    margin: 10px 14px 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-stats-box .stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.sidebar-stats-box .stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-section-title {
    padding: 12px 18px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-menu {
    padding: 4px 8px !important;
    margin: 0 !important;
    list-style: none;
}

.sidebar-menu-item {
    margin: 3px 0 !important;
}

.sidebar-menu-button {
    padding: 9px 14px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}

.sidebar-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding-left: 16px !important;
}

html[dir="rtl"] .sidebar-menu-button:hover {
    padding-left: 14px !important;
    padding-right: 16px !important;
}

.sidebar-menu-item.active > .sidebar-menu-button,
.sidebar-menu-item.open > .sidebar-menu-button {
    background: linear-gradient(135deg, #0072c7 0%, #005a9e 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 10px rgba(0, 114, 199, 0.3) !important;
}

.sidebar-menu-icon {
    font-size: 17px !important;
    width: 22px !important;
    min-width: 22px !important;
    text-align: center !important;
    margin-right: 10px !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

html[dir="rtl"] .sidebar-menu-icon {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

.sidebar-menu-button:hover .sidebar-menu-icon,
.sidebar-menu-item.active > .sidebar-menu-button .sidebar-menu-icon {
    color: #ffffff !important;
}

.sidebar-menu-text {
    line-height: 1.3 !important;
}

.sidebar-submenu {
    padding: 3px 0 3px 16px !important;
    margin: 3px 0 4px !important;
    list-style: none;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    margin-left: 20px !important;
}

html[dir="rtl"] .sidebar-submenu {
    padding: 3px 16px 3px 0 !important;
    border-left: none;
    border-right: 2px solid rgba(255, 255, 255, 0.12);
    margin-left: 0 !important;
    margin-right: 20px !important;
}

.sidebar-submenu .sidebar-menu-button {
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 6px !important;
}

.sidebar-submenu .sidebar-menu-item.active > .sidebar-menu-button {
    background: rgba(0, 114, 199, 0.35) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.sidebar-footer-wrap {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Admin Header & Navbar - High-End Clean Design
   ========================================================================== */
.admin-navbar {
    min-height: 62px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.04);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .admin-navbar {
    background: #161c47 !important;
    border-bottom-color: #2c3a8c !important;
}

.admin-nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2965 !important;
    margin: 0;
    line-height: 1.2;
}

[data-theme="dark"] .admin-nav-title {
    color: #ffffff !important;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav-item {
    margin: 0 4px !important;
    display: inline-flex;
    align-items: center;
    position: relative;
}

html[dir="rtl"] .admin-nav-item {
    margin: 0 4px !important;
}

.admin-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid #0072c7;
    color: #0072c7 !important;
    background: transparent;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.admin-nav-btn:hover {
    background: #0072c7;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 114, 199, 0.25);
}

.admin-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2965 !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.admin-circle-btn:hover {
    background: #e2e8f0;
    color: #0072c7 !important;
}

[data-theme="dark"] .admin-circle-btn {
    background: #1f2965;
    border-color: #2c3a8c;
    color: #ffffff !important;
}

.admin-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e11d48;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

html[dir="rtl"] .admin-notif-badge {
    right: auto;
    left: -2px;
}

.admin-user-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px 4px 4px;
    border-radius: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

html[dir="rtl"] .admin-user-pill {
    padding: 4px 4px 4px 12px;
}

.admin-user-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

[data-theme="dark"] .admin-user-pill {
    background: #1f2965;
    border-color: #2c3a8c;
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f2965, #0072c7);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 8px;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .admin-user-name {
    color: #ffffff;
}

/* Hero Header for Show / View Pages */
.kma-hero-header {
    background: linear-gradient(135deg, #1f2965 0%, #161c47 100%);
    border-radius: var(--kma-radius-md);
    color: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 41, 101, 0.18);
}

.kma-hero-header::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.kma-hero-avatar {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background-color: #ffffff;
}

.kma-hero-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.kma-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.925rem;
    margin-bottom: 0.75rem;
}

.kma-hero-badge {
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-weight: 600;
    padding: 0.35em 0.75em;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

.kma-detail-card {
    background: #ffffff;
    border: 1px solid var(--kma-border);
    border-radius: var(--kma-radius-md);
    box-shadow: 0 2px 10px rgba(18, 48, 136, 0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.kma-detail-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--kma-border);
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #123088;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kma-detail-header .material-icons {
    color: var(--kma-blue);
    font-size: 1.2rem;
}

.kma-detail-body {
    padding: 1.25rem;
}

.kma-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.kma-meta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kma-meta-label {
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kma-meta-label .material-icons {
    font-size: 1rem;
    color: #94a3b8;
}

.kma-meta-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}

/* Base Adjustments */
td img {
    max-width: 90px;
    height: auto;
}

/* Card & Container Polish */
.card {
    border-radius: var(--kma-radius-md);
    border: 1px solid var(--kma-border);
    box-shadow: 0 4px 12px rgba(12, 43, 76, 0.04), 0 1px 3px rgba(12, 43, 76, 0.02);
    transition: all 0.2s ease;
}

.card-header {
    background-color: var(--kma-bg-subtle);
    border-bottom: 1px solid var(--kma-border);
    font-weight: 600;
    color: var(--kma-navy);
}

/* Table Enhancements */
.table thead th {
    background-color: #f1f5f9;
    color: var(--kma-navy);
    font-weight: 600;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--kma-border);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(2, 132, 199, 0.035) !important;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Buttons Polish with Maritime Theme */
.btn-primary {
    background-color: var(--kma-navy) !important;
    border-color: var(--kma-navy) !important;
    color: #ffffff !important;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(12, 43, 76, 0.2);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--kma-navy-light) !important;
    border-color: var(--kma-navy-light) !important;
    box-shadow: 0 4px 12px rgba(12, 43, 76, 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--kma-navy) !important;
    border-color: var(--kma-navy) !important;
}

.btn-outline-primary:hover {
    background-color: var(--kma-navy) !important;
    color: #ffffff !important;
}

.btn-warning, .btn-gold {
    background-color: var(--kma-gold) !important;
    border-color: var(--kma-gold) !important;
    color: #ffffff !important;
}

.btn-warning:hover, .btn-gold:hover {
    background-color: var(--kma-gold-light) !important;
    border-color: var(--kma-gold-light) !important;
}

/* Maritime Badges */
.badge-soft-primary {
    background-color: rgba(12, 43, 76, 0.1);
    color: var(--kma-navy);
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-soft-info {
    background-color: rgba(2, 132, 199, 0.12);
    color: var(--kma-blue);
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-soft-warning {
    background-color: rgba(197, 155, 39, 0.15);
    color: #996515;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-soft-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #065f46;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-soft-danger {
    background-color: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Page Section Headers in Forms */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--kma-navy);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--kma-blue);
    font-size: 1.15rem;
}

/* Media Picker Styling */
.media-picker-widget .media-picker-preview-wrap {
    border: 2px dashed #cbd5e1;
    border-radius: var(--kma-radius-sm);
    padding: 6px;
    display: inline-block;
    background: #f8fafc;
}

.media-picker-widget .media-picker-preview {
    border-radius: var(--kma-radius-sm);
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Custom form inputs */
.form-control-rounded {
    border-radius: 20px !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--kma-blue);
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.15);
}

/* Action button spacing */
.button-list .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    transition: transform 0.15s ease;
}

.button-list .btn:hover {
    transform: scale(1.05);
}

/* Media Library Modal */
#mediaLibraryModal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.media-lib-item {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.media-lib-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(12, 43, 76, 0.12);
}

/* ==========================================================================
   Filter Toolbar - Premium Maritime Theme
   ========================================================================== */
.filter-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--kma-radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(12, 43, 76, 0.04);
}

.filter-toolbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.filter-toolbar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--kma-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-toolbar-title .material-icons,
.filter-toolbar-title i {
    color: var(--kma-blue);
    font-size: 1.25rem;
    vertical-align: middle;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.35rem;
    display: block;
}

.filter-input-wrap {
    position: relative;
}

.filter-input-wrap .input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 1.1rem;
    z-index: 4;
}

html[dir="ltr"] .filter-input-wrap .input-icon {
    left: 12px;
}

html[dir="ltr"] .filter-input-wrap .form-control {
    padding-left: 2.25rem;
}

html[dir="rtl"] .filter-input-wrap .input-icon {
    right: 12px;
}

html[dir="rtl"] .filter-input-wrap .form-control {
    padding-right: 2.25rem;
}

.filter-control {
    height: 40px;
    border-radius: var(--kma-radius-sm);
    border: 1px solid #cbd5e1;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.filter-control:focus {
    background-color: #ffffff;
    border-color: var(--kma-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 100%;
}

.btn-filter {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0 1.25rem;
    border-radius: var(--kma-radius-sm);
    gap: 0.35rem;
}

/* ==========================================================================
   Dark / Light Theme System
   ========================================================================== */
[data-theme="dark"],
body.dark-mode {
    --kma-surface: #131b2e;
    --kma-bg-subtle: #19233c;
    --kma-border: #233052;
    background-color: #0b1120 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .mdk-header-layout__content,
body.dark-mode .mdk-header-layout__content,
[data-theme="dark"] .page,
body.dark-mode .page {
    background-color: #0b1120 !important;
}

[data-theme="dark"] .navbar-main,
body.dark-mode .navbar-main {
    background-color: #131b2e !important;
    border-bottom: 1px solid #233052 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .navbar-brand,
body.dark-mode .navbar-brand,
[data-theme="dark"] .navbar-brand span,
body.dark-mode .navbar-brand span {
    color: #f8fafc !important;
}

[data-theme="dark"] .card,
body.dark-mode .card {
    background-color: #131b2e !important;
    border-color: #233052 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .card-header,
body.dark-mode .card-header {
    background-color: #19233c !important;
    border-color: #233052 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .text-dark,
body.dark-mode .text-dark {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-muted,
body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .table,
body.dark-mode .table {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .table thead th,
body.dark-mode .table thead th,
[data-theme="dark"] .thead-light th,
body.dark-mode .thead-light th {
    background-color: #19233c !important;
    color: #93c5fd !important;
    border-color: #233052 !important;
}

[data-theme="dark"] .table td,
body.dark-mode .table td,
[data-theme="dark"] .table th,
body.dark-mode .table th {
    border-color: #1e293b !important;
}

[data-theme="dark"] .table-hover tbody tr:hover,
body.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.7) !important;
}

[data-theme="dark"] .form-control,
body.dark-mode .form-control,
[data-theme="dark"] .custom-select,
body.dark-mode .custom-select {
    background-color: #19233c !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .form-control:focus,
body.dark-mode .form-control:focus,
[data-theme="dark"] .custom-select:focus,
body.dark-mode .custom-select:focus {
    background-color: #1e293b !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .list-group-item,
body.dark-mode .list-group-item {
    background-color: #131b2e !important;
    border-color: #233052 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .list-group-item-action:hover,
body.dark-mode .list-group-item-action:hover {
    background-color: #19233c !important;
}

[data-theme="dark"] .dropdown-menu,
body.dark-mode .dropdown-menu {
    background-color: #131b2e !important;
    border-color: #233052 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .dropdown-item,
body.dark-mode .dropdown-item {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .dropdown-item:hover,
body.dark-mode .dropdown-item:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

[data-theme="dark"] .filter-toolbar,
body.dark-mode .filter-toolbar {
    background: #131b2e !important;
    border-color: #233052 !important;
}

[data-theme="dark"] .filter-control,
body.dark-mode .filter-control {
    background-color: #19233c !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .kma-detail-card,
body.dark-mode .kma-detail-card {
    background: #131b2e !important;
    border-color: #233052 !important;
}

[data-theme="dark"] .kma-detail-header,
body.dark-mode .kma-detail-header {
    background: #19233c !important;
    border-color: #233052 !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .kma-meta-row,
body.dark-mode .kma-meta-row {
    border-color: #1e293b !important;
}

[data-theme="dark"] .kma-meta-value,
body.dark-mode .kma-meta-value {
    color: #f1f5f9 !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #123088;
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn,
body.dark-mode .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #facc15;
}

[data-theme="dark"] .theme-toggle-btn:hover,
body.dark-mode .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fde047;
}

/* ==========================================================================
   Pagination Styling
   ========================================================================== */
.pagination {
    display: inline-flex;
    padding-left: 0;
    list-style: none;
    border-radius: var(--kma-radius-sm);
    gap: 4px;
    margin: 0;
    align-items: center;
}

.page-item {
    margin: 0;
}

.page-item .page-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px !important;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.page-item .page-link:hover {
    color: var(--kma-navy);
    background-color: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.page-item.active .page-link {
    z-index: 3;
    color: #ffffff !important;
    background-color: var(--kma-navy) !important;
    border-color: var(--kma-navy) !important;
    box-shadow: 0 2px 8px rgba(18, 48, 136, 0.35);
    font-weight: 700;
}

.page-item.disabled .page-link {
    color: #94a3b8;
    pointer-events: none;
    cursor: not-allowed;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.7;
}

/* Dark Mode Pagination */
[data-theme="dark"] .pagination,
body.dark-mode .pagination {
    background: transparent;
}

[data-theme="dark"] .page-item .page-link,
body.dark-mode .page-item .page-link {
    color: #cbd5e1;
    background-color: #19233c;
    border-color: #334155;
}

[data-theme="dark"] .page-item .page-link:hover,
body.dark-mode .page-item .page-link:hover {
    color: #ffffff;
    background-color: #1e293b;
    border-color: #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .page-item.active .page-link,
body.dark-mode .page-item.active .page-link {
    color: #ffffff !important;
    background-color: #1e44b3 !important;
    border-color: #1e44b3 !important;
    box-shadow: 0 2px 10px rgba(30, 68, 179, 0.5);
}

[data-theme="dark"] .page-item.disabled .page-link,
body.dark-mode .page-item.disabled .page-link {
    color: #64748b;
    background-color: #131b2e;
    border-color: #233052;
}