:root {
    --primary-color: #164f59;
    /* Dark Blue */
    --secondary-color: #f7d900;
    /* Yellow/Gold */
    --accent-color: #03a9f3;
    /* Light Blue/Cyan often used in theme */
    --bg-color: #f1f2f7;
    /* Light Grey Background */
    --panel-bg: #ffffff;
    /* White Panel */
    --text-color: #686868;
    /* Standard Grey Text */
    --heading-color: #2b2b2b;
    /* Darker Grey for Headings */
    --border-color: rgba(120, 130, 140, 0.13);

    --font-primary: 'Tajawal', sans-serif;
    --border-radius-base: 20px;
    /* Rounder Look */
    --border-radius-sm: 10px;
}

/* Global Styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary) !important;
    background: var(--bg-color);
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    font-family: var(--font-primary);
}

a {
    color: white;
}

a:hover,
a:focus {
    color: var(--accent-color);
}

/* Panel Standardization */
.panel {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.panel-info>.panel-heading {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    border-top-left-radius: var(--border-radius-sm);
    border-top-right-radius: var(--border-radius-sm);
}

.white-box {
    background: var(--panel-bg);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-base);
}

.btn-info {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
}

.btn-info:hover,
.btn-info:focus,
.btn-info.active {
    background: #00224a;
    /* Darken primary */
    border: 1px solid #00224a;
}

.btn-success {
    background: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    color: #fff;
    /* or dark depending on contrast */
}

/* Custom Button Sizes */
.btn-lg {
    padding: 12px 30px !important;
    font-size: 18px !important;
}

.btn-md {
    padding: 10px 20px !important;
    font-size: 15px !important;
}

.btn-sm {
    padding: 8px 15px !important;
    font-size: 13px !important;
}

.btn-xs {
    padding: 4px 10px !important;
    font-size: 11px !important;
}

/* Form Elements */
.form-control,
select,
input,
textarea {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-base) !important;
    color: #333 !important;
    /* Dark Grey Text */
}

.form-control:focus {
    border-color: var(--primary-color) !important;
}

/* Dropdowns */
.dropdown-menu,
.dropdown {
    border-radius: var(--border-radius-sm);
    color: #333 !important;
}

.dropdown-menu>li>a {
    color: #333 !important;
}

/* Table Header */
table thead tr th,
table thead,
th {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-family: var(--font-primary);
}

/* Sidebar Override (if needed) */
.sidebar-nav {
    font-family: var(--font-primary);
}

/* Login/Header tweaks from previous tasks */
.navbar-top-links .dropdown-toggle {
    color: #333 !important;
}

/* --- Global UI Polish --- */

/* Panels and White Boxes */
.white-box {
    background: #fff !important;
    padding: 25px !important;
    /* Restore padding for white box content */
    border-radius: var(--border-radius-sm) !important;
    margin-bottom: 20px !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.02) !important;
}

.panel,
.panel-danger,
.panel-info,
.panel-success,
.panel-primary,
.panel-default {
    background: #fff !important;
    padding: 0px !important;
    /* Minimum possible padding for panels with headers */
    border-radius: var(--border-radius-sm) !important;
    margin-bottom: 20px !important;
    border: none !important;
    box-shadow: none !important;
}

/* Unify Panel Headings */
.panel-heading,
.panel-danger>.panel-heading,
.panel-info>.panel-heading,
.panel-success>.panel-heading {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    padding: 20px !important;
    font-weight: 600;
    font-size: 1.2rem;
    border-bottom: none !important;
    border-top-left-radius: var(--border-radius-sm) !important;
    border-top-right-radius: var(--border-radius-sm) !important;
}

/* Ensure content inside has no background override */
.panel-body,
.white-box .row {
    background: transparent !important;
}

/* Typography & Spacing */
body {
    line-height: 1.6;
    color: #686868;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 20px;
    font-weight: 500;
}

.row {
    margin-bottom: 15px;
    /* Spacing between rows */
}

/* Forms Polish */
.form-group {
    margin-bottom: 25px !important;
    /* More breathing room */
}

label {
    margin-bottom: 10px !important;
    font-weight: 600 !important;
    color: var(--heading-color) !important;
}

.form-control {
    padding: 10px 15px !important;
    /* Larger comfortable inputs */
    height: auto !important;
}

/* Choice/Select2 specific tweaks */
.select2-container .select2-selection--single {
    height: 42px !important;
    /* Match input height */
    border-color: var(--border-color) !important;
    border-radius: var(--border-radius-base) !important;
}

/* Table Polish override */
.table {
    margin-bottom: 0px;
}

.table>thead>tr>th,
.table>tbody>tr>th,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>tbody>tr>td,
.table>tfoot>tr>td {
    padding: 15px !important;
    /* More padding in cells */
    vertical-align: middle !important;
    border-top: 1px solid #f4f4f4;
}

table thead tr th {
    border-bottom: none !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Pagination / Datatable override */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    border-radius: 50%;
}

/* Modal Polish */
.modal-content {
    border-radius: var(--border-radius-sm);
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--primary-color);
    color: #fff;
    border-top-left-radius: var(--border-radius-sm);
    border-top-right-radius: var(--border-radius-sm);
}

.close {
    color: #fff;
    opacity: 0.8;
}

.close:hover {
    color: #fff;
    opacity: 1;
}

/* --- Modern Preloader --- */
.preloader {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-color) !important;
}

.cssload-speeding-wheel {
    /* Reset old styles */
    border: none !important;
    animation: none !important;
    width: 80px !important;
    height: 80px !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Primary Outer Ring */
.cssload-speeding-wheel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-bottom-color: #ffffff;
    animation: modern-spin 1.5s linear infinite;
    z-index: 10;
}

/* Secondary Inner Ring */
.cssload-speeding-wheel::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-left-color: rgba(255, 255, 255, 0.5);
    border-right-color: rgba(255, 255, 255, 0.5);
    animation: modern-spin 1s linear infinite reverse;
    z-index: 20;
}

@keyframes modern-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Login Page Styles (Split Layout) --- */
#wrapper.login-register {
    background: #fff !important;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    padding: 0 !important;
    display: block !important;
}

.login-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Swap for RTL */
#wrapper.rtl .login-layout {
    flex-direction: row-reverse;
}

#wrapper.rtl .language-switcher-login {
    right: auto;
    left: 30px;
}

#wrapper.rtl .login-box {
    text-align: right;
}

#wrapper.rtl .login-box .form-control {
    text-align: right !important;
}

/* Left Panel: Dark Brand Color with Logo */
.login-info {
    width: 45%;
    background: linear-gradient(135deg, rgba(22, 79, 89, 0.9) 0%, rgba(13, 50, 57, 0.9) 100%), url('../../uploads/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    position: relative;
    z-index: 10;
}

.login-info .logo-img {
    width: 60%;
    max-width: 300px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.2));
}

.login-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    padding: 0 20px;
}

/* Right Panel: Light Gray with Form */
.login-form-section {
    width: 55%;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 20;
}

/* Language Switcher Position */
.language-switcher-login {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 30;
}

.language-switcher-login .dropdown-toggle {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: #fff;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.language-switcher-login .dropdown-toggle:hover {
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.language-switcher-login .dropdown-menu {
    right: 0;
    left: auto;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    margin-top: 5px;
}

.login-box {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    text-align: left;
}

.login-box h3 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.login-box .form-control {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: var(--border-radius-base) !important;
    padding: 20px 15px !important;
    font-size: 16px !important;
    text-align: left !important;
    margin-bottom: 20px !important;
    height: 55px !important;
    color: #495057 !important;
    transition: all 0.3s ease;
}

.login-box .form-control:focus {
    background: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(22, 79, 89, 0.1) !important;
}

.login-box .btn-block {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--border-radius-base);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-box hr {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .login-layout {
        flex-direction: column;
    }

    .login-info {
        width: 100%;
        height: 35%;
        padding: 30px;
    }

    .login-info .logo-img {
        width: 150px;
    }

    .login-form-section {
        width: 100%;
        height: 65%;
        padding: 20px;
    }
}

/* Background Bubbles Animation */
.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    bottom: -160px;
    -webkit-animation: square 25s infinite;
    animation: square 25s infinite;
    transition-timing-function: linear;
}

.bg-bubbles li:nth-child(1) {
    left: 10%;
}

.bg-bubbles li:nth-child(2) {
    left: 20%;
    width: 80px;
    height: 80px;
    animation-delay: 2s;
    animation-duration: 17s;
}

.bg-bubbles li:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
}

.bg-bubbles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-duration: 22s;
    background-color: rgba(255, 255, 255, 0.25);
}

.bg-bubbles li:nth-child(5) {
    left: 70%;
}

.bg-bubbles li:nth-child(6) {
    left: 80%;
    width: 120px;
    height: 120px;
    animation-delay: 3s;
    background-color: rgba(255, 255, 255, 0.2);
}

.bg-bubbles li:nth-child(7) {
    left: 32%;
    width: 160px;
    height: 160px;
    animation-delay: 7s;
}

.bg-bubbles li:nth-child(8) {
    left: 55%;
    width: 20px;
    height: 20px;
    animation-delay: 15s;
    animation-duration: 40s;
}

.bg-bubbles li:nth-child(9) {
    left: 25%;
    width: 10px;
    height: 10px;
    animation-delay: 2s;
    animation-duration: 40s;
    background-color: rgba(255, 255, 255, 0.3);
}

.bg-bubbles li:nth-child(10) {
    left: 90%;
    width: 160px;
    height: 160px;
    animation-delay: 11s;
}

@keyframes square {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-700px) rotate(600deg);
    }
}

/* Cardx Header Standardization */
.cardx-overlay {
    padding: 0 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.cardx-title {
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Ensure buttons in cardx-overlay are vertically centered */
.cardx-overlay .btn {
    margin: 0 !important;
}

/* Standardized Header Button */
.cardx-btn-admin {
    background: #0f3d4a !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.cardx-btn-admin:hover {
    background: #164f59 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modern Card Layout (Unified) */
.modern-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 25px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    position: relative;
    /* overflow: hidden; -- Removed to allow free scrolling inside the card if needed */
    height: 100%;
}

.modern-card-center {
    text-align: center;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #0f3d4a;
}

.modern-card-icon {
    width: 60px;
    height: 60px;
    background: rgba(15, 61, 74, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #0f3d4a;
    font-size: 24px;
    transition: all 0.3s ease;
}

.modern-card:hover .modern-card-icon {
    background: #0f3d4a;
    color: #fff;
}

.modern-card-profile-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    padding: 5px;
    border: 2px solid rgba(15, 61, 74, 0.1);
    transition: all 0.3s ease;
}

.modern-card:hover .modern-card-profile-container {
    border-color: #0f3d4a;
    transform: scale(1.05);
}

.modern-card-profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.modern-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.modern-card-info-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    color: #777;
    font-size: 14px;
    text-align: left;
}

.modern-card-info-item i {
    color: #0f3d4a;
    width: 20px;
    text-align: center;
}

.modern-card-actions {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.btn-modern-action {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.btn-modern-edit {
    background: rgba(15, 61, 74, 0.05);
    color: #0f3d4a;
}

.btn-modern-edit:hover {
    background: #0f3d4a;
    color: #fff;
}

.btn-modern-delete {
    background: #fff5f5;
    color: #ff5b5b;
}

.btn-modern-delete:hover {
    background: #ff5b5b;
    color: #fff;
}

/* Modern Table Layout */
.modern-table thead {
    background: #0f3d4a;
}

.modern-table thead th {
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    padding: 15px !important;
}

.modern-table tbody td {
    padding: 15px !important;
    vertical-align: middle !important;
    color: #555 !important;
    border-top: 1px solid #f1f1f1 !important;
    font-size: 13px !important;
}

/* Modern Modal Styling */
.modern-modal-content {
    border-radius: 20px !important;
    overflow: hidden !important;
}

.modern-modal-header {
    background: #0f3d4a !important;
    color: #fff !important;
    border: none !important;
    padding: 20px !important;
}

.modern-modal-header .close {
    color: #fff !important;
    opacity: 0.8 !important;
}

.modern-modal-body {
    padding: 30px !important;
}

.modern-form-control {
    border-radius: 10px !important;
    border: 1px solid #e1e1e1 !important;
    height: 45px !important;
    padding: 10px 15px !important;
}

.modern-modal-footer {
    padding: 20px !important;
    border-top: 1px solid #f1f1f1 !important;
}

/* Special Select for Academic Year */
.modern-select-sm {
    border-radius: 10px !important;
    border: 1px solid #e1e1e1 !important;
    height: 38px !important;
    padding: 0 10px !important;
    width: 100% !important;
}

/* Announcement Cards (News) */
.announcement-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.announcement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #0f3d4a;
}

.announcement-img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
}

.announcement-content {
    padding: 20px;
    flex-grow: 1;
}

.announcement-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.announcement-content p {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

.announcement-footer {
    padding: 15px 20px;
    border-top: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-badge {
    color: #0f3d4a;
    font-size: 13px;
    font-weight: 600;
}

.date-badge i {
    margin-right: 5px;
}

/* Activity Logs & Miscellaneous */
.badge-modern {
    background: rgba(15, 61, 74, 0.1);
    color: #0f3d4a;
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 11px;
    display: inline-block;
}

.ip-text {
    font-family: 'Courier New', Courier, monospace;
    color: #888;
    font-weight: 600;
}

/* School Reports Stats */
.report-stat-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #0f3d4a;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.report-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.report-stat-card h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f3d4a;
    margin: 5px 0;
}

.report-stat-card p {
    color: #777;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.report-stat-card i {
    font-size: 40px;
    color: rgba(15, 61, 74, 0.05);
    position: absolute;
    right: 20px;
    top: 20px;
}

.badge-school {
    background: rgba(15, 61, 74, 0.1);
    color: #0f3d4a;
}

/* --- Menu Management Drag-and-Drop Styles --- */
.menu-management-container {
    padding: 20px 0;
}

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

.menu-item-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    cursor: grab;
    user-select: none;
    will-change: transform, box-shadow;
}

.menu-item-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    border-color: #fb3a3a;
    transform: translateY(-2px);
}

.menu-item-card:active {
    cursor: grabbing;
}

/* Premium lift effect for the chosen item */
.menu-item-card.sortable-chosen {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
    border-color: #fb3a3a !important;
    background: #fff !important;
    z-index: 1000;
    cursor: grabbing;
}

/* The actual item being moved (follows cursor) */
.sortable-drag {
    opacity: 0.95 !important;
    transform: scale(1.03) rotate(1deg) !important;
    cursor: grabbing !important;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1) !important;
}

.drag-handle {
    padding: 10px;
    margin-right: 15px;
    color: #d1d1d1;
    transition: color 0.2s;
    font-size: 1.2em;
}

.menu-item-card:hover .drag-handle {
    color: #fb3a3a;
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    background: #fdf2f2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fb3a3a;
    font-size: 1.2em;
}

.menu-item-info {
    flex-grow: 1;
}

.menu-item-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 2px;
    display: block;
}

.menu-item-route {
    font-size: 0.85em;
    color: #95a5a6;
    font-family: monospace;
}

.menu-item-parent-badge {
    font-size: 0.75em;
    background: #f8f9fa;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.menu-item-actions {
    display: flex;
    gap: 8px;
}

.btn-action-round {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s;
}

/* --- Unified Action Buttons (Edit, Delete, Profile, etc.) --- */
.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
    padding: 0;
    font-size: 1.1em;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-action-edit:hover,
.btn-action-profile:hover,
.btn-action-download:hover {
    background: #0f3d4a !important;
    color: #fff !important;
}

.btn-action-delete:hover {
    background: #fb3a3a !important;
    color: #fff !important;
}

/* Modern Card Actions Layout */
.modern-card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* RTL Adjustments for Actions */
[dir="rtl"] .modern-card-actions {
    right: auto;
    left: 15px;
}

/* ========================================================================
   RTL & LTR Standardization Fixes
   (Navbar, Sidebar, Page Wrapper, and Top Links)
   ======================================================================== */


/* 1. Header & Logo Alignment (Unified) */
#wrapper .top-left-part {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 220px !important;
}

#wrapper .top-left-part .logo img {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 2. Top Navbar Links Positioning */
/* LTR (Default) - Fixes "too low" issue */
/* 2. Top Navbar Links Positioning */
/* LTR (Default) */
#wrapper.ltr .navbar-top-links {
    float: right !important;
    margin-right: 0 !important;
    margin-left: auto !important;
    margin-top: -10px !important;
    /* Visual alignment fix for LTR */
}

/* RTL Override - Resets margin/float */
#wrapper.rtl .navbar-top-links {
    float: left !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    /* Standard position for RTL */
}

.navbar-header {
    padding-right: 30px !important;
    padding-left: 15px !important;
}

/* RTL Override - Sidebar on Right */
#wrapper.rtl #page-wrapper {
    margin-left: 0 !important;
    margin-right: 300px !important;
}

/* 4. Mobile Responsiveness */
@media (max-width: 768px) {
    #page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-bottom: 60px;
    }

    #wrapper.rtl #page-wrapper {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}