/* ==========================================================================
   GBVIMS Global Stylesheet
   ========================================================================== */

/* ==========================================================================
   0. CSS Variables - Font Sizes
   ========================================================================== */
/* 
   Note: Poppins font should be imported in the HTML head section:
   <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
*/
:root {
    --font-family-primary: 'Poppins', sans-serif;
    --font-size-title: 16px;
    --font-size-subtitle: 14px;
    --font-size-normal: 12px;
}

/* ==========================================================================
   1. CSS Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Force Poppins 12px on ALL elements globally (excluding SVG) */
html, body, *:not(svg):not(svg *) {
    font-family: var(--font-family-primary) !important;
    font-size: var(--font-size-normal) !important;
}

/* Ensure nav icons have consistent sizing */
.nav-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
}

body {
    background-color: #ffffff;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}





/* Global Checkbox Styling - Orange accent color */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e15a11;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 3px;
}

input[type="checkbox"]:checked {
    background-color: #e15a11;
    border-color: #e15a11;
}

/* Global Radio Button Styling - Orange accent color */
input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #e15a11;
    cursor: pointer;
}

/* Permissions grid (Add Role / Edit Role) - text inside box, mobile-friendly */
.permission-item {
    min-height: 44px;
    align-items: flex-start;
}

.permission-item-label {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .permission-item {
        min-height: 52px;
        padding: 12px 16px;
        align-items: flex-start;
    }

    .permission-item-label {
        flex: 1;
        min-width: 0;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
}

/* ==========================================================================
   2. Layout - Main Content Area (wrapper keeps footer visible at viewport bottom)
   ========================================================================== */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 66px);
    margin-left: 240px;
    margin-top: 66px;
    width: calc(100% - 240px);
    box-sizing: border-box;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

body.sidebar-collapsed .main-content-wrapper {
    margin-left: 0;
    width: 100%;
}

.main-content {
    flex: 1;
    min-height: 0;
    background-color: #f8f9fa;
    padding: 22px;
    padding-bottom: 52px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Hide scrollbar but keep scroll (like dashboard) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-content::-webkit-scrollbar {
    display: none;
}

body.sidebar-collapsed .main-content {
    width: 100%;
}

@media (max-width: 768px) {
    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .main-content {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
}

/* ==========================================================================
   Page Footer (fixed at viewport bottom on every page; warm off-white)
   ========================================================================== */
.main-content-wrapper .page-footer {
    position: fixed;
    bottom: 0;
    left: 240px;
    right: 0;
    width: auto;
    z-index: 1000;
    margin: 0;
    flex-shrink: 0;
}

body.sidebar-collapsed .main-content-wrapper .page-footer {
    left: 0;
}

/* Public/login pages (no wrapper) */
body.public-page .page-footer,
body.login-page .page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    z-index: 1000;
}

/* Fixed height to match sidebar version block so top borders align horizontally */
.page-footer__copyright {
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
    background-color: #FFF7F2;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 1px solid #FFE2D1;
}

.page-footer__copyright-text {
    margin: 0;
    font-size: 13px;
    color: #555555;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    display: inline-block;
}

.page-footer__link {
    color: #555555;
    text-decoration: underline;
}

.page-footer__link:hover {
    color: #333333;
}

.page-footer__foundation-with-logo {
    white-space: nowrap;
}

.page-footer__csf-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 8px;
    display: inline-block;
}

@media (max-width: 768px) {
    .main-content-wrapper .page-footer {
        left: 0;
    }

    .page-footer__copyright {
        height: 52px;
        min-height: 52px;
        padding: 0 14px;
    }

    .page-footer__copyright-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .page-footer__copyright {
        height: 52px;
        min-height: 52px;
        padding: 0 12px;
    }

    .page-footer__copyright-text {
        font-size: 11px;
    }
}

/* ==========================================================================
   3. Page Header
   ========================================================================== */
.page-header {
    background: #e15a11;
    padding: 20px 32px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(225, 90, 17, 0.15);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    right: 120px;
    bottom: -100px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

@media (max-width: 768px) {
    .page-header {
        padding: 14px 16px;
        margin-bottom: 14px;
    }

    .page-header::before {
        right: -100px;
        top: -100px;
        width: 200px;
        height: 200px;
    }

    .page-header::after {
        right: 50px;
        bottom: -80px;
        width: 160px;
        height: 160px;
    }
}

/* ==========================================================================
   4. Welcome Section
   ========================================================================== */
.welcome-section {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .welcome-section {
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .welcome-icon {
        width: 36px;
        height: 36px;
    }

    .welcome-text {
        width: 100%;
    }

    .welcome-title {
        font-size: 22px !important;
        font-weight: 500 !important;
        line-height: 1.4;
    }

    .welcome-subtitle {
        font-size: 14px !important;
        line-height: 1.5;
    }
}

.welcome-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-icon svg {
    width: 20px;
    height: 20px;
    color: white;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .welcome-icon {
        width: 36px;
        height: 36px;
    }

    .welcome-icon svg {
        width: 18px;
        height: 18px;
    }
}

.welcome-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-title {
    font-family: var(--font-family-primary);
    font-weight: 500 !important;
    font-size: 22px !important;
    color: white;
    line-height: 1.3;
    margin-bottom: 2px;
}

.welcome-subtitle {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}


/* ==========================================================================
   5. Tabs
   ========================================================================== */
.tabs-wrapper {
    position: relative;
    width: 100%;
}

.tabs-container {
    background: #ffebe2;
    padding: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    width: 100%;
    margin-bottom: 0;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    gap: 0;
    border-bottom: none;
}


.tab-button {
    flex: 1;
    min-width: 0;
    padding: 14px 24px;
    border-radius: 0;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    position: relative;
    outline: none;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.tab-button:last-child {
    border-right: none;
}

.tab-button.active {
    background: transparent;
    color: #e15a11;
    border-bottom-color: #e15a11;
}

.tab-button:not(.active):hover {
    color: #e15a11;
    background: rgba(225, 90, 17, 0.05);
}

.tab-button:focus-visible {
    outline: 2px solid #e15a11;
    outline-offset: -2px;
    z-index: 1;
}

@media (max-width: 768px) {
    .tab-button {
        font-size: 13px;
        padding: 12px 16px;
        min-width: 0;
    }

    .tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.tab-content {
    display: none;
    outline: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   6. Services Section
   ========================================================================== */
.services-section {
    background: #ffffff;
    padding: 22px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-top: none;
    position: relative;
}

@media (max-width: 768px) {
    .services-section {
        padding: 20px 16px;
    }
}

.services-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .services-title {
        font-size: 13px;
        margin-bottom: 16px;
    }
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 100%;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fafafa;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #2d3748;
    line-height: 1.5;
}

.service-item::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #e15a11;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .service-item {
        padding: 10px 16px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .service-item {
        padding: 8px 12px;
        font-size: 10px;
    }

    .content-display {
        font-size: 13px;
    }

    .content-html {
        font-size: 13px;
    }

    .content-html h2 {
        font-size: 16px;
    }

    .content-html h3 {
        font-size: 14px;
    }

    .content-html p {
        font-size: 13px;
    }
}

.service-label {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #000000;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .service-label {
        font-size: 13px;
    }
}

.service-description {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000000;
}

@media (max-width: 768px) {
    .service-description {
        font-size: 13px;
    }
}

/* ==========================================================================
   7. Documents Section
   ========================================================================== */
.documents-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .documents-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.documents-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1a202c;
}

.documents-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 640px) {
    .documents-filters {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .documents-header {
        gap: 12px;
    }

    .documents-title {
        font-size: 13px;
    }

    .documents-filters {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .documents-filters .filter-select,
    .documents-filters .search-wrapper,
    .documents-filters .btn-add {
        width: 100%;
    }

    .search-wrapper {
        width: 100%;
    }

    .search-input {
        width: 100%;
        padding-left: 36px;
        font-size: 13px;
    }


    .filter-select {
        height: 38px;
        font-size: 13px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .page-header {
        padding: 12px 14px;
        margin-bottom: 12px;
    }

    .welcome-icon {
        width: 32px;
        height: 32px;
    }

.welcome-icon img {
    width: 18px;
    height: 18px;
}

.welcome-icon img.icon-white,
.welcome-icon .icon-white {
    filter: brightness(0) invert(1) !important;
}

    .welcome-title {
        font-size: 22px !important;
        font-weight: 600 !important;
    }

    .welcome-subtitle {
        font-size: 14px !important;
    }

    .tab-button {
        font-size: 12px;
        padding: 16px 12px;
        min-width: 100px;
    }

    .services-section {
        padding: 16px 12px;
    }

    .documents-title {
        font-size: 12px;
    }

    .reports-table th,
    .reports-table td {
        padding: 8px 10px;
        font-size: 10px;
    }

    .th-title {
        width: 40% !important;
    }

    .th-topic {
        width: 22% !important;
        padding-left: 8px !important;
    }

    .th-year {
        width: 12% !important;
    }

    .th-actions {
        width: 26% !important;
    }

    .td-title {
        padding-left: 8px !important;
    }

    .td-topic {
        padding-left: 8px !important;
    }

    .td-action {
        padding-right: 8px !important;
    }

    .topic-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .table-actions {
        gap: 8px;
    }

    .action-icon {
        min-width: 28px;
        min-height: 28px;
    }

    .action-img {
        width: 14px;
        height: 14px;
    }

    .table-footer {
        padding: 10px 12px;
    }

    .records-per-page {
        font-size: 10px;
    }

    .records-select {
        font-size: 10px;
        height: 22px;
    }

    .pagination-button {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }
}


/* ==========================================================================
   8. Filter & Search Controls
   ========================================================================== */

/* Global Select/Dropdown Styling - Consistent across all pages */
select,
.filter-select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 32px 0 12px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-normal);
    color: #374151;
    background-color: white;
    cursor: pointer;
    min-width: 100px;
    height: 30px;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: all 0.15s ease;
}

select:hover,
.filter-select:hover,
.form-select:hover {
    border-color: #9ca3af;
    background-color: #fafafa;
}

select:focus,
.filter-select:focus,
.form-select:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.1);
}

/* Select option styling */
select option,
.filter-select option,
.form-select option {
    padding: 8px 12px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-normal);
    color: #374151;
    background-color: white;
}

select option:checked,
.filter-select option:checked,
.form-select option:checked {
    background-color: #e15a11;
    color: white;
}

select option:hover,
.filter-select option:hover,
.form-select option:hover {
    background-color: #f3f4f6;
}

.search-wrapper {
    position: relative;
}

.search-wrapper .search-icon,
.search-wrapper img.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #9ca3af;
    pointer-events: none;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
}

.search-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Make search icon images grey */
.search-icon img,
img.search-icon {
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
}

.search-input {
    width: 100%;
    padding: 0 10px 0 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px !important;
    font-size: 12px;
    height: 30px;
    box-sizing: border-box;
    color: #4b5563;
}

@media (min-width: 640px) {
    .search-input {
        width: 200px;
    }
}

.search-input:focus {
    outline: none;
    border-color: #e15a11;
}


/* ==========================================================================
   9. Tables - General
   ========================================================================== */
.documents-table-wrapper {
    overflow-x: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.reports-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow: hidden;
    width: 100%;
}

/* Wrapper for table: on mobile, horizontal scroll appears below table, above pagination */
.reports-table-scroll-wrapper {
    overflow-x: visible;
    overflow-y: hidden;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Inner scroll: vertical scroll inside the table area (scroll inside the table) */
.reports-table-inner-scroll {
    overflow-y: auto;
    overflow-x: visible;
    width: 100%;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 90, 17, 0.2) transparent;
}

.reports-table-inner-scroll::-webkit-scrollbar {
    width: 8px;
}

.reports-table-inner-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.reports-table-inner-scroll::-webkit-scrollbar-thumb {
    background: rgba(225, 90, 17, 0.2);
    border-radius: 4px;
}

/* Generic table scroll wrappers (same behavior as reports for all table pages, mobile responsiveness) */
.table-scroll-wrapper {
    overflow-x: visible;
    overflow-y: hidden;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.table-inner-scroll {
    overflow-y: auto;
    overflow-x: visible;
    width: 100%;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 90, 17, 0.2) transparent;
}

.table-inner-scroll::-webkit-scrollbar {
    width: 8px;
}

.table-inner-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.table-inner-scroll::-webkit-scrollbar-thumb {
    background: rgba(225, 90, 17, 0.2);
    border-radius: 4px;
}

/* Containers with scroll wrapper: flex layout so inner vertical scroll works */
.cases-table-container,
.users-table-container,
.audit-logs-table-container,
.roles-table-container,
.permissions-table-container,
.data-table-container {
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

/* When table-container wraps scroll-wrapper, it needs to flex and shrink */
.data-table-container .table-container,
.roles-table-container .table-container,
.permissions-table-container .table-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.table-header-wrapper {
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.table-header-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    height: 0;
    width: 0;
}

.table-header-wrapper .reports-table {
    margin: 0;
    border-bottom: none;
}

.table-body-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.table-body-wrapper .reports-table {
    margin: 0;
    border-top: none;
}

.table-body-wrapper .reports-table thead {
    display: none;
}

/* Ensure column widths match between header and body */
.table-header-wrapper .reports-table,
.table-body-wrapper .reports-table {
    table-layout: auto;
    width: 100%;
    min-width: 600px;
}

/* Ensure both tables have the same column structure */
.table-header-wrapper .reports-table th,
.table-body-wrapper .reports-table td {
    box-sizing: border-box;
}

/* Synchronize horizontal scrolling */
.table-header-wrapper,
.table-body-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 90, 17, 0.2) transparent;
}

.table-header-wrapper::-webkit-scrollbar,
.table-body-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-header-wrapper::-webkit-scrollbar-track,
.table-body-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-header-wrapper::-webkit-scrollbar-thumb,
.table-body-wrapper::-webkit-scrollbar-thumb {
    background: rgba(225, 90, 17, 0.2);
    border-radius: 4px;
}

.reports-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    table-layout: auto;
}

.reports-table thead {
    background: #f9fafb;
}

.reports-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
    height: auto;
    line-height: 1.4;
}

.reports-table th.th-year {
    text-align: center;
}

.reports-table th.th-actions {
    text-align: center;
    padding: 10px 20px;
}

.reports-table th:first-child,
.reports-table td:first-child {
    padding-left: 16px;
}

.reports-table th:last-child,
.reports-table td:last-child {
    text-align: center;
    padding-right: 20px;
    padding-left: 100px;
    min-width: 100px; /* Actions */
    width: auto;
}

.reports-table td {
    padding: 10px 16px;
    font-size: 12px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    height: auto;
    line-height: 1.4;
}


.reports-table td.td-year {
    text-align: center;
}

.reports-table td.td-action {
    text-align: right;
}

.reports-table .table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reports-table tbody tr {
    margin: 0;
    padding: 0;
    height: auto;
}

.reports-table tbody tr td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.reports-table tbody tr:hover {
    background: #f9fafb;
}

/* Column width constraints for reports table - using min-width for flexible sizing */
.reports-table th:nth-child(1),
.reports-table td:nth-child(1) {
    min-width: 120px; /* Status */
}

.reports-table th:nth-child(2),
.reports-table td:nth-child(2) {
    min-width: 100px; /* Case Number */
}

.reports-table th:nth-child(3),
.reports-table td:nth-child(3) {
    min-width: 100px; /* Survivor ID */
}

.reports-table th:nth-child(4),
.reports-table td:nth-child(4) {
    min-width: 120px; /* Type of GBV */
    max-width: 200px;
}

.reports-table th:nth-child(5),
.reports-table td:nth-child(5) {
    min-width: 100px; /* Structure (hidden by default) */
}

.reports-table th:nth-child(6),
.reports-table td:nth-child(6) {
    min-width: 100px; /* Country (hidden by default) */
}

.reports-table th:nth-child(7),
.reports-table td:nth-child(7) {
    min-width: 100px; /* DOB (hidden by default) */
}

.reports-table th:nth-child(8),
.reports-table td:nth-child(8) {
    min-width: 100px; /* Region (hidden by default) */
}

.reports-table th:nth-child(9),
.reports-table td:nth-child(9) {
    min-width: 100px; /* Gender (hidden by default) */
}

.reports-table th:nth-child(10),
.reports-table td:nth-child(10) {
    min-width: 100px; /* Created On (hidden by default) */
}


.documents-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
}

.documents-table thead {
    background-color: #f3f4f6;
}

.documents-table th {
    padding: 18px 16px;
    text-align: left;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 12px;
}

.documents-table th.th-actions {
    text-align: center !important;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #e5e7eb;
}

.documents-table th:first-child,
.documents-table td:first-child {
    padding-left: 24px;
}

.documents-table th:last-child,
.documents-table td:last-child {
    padding-right: 24px;
}

.documents-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

.documents-table tbody tr:hover {
    background-color: #fafafa;
}

.documents-table tbody tr:last-child {
    border-bottom: 1px solid #e5e7eb;
}

.documents-table td {
    padding: 14px 16px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

/* Table responsive adjustments */
@media (max-width: 768px) {
    .reports-table-container {
        max-height: 500px;
    }

    .cases-table-container,
    .users-table-container,
    .audit-logs-table-container,
    .roles-table-container,
    .permissions-table-container,
    .data-table-container {
        max-height: 500px;
    }

    /* Scroll below table, above pagination on reports page */
    .reports-table-scroll-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(225, 90, 17, 0.2) transparent;
    }

    .reports-table-scroll-wrapper::-webkit-scrollbar {
        height: 8px;
    }

    .reports-table-scroll-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .reports-table-scroll-wrapper::-webkit-scrollbar-thumb {
        background: rgba(225, 90, 17, 0.2);
        border-radius: 4px;
    }

    /* Scroll below table, above pagination on all table pages (mobile) */
    .table-scroll-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(225, 90, 17, 0.2) transparent;
    }

    .table-scroll-wrapper::-webkit-scrollbar {
        height: 8px;
    }

    .table-scroll-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .table-scroll-wrapper::-webkit-scrollbar-thumb {
        background: rgba(225, 90, 17, 0.2);
        border-radius: 4px;
    }

    /* Email logs: horizontal scroll on inner wrapper, not container */
    body.email-logs-page .data-table-container {
        overflow: hidden;
    }

    .table-header-wrapper,
    .table-body-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .reports-table,
    .documents-table {
        min-width: 600px;
    }

    .reports-table th,
    .documents-table th {
        padding: 6px 12px;
        font-size: 11px;
    }

    .reports-table td,
    .documents-table td {
        padding: 6px 12px;
        font-size: 11px;
    }

    .doc-action-btn {
        width: 32px;
        height: 34px;
    }

    .doc-action-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Table column adjustments for mobile */
    .th-title {
        width: 35% !important;
        min-width: 120px;
    }

    .th-topic {
        width: 25% !important;
        min-width: 80px;
        padding-left: 12px !important;
    }

    .th-year {
        width: 15% !important;
        min-width: 60px;
    }

    .th-actions {
        width: 25% !important;
        min-width: 100px;
    }

    .td-title {
        width: 35% !important;
        padding-left: 12px !important;
    }

    .td-topic {
        width: 25% !important;
        padding-left: 12px !important;
    }

    .td-year {
        width: 15% !important;
    }

    .td-action {
        width: 25% !important;
        padding-right: 12px !important;
    }
}

/* ==========================================================================
10. Table Actions & Icons
   ========================================================================== */
.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-actions {
        gap: 6px;
        justify-content: center;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .action-icon {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .action-img {
        width: 16px;
        height: 16px;
    }

    .action-divider {
        width: 1px;
        height: 16px;
        flex-shrink: 0;
    }
}

.action-icon {
    width: 13px;
    height: 13px;
    cursor: pointer;
    color: #e15a11;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 13px;
}

.action-icon img {
    filter: invert(37%) sepia(73%) saturate(1679%) hue-rotate(356deg) brightness(94%) contrast(92%);
}

.action-icon:hover {
    opacity: 0.7;
}

.action-icon-clickable {
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-divider {
    width: 1px;
    height: 19px;
    background: #ddd;
    flex-shrink: 0;
    min-width: 1px;
}

.ellipsis-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transform: rotate(90deg);
}

.ellipsis-icon:hover {
    opacity: 0.8;
}

.doc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.doc-action-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.doc-action-btn svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.15s;
}

.doc-action-btn:hover svg {
    color: #374151;
}

/* ==========================================================================
   11. Status Indicators
   ========================================================================== */
.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.status-cell span {
    white-space: nowrap;
}

.status-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
}

.status-dot.open {
    background: #ef4444;
}

.status-dot.processing {
    background: #e15a11;
}

.status-dot.justice {
    background: #eab308;
}

.status-dot.closed {
    background: #22c55e;
}

/* ==========================================================================
   12. Topic Badge
   ========================================================================== */
.topic-badge {
    display: inline-block;
    padding: 3px 10px;
    background-color: #fef3e7;
    border: 1px solid #f5c791;
    color: #c77d15;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   13. Table Footer & Pagination
   ========================================================================== */
.table-footer {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    flex-shrink: 0;
    border-top: 1px solid #e5e5e5;
}

@media (max-width: 768px) {
    .table-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 12px 16px;
    }

    .records-per-page {
        justify-content: space-between;
        width: 100%;
    }

    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .pagination-button {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

.records-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666666;
}

.records-select {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 24px 0 10px;
    font-size: 11px;
    outline: none;
    height: 24px;
    text-align: right;
    line-height: 24px;
    vertical-align: middle;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    cursor: pointer;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .pagination {
        justify-content: center;
    }
}

.pagination-button {
    padding: 0 6px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover:not(:disabled) {
    background: #f9fafb;
}

.pagination-button.active {
    background: #e15a11;
    color: white;
    border-color: #e15a11;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   14. Action Buttons
   ========================================================================== */
.action-buttons {
    display: flex;
   
    gap: 12px;
    margin-top: 1px;
}

@media (min-width: 640px) {
    .action-buttons {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Unified Cancel Button - Single class for all cancel buttons */
.btn-class,
.btn-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 30px !important;
    padding: 0 24px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    color: #374151 !important;
    background-color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.btn-class:hover,
.btn-cancel:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
}

.btn-class:active,
.btn-cancel:active {
    transform: scale(0.98) !important;
}

.save-dropdown-wrapper {
    position: relative;
}

/* Unified Save Button - Single class for all save buttons */
.btn-save {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 30px !important;
    padding: 0 24px !important;
    background-color: #e15a11 !important;
    color: white !important;
    border-radius: 6px !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.btn-save:hover {
    background-color: #c94e0e !important;
}

.btn-save:active {
    transform: scale(0.98) !important;
}

.btn-save:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.btn-save svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.btn-icon {
    width: 14px;
    height: 14px;
}

.save-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    margin-top: 4px;
    width: 100%;
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

@media (min-width: 640px) {
    .save-dropdown-menu {
        width: 200px;
    }
}

.save-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #000000;
    background-color: white;
    border: none;
    border-top: 1px solid #eaeaea;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Save dropdown menu items - ensure left alignment */
#saveDropdown button,
#saveDropdown button[type="submit"],
#saveDropdown button[type="submit"][name="action"] {
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    align-items: center !important;
}

#saveDropdown button span,
#saveDropdown button[type="submit"] span {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.dropdown-item:first-child {
    border-top: none;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

/* ==========================================================================
   15. Edit Button
   ========================================================================== */
.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    background-color: #3b82f6;
    color: white;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-edit:hover {
    background-color: #2563eb;
}

.btn-edit.editing {
    background-color: #ef4444;
}

.btn-edit.editing:hover {
    background-color: #dc2626;
}

/* ==========================================================================
   16. Content Display & Editor
   ========================================================================== */
.content-display {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.content-html {
    line-height: 1.5;
}

.content-html h2 {
    display: none;
}

.content-html h4 {
    display: none;
}

.content-html p {
    margin-bottom: 16px;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.6;
}

.content-html p img {
    vertical-align: middle;
    margin-right: 8px;
}

.content-html p a {
    color: #e15a11;
    text-decoration: none;
    font-weight: 500;
}

.content-html p a:hover {
    text-decoration: underline;
}

.content-html ul.services {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-html ul.services li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fafafa;
    /* border-left: 3px solid #e15a11; */
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
}

.content-html ul.services li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #e15a11;
    border-radius: 50%;
    flex-shrink: 0;
}

.content-html ul,
.content-html ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.content-html li {
    margin-bottom: 2px;
}

.content-editor {
    width: 100%;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 300px;
}

.content-editor:focus {
    outline: none;
    border-color: #e15a11;
}

/* ==========================================================================
   17. Alerts
   ========================================================================== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Fixed position alert (toast) */
.alert-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
}

/* ==========================================================================
   18. Delete Modal
   ========================================================================== */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-modal-overlay.visible {
    opacity: 1;
}

.delete-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.delete-modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.delete-modal-container.visible {
    transform: scale(1);
}

.delete-modal-header {
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.delete-modal-header h3 {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.delete-modal-body {
    padding: 16px 24px;
}

.delete-modal-body p {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.delete-modal-body strong {
    color: #111827;
}

.delete-modal-footer {
    padding: 12px 24px 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-modal-cancel {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background-color: #f3f4f6;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.btn-modal-cancel:hover {
    background-color: #e5e7eb;
}

.btn-modal-cancel:focus {
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.btn-modal-delete {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    background-color: #dc2626;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.btn-modal-delete:hover {
    background-color: #b91c1c;
}

.btn-modal-delete:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Mobile Responsive for Delete Modal */
@media (max-width: 640px) {
    .delete-modal-container {
        width: 95%;
        margin: 16px;
    }

    .delete-modal-header {
        padding: 20px 20px 12px 20px;
    }

    .delete-modal-header h3 {
        font-size: 18px;
    }

    .delete-modal-body {
        padding: 16px 20px;
    }

    .delete-modal-body p {
        font-size: 14px;
    }

    .delete-modal-footer {
        padding: 12px 20px 20px 20px;
        flex-direction: column-reverse;
    }

    .delete-modal-footer button {
        width: 100%;
    }
}

/* ==========================================================================
   19. Unauthenticated Landing Page
   ========================================================================== */

/* ==========================================================================
   20. Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-weight-bold {
    font-weight: 600;
}

.color-primary {
    color: #e15a11;
}

.color-gray {
    color: #6b7280;
}

.color-dark {
    color: #111827;
}

/* Table cell utility classes - 3 columns even, actions at right */
.td-title {
    min-width: 200px;
    width: 40%;
    font-weight: normal !important;
    color: #111827;
    text-align: left;
}

.td-topic {
    min-width: 150px;
    width: 25%;
    text-align: left;
    padding-left: 24px;
}

.td-year {
    min-width: 80px;
    width: 15%;
    color: #6b7280;
    text-align: center !important;
}

.td-action {
    min-width: 150px;
    width: 20%;
    text-align: right !important;
}


.td-empty {
    text-align: left;
    padding: 40px;
    color: #9ca3af;
}

/* Table header widths - 3 columns even, actions at right */
.th-title {
    min-width: 200px;
    width: 40%;
    text-align: left;
}

.th-topic {
    min-width: 150px;
    width: 25%;
    text-align: left;
    padding-left: 24px;
}

.th-year {
    min-width: 80px;
    width: 15%;
    text-align: center !important;
}

.th-actions {
    min-width: 150px;
    width: 20%;
    text-align: center !important;
}
/* Image filter for icons */
.icon-white {
    filter: brightness(0) invert(1) !important;
}

.welcome-icon img.icon-white,
.welcome-icon .icon-white,
.welcome-icon .nav-icon.icon-white {
    filter: brightness(0) invert(1) !important;
}

.icon-orange {
    filter: invert(37%) sepia(73%) saturate(1679%) hue-rotate(356deg) brightness(94%) contrast(92%);
}

/* Action icon size */
.action-img {
    width: 13px;
    height: 13px;
}

/* Pagination icon size */
.pagination-img {
    width: 10px;
    height: 10px;
}

.pagination-img-prev {
    transform: rotate(180deg);
}

/* ==========================================================================
   22. Dashboard Page Styles
   ========================================================================== */

/* Dashboard Container */
.dashboard-container {
    padding: 0;
}

/* Summary Cards Section */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.summary-card {
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

.summary-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* Blue Card - Cases Recorded */
.summary-card.blue {
    background: linear-gradient(145deg, #f0f9ff 0%, #fefeff 100%);
    border-left: 5px solid #3b82f6;
    border-top-color: rgba(59, 130, 246, 0.12);
    border-right-color: rgba(59, 130, 246, 0.12);
    border-bottom-color: rgba(59, 130, 246, 0.12);
}

.summary-card.blue:hover {
    border-left-color: #3b82f6;
    border-top-color: rgba(59, 130, 246, 0.15);
    border-right-color: rgba(59, 130, 246, 0.15);
    border-bottom-color: rgba(59, 130, 246, 0.15);
}

/* Red Card - Open Cases */
.summary-card.red {
    background: linear-gradient(145deg, #fef2f2 0%, #fefeff 100%);
    border-left: 5px solid #ef4444;
    border-top-color: rgba(239, 68, 68, 0.12);
    border-right-color: rgba(239, 68, 68, 0.12);
    border-bottom-color: rgba(239, 68, 68, 0.12);
}

.summary-card.red:hover {
    border-left-color: #ef4444;
    border-top-color: rgba(239, 68, 68, 0.15);
    border-right-color: rgba(239, 68, 68, 0.15);
    border-bottom-color: rgba(239, 68, 68, 0.15);
}

/* Green Card - Closed Cases */
.summary-card.green {
    background: linear-gradient(145deg, #f0fdf4 0%, #fefeff 100%);
    border-left: 5px solid #10b981;
    border-top-color: rgba(16, 185, 129, 0.12);
    border-right-color: rgba(16, 185, 129, 0.12);
    border-bottom-color: rgba(16, 185, 129, 0.12);
}

.summary-card.green:hover {
    border-left-color: #10b981;
    border-top-color: rgba(16, 185, 129, 0.15);
    border-right-color: rgba(16, 185, 129, 0.15);
    border-bottom-color: rgba(16, 185, 129, 0.15);
}

.summary-card-content {
    flex: 1;
}

.summary-card-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.summary-card-value {
    font-family: 'Segoe UI', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.summary-card.blue .summary-card-value {
    color: #3b82f6;
}

.summary-card.red .summary-card-value {
    color: #ef4444;
}

.summary-card.green .summary-card-value {
    color: #10b981;
}

.summary-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.summary-card.blue .summary-card-icon {
    background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%);
}

.summary-card.red .summary-card-icon {
    background: linear-gradient(145deg, #fecaca 0%, #fef2f2 100%);
}

.summary-card.green .summary-card-icon {
    background: linear-gradient(145deg, #a7f3d0 0%, #d1fae5 100%);
}

.summary-card:hover .summary-card-icon {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.summary-card.blue .summary-card-icon svg {
    color: #2563eb;
}

.summary-card.red .summary-card-icon svg {
    color: #dc2626;
}

.summary-card.green .summary-card-icon svg {
    color: #059669;
}

.summary-card-icon svg {
    width: 28px;
    height: 28px;
}

/* Section Wrapper */
.section-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    letter-spacing: 0.01em;
}

/* Orange theme variant for specific sections */
.section-header.orange {
    background: linear-gradient(135deg, #fff4ed 0%, #ffe8d9 100%);
    border-bottom: 2px solid #fb923c;
    color: #c2410c;
}

/* Orange border variant for case forms */
.section-header.orange-border {
    border-bottom: 2px solid #ea580c;
}

/* Grid column span for section headers in grid layouts */
.tab-content.grid-layout .section-header {
    grid-column: 1 / -1;
}

/* Section header with order for grid layouts */
.section-header.order-50 {
    order: 50;
}

.section-header.order-70 {
    order: 70;
}

.section-header-icon {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Chart Containers */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px;
    background: #ffffff;
}

.chart-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chart-header {
    background-color: #fbfcfe;
    height: 47px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.chart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0;
}

.chart-body {
    padding: 24px;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container.small {
    height: 250px;
}

/* Dashboard Responsive Design */
@media (max-width: 1024px) {
    .summary-cards,
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        gap: 16px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .summary-card {
        padding: 18px 16px;
    }
    
    .summary-card-value {
        font-size: 1.75rem;
    }
    
    .summary-card-title {
        font-size: 0.875rem;
        font-weight: 600;
    }
    
    .summary-card-icon {
        width: 48px;
        height: 48px;
        margin-left: 12px;
    }
    
    .summary-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .summary-card {
        padding: 16px 14px;
    }
    
    .summary-card-value {
        font-size: 1.625rem;
    }
    
    .summary-card-title {
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    .summary-card-icon {
        width: 44px;
        height: 44px;
        margin-left: 10px;
    }
    
    .summary-card-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================================================
   23. Reports Page - Filters Section
   ========================================================================== */

.directory-icon-box {
    width: 33px;
    height: 33px;
    background-color: #e15a11;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filters Section */
.filters-section {
    margin-bottom: 24px;
}

.filters-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.toolbar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
    }
}

/* Filter Buttons Container */
.filter-buttons-group {
    display: flex;
    align-items: center;
}

/* Toolbar Action Buttons - Consistent Style */
.main-filter-button,
.btn-action {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    font-weight: 400;
}

.main-filter-button:hover,
.btn-action:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.main-filter-button.has-active-filters {
    border-color: #e15a11;
    background: #fff5f0;
    color: #e15a11;
}

.main-filter-button svg,
.btn-action svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.main-filter-button.has-active-filters svg {
    color: #e15a11;
}

/* Filter Count Badge */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e15a11;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1;
}

.main-filter-button:not(.has-active-filters) .filter-count-badge {
    display: none;
}

/* Icon and Arrow Consistency */
.export-icon,
.export-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-icon {
    width: 16px;
    height: 16px;
}

.export-arrow {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform 0.2s;
}

.export-dropdown.active .export-arrow {
    transform: rotate(180deg);
}

/* Filter Panel and Dropdown Containers */
.filter-panel-container,
#columnsFilter,
.export-dropdown {
    position: relative;
    display: inline-block;
}

.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    width: 680px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
}

.filter-panel.active {
    display: block;
}

.filter-panel::-webkit-scrollbar {
    width: 6px;
}

.filter-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.filter-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.filter-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.filter-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.filters-applied-count {
    font-size: 14px;
    color: #666;
}

.filters-applied-count .count {
    color: #e15a11;
    font-weight: 600;
}

.filter-panel-actions {
    display: flex;
    gap: 12px;
}

.btn-clear-all {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 16px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-all:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn-apply-filters {
    background: #e15a11;
    border: none;
    border-radius: 6px;
    height: 30px;
    padding: 0 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apply-filters:hover {
    background: #c14d0e;
}

/* Individual Filter Dropdowns inside Panel */
.filter-dropdown {
    position: relative;
}

.filter-button {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    width: 100%;
    justify-content: space-between;
}

.filter-button:hover {
    border-color: #e15a11;
}

.filter-button.active-filter {
    border-color: #e15a11;
    background: #fff5ee;
}

.filter-button.active-filter .filter-text {
    color: #e15a11;
    font-weight: 500;
}

.filter-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-left: auto;
}

.filter-button .filter-text {
    flex: 1;
    text-align: left;
}

.filter-dropdown-menu {
    position: fixed;
    background: white;
    border: 1px solid rgba(85, 85, 85, 0.54);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 200px;
    max-width: 300px;
    z-index: 10001;
    width: auto;
}

.filter-dropdown.active .filter-dropdown-menu {
    display: block;
}

.filter-dropdown.active .filter-button svg {
    transform: rotate(180deg);
}

/* Applied Filters Row */
.applied-filters-row {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 0 8px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 12px;
    margin-bottom: 8px;
}

.applied-filters-row.has-filters {
    display: flex;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 14px;
    background: #fff5f0;
    border: 1px solid #e15a11;
    border-radius: 6px;
    font-size: 14px;
    color: #e15a11;
    height: 30px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-weight: 400;
}

.filter-chip:hover {
    background: #ffe8dc;
}

.filter-chip-label {
    font-weight: 500;
    color: #e15a11;
    font-size: 14px;
}

.filter-chip-value {
    color: #e15a11;
    font-weight: 400;
}

.filter-chip-remove {
    background: none;
    border: none;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e15a11;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-chip-remove:hover {
    opacity: 0.7;
}

.filter-chip-remove svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 900px) {
    .filter-panel {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }

    .filter-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .applied-filters-row {
        gap: 8px;
    }

    .filter-chip {
        font-size: 13px;
        padding: 0 8px 0 12px;
        height: 32px;
    }

    .filter-chip-label {
        font-size: 13px;
    }

    .btn-reset {
        font-size: 12px;
        height: 28px;
        padding: 0 8px;
    }

    .filter-buttons-group {
        flex-wrap: wrap;
    }
}

.filter-search {
    padding: 8px;
    border-bottom: 1px solid rgba(85, 85, 85, 0.54);
}

.filter-search-input {
    width: 100%;
    height: 30px;
    padding: 0 8px 0 28px;
    border: 1px solid #a4a9b3;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f6a69' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E") no-repeat 8px center;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
}

.filter-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #f5f5f5;
}

.filter-option.selected {
    background: #e15a11;
    color: white;
    font-weight: 500;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: background 0.2s;
}

.column-option:hover {
    background: #f5f5f5;
}

.column-option input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #e15a11;
}

.search-bar-right {
    width: 270px;
    max-width: 100%;
}

.search-input-wrapper {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 30px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.search-input-wrapper:focus-within {
    border-color: #e15a11;
}

.search-input-wrapper .search-icon,
.search-input-wrapper img.search-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    position: static;
    transform: none;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #6f6a69;
    margin-left: 8px;
    height: 100%;
    min-width: 0;
    background: transparent;
    padding: 0;
}

.search-input-wrapper input::placeholder {
    color: #9ca3af;
}


.btn-reset {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    height: 28px;
    transition: all 0.2s;
    box-sizing: border-box;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-reset:hover {
    color: #666;
}

.btn-reset img {
    width: 11px !important;
    height: 11px !important;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
    transition: filter 0.2s;
}

.btn-reset:hover img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
}

/* ==========================================================================
   24. Reports Page - Modal Styles
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 2px;
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-icon {
    width: 32px;
    height: 32px;
    background: #e15a11;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header-icon svg {
    width: 16px;
    height: 16px;
    color: white;
}

.modal-header-title {
    font-weight: 600;
    font-size: 16px !important;
    color: #111827;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.modal-header-divider {
    width: 1px;
    height: 24px;
    background-color: #d1d5db;
    margin: 0 8px;
}

.modal-profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.modal-profile-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.modal-profile-link .profile-icon {
    width: 20px;
    height: 20px;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 28px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1;
    font-weight: 300;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-close img {
    width: 8px;
    height: 8px;
    object-fit: contain;
    display: block;
}

.modal-body {
    padding: 12px 20px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f9fafb;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.modal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
   
}

.modal-status-badge.open {
    background: #fee2e2;
    color: #991b1b;
}

.modal-status-badge.processing {
    background: #fed7aa;
    color: #9a3412;
}

.modal-status-badge.justice {
    background: #fef3c7;
    color: #854d0e;
}

.modal-status-badge.closed {
    background: #d1fae5;
    color: #065f46;
}

.modal-status-badge.classified {
    background: #f3f4f6;
    color: #4b5563;
}

.modal-status-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.modal-status-dot.open { background: #dc2626; }
.modal-status-dot.processing { background: #e15a11; }
.modal-status-dot.justice { background: #ca8a04; }
.modal-status-dot.closed { background: #16a34a; }
.modal-status-dot.classified { background: #6b7280; }

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-info-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1px;
}

.modal-info-value {
    font-size: 13px;
    color: #111827;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.modal-info-value:empty::before {
    content: 'N/A';
    color: #9ca3af;
    font-weight: 400;
}

.modal-section {
    margin-bottom: 18px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 10px;
    font-weight: 600;
    color: #e15a11;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 8px 0;
    border-top: 1px solid #e5e7eb;
    margin-bottom: 10px;
    margin-top: 2px;
}

/* Remove border-top from first section title (SOMMAIRE) */
.modal-body > .modal-section:first-child .modal-section-title {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Responsive Styles for Modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 2px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header-icon {
        width: 32px;
        height: 32px;
    }

    .modal-header-icon svg {
        width: 16px;
        height: 16px;
    }

    .modal-header-title {
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .modal-section-title {
        font-size: 10px;
        padding: 14px 0 10px 0;
    }
}

/* Modal Footer Styles for Case Details Modal */
.modal-footer {
    padding: 16px 20px 20px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    margin-top: auto;
}

.modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: flex-end;
}

.btn-modal-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-modal-action svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-modal-action.btn-primary svg {
    stroke: white;
    color: white;
}

.btn-modal-action.btn-primary .action-img {
    filter: brightness(0) invert(1);
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.btn-modal-action.btn-primary {
    background-color: #e15a11;
    color: white;
}

.btn-modal-action.btn-primary:hover {
    background-color: #c94a0f;
    color: white;
}

.btn-modal-action.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.btn-modal-action.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-modal-action.btn-secondary:hover {
    background-color: #f9fafb;
    color: #111827;
    border-color: #9ca3af;
}

.btn-modal-action.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.2);
}

/* Responsive styles for modal footer */
@media (max-width: 768px) {
    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .modal-footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-modal-action {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Styles for Reports Page */
@media (max-width: 768px) {
    .main-wrapper {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 20px 16px;
    }

    .search-box {
        flex: 1;
        min-width: 200px;
    }

    .search-bar-right {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .reports-table {
        min-width: 800px;
    }

    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-info {
        text-align: center;
    }
}

/* Pagination dots */
.pagination-dots {
    padding: 0 4px;
    color: #9ca3af;
}

/* ==========================================================================
   25. My Cases Page Styles
   ========================================================================== */

/* Filters Section */
.filters-section {
    margin-bottom: 24px;
}

/* Filters Toolbar */
.filters-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.toolbar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-left {
        order: 1;
    }
    .toolbar-right {
        order: 2;
    }
}

/* Toolbar Action Buttons - Consistent Style */
.main-filter-button,
.btn-action {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    font-weight: 400;
}

.main-filter-button:hover,
.btn-action:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.main-filter-button.has-active-filters {
    border-color: #e15a11;
    background: #fff5f0;
    color: #e15a11;
}

.main-filter-button svg,
.btn-action svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.main-filter-button.has-active-filters svg {
    color: #e15a11;
}

/* Filter Count Badge */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e15a11;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1;
}

.main-filter-button:not(.has-active-filters) .filter-count-badge {
    display: none;
}

/* Filter Panel Dropdown */
.filter-panel-container {
    position: relative;
}

.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    width: 680px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
}

.filter-panel.active {
    display: block;
}

.filter-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.filter-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.filter-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.filters-applied-count {
    font-size: 14px;
    color: #666;
}

.filters-applied-count .count {
    color: #e15a11;
    font-weight: 600;
}

.filter-panel-actions {
    display: flex;
    gap: 12px;
}

.btn-clear-all {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 16px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-all:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn-apply-filters {
    background: #e15a11;
    border: none;
    border-radius: 6px;
    height: 30px;
    padding: 0 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apply-filters:hover {
    background: #c14d0e;
}

/* Individual Filter Dropdowns inside Panel */
.filter-dropdown {
    position: relative;
}

.filter-button {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 30px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    width: 100%;
    justify-content: space-between;
}

.filter-button:hover {
    border-color: #e15a11;
}

.filter-button.active-filter {
    border-color: #e15a11;
    background: #fff5ee;
}

.filter-button.active-filter .filter-text {
    color: #e15a11;
    font-weight: 500;
}

.filter-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

.filter-button .filter-text {
    flex: 1;
    text-align: left;
}

/* All filter dropdown menus hidden by default */
.filter-dropdown-menu {
    background: white;
    border: 1px solid rgba(85, 85, 85, 0.54);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 200px;
    max-width: 300px;
    z-index: 10001;
    width: auto;
}

/* Dropdowns inside filter panel use fixed positioning */
.filter-panel .filter-dropdown-menu {
    position: fixed;
}

/* Columns dropdown - outside filter panel uses absolute positioning */
#columnsFilter .filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
}

.filter-dropdown.active .filter-dropdown-menu {
    display: block;
}

.filter-dropdown.active .filter-button svg,
.filter-dropdown.active .btn-action svg {
    transform: rotate(180deg);
}

.filter-button svg,
.btn-action svg {
    transition: transform 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-search {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-search-input {
    width: 100%;
    height: 30px;
    padding: 0 10px 0 28px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E") no-repeat 8px center;
    transition: all 0.15s;
}

.filter-search-input:hover {
    border-color: #9ca3af;
}

.filter-search-input:focus {
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.08);
}

.filter-options {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.filter-options::-webkit-scrollbar {
    width: 5px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f9fafb;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.filter-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.1s;
    margin: 0 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.filter-option:hover {
    background: #f3f4f6;
}

.filter-option.selected {
    background: rgba(225, 90, 17, 0.08);
    border-left: 3px solid #e15a11;
    color: #374151;
    font-weight: 500;
}

.filter-option-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #e15a11;
    cursor: pointer;
    flex-shrink: 0;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.1s;
    margin: 0 6px;
    border-radius: 4px;
}

.column-option:hover {
    background: #f3f4f6;
}

.column-option input[type="checkbox"] {
    cursor: pointer;
    width: 15px;
    height: 15px;
    accent-color: #e15a11;
    flex-shrink: 0;
}

/* Applied Filters Row */
.applied-filters-row {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 0 8px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 12px;
    margin-bottom: 8px;
}

.applied-filters-row.has-filters {
    display: flex;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 14px;
    background: #fff5f0;
    border: 1px solid #e15a11;
    border-radius: 6px;
    font-size: 14px;
    color: #e15a11;
    height: 30px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-weight: 400;
}

.filter-chip:hover {
    background: #ffe8dc;
}

.filter-chip-label {
    font-weight: 500;
    color: #e15a11;
    font-size: 14px;
}

.filter-chip-value {
    color: #e15a11;
    font-weight: 400;
}

.filter-chip-remove {
    background: none;
    border: none;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e15a11;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-chip-remove:hover {
    opacity: 0.7;
}

.filter-chip-remove svg {
    width: 14px;
    height: 14px;
}

/* Reset Button Styling */
.btn-reset {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    height: 28px;
    transition: all 0.2s;
    box-sizing: border-box;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-reset:hover {
    color: #666;
}

.btn-reset img {
    width: 11px !important;
    height: 11px !important;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
    transition: filter 0.2s;
}

.btn-reset:hover img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
}

/* Table Controls */
.table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 0 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.displaying-items {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

/* Cases Table Styles - scroll like reports table */
.cases-table-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cases-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.cases-table thead {
    background: #f9fafb;
}

.cases-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.cases-table th.col-status,
.cases-table td.col-status {
    width: 26%;
    white-space: nowrap;
}

.cases-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.cases-table tbody tr:hover {
    background: #f9fafb;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
}

.status-dot.open {
    background: #ef4444;
}



.status-dot.justice {
    background: #eab308;
}

.status-dot.closed {
    background: #22c55e;
}

.status-dot.grey {
    background: #6b7280;
}

.ellipsis-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transform: rotate(90deg);
}

.actions-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.action-icon {
    width: 13px;
    height: 13px;
    cursor: pointer;
    color: #e15a11;
}

.action-icon img {
    filter: invert(37%) sepia(73%) saturate(1679%) hue-rotate(356deg) brightness(94%) contrast(92%);
}

.action-icon:hover {
    opacity: 0.7;
}

.edit-action-icon {
    width: 13px;
    height: 13px;
    cursor: pointer;
    filter: invert(37%) sepia(73%) saturate(1679%) hue-rotate(356deg) brightness(94%) contrast(92%);
}

.edit-action-icon:hover {
    opacity: 0.7;
}

.expand-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    padding: 2px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expand-icon.expanded {
    background: #e15a11;
    border-color: #e15a11;
}

.expand-icon.expanded svg {
    color: white;
}

/* Journey Row / Timeline */
.journey-row {
    display: none;
    background: #f9fafb;
}

.journey-row.active {
    display: table-row;
}

.journey-row td {
    padding: 0 !important;
}

.journey-content {
    padding: 12px 16px 12px 16px;
    overflow-x: auto;
    max-width: 100%;
}

.journey-timeline {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 20px 24px;
    display: flex;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.timeline-wrapper {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
    flex: 1;
}

/* Person icon at the start */
.timeline-person-icon {
    flex-shrink: 0;
    width: 32px;
    height: 34px;
    background: #e15a11;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    position: relative;
    z-index: 3;
    align-self: center;
    margin-top: -17px;
}

.timeline-person-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Timeline Container */
ul.AddonBx {
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
    position: relative;
    list-style: none;
    margin: 0;
    align-items: flex-start;
    width: 100%;
    flex: 1;
}

/* The horizontal line that connects all dots */
ul.AddonBx::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 0;
    right: 0;
    height: 3px;
    background: #d1d5db;
    z-index: 0;
}

ul.AddonBx li {
    display: flex;
    list-style: none;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding: 0 8px 0 0;
    flex: 1;
    min-width: 0;
}

ul.AddonBx li:first-child {
    padding-left: 16px;
}

.addon-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    flex-grow: 1;
}

ul.AddonBx li .addon-inner span {
    display: block;
    text-align: center;
    line-height: 1.3;
}

ul.AddonBx li .addon-inner span.dateBx {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
    white-space: nowrap;
}

ul.AddonBx li .addon-inner span.colorBx {
    height: 12px;
    width: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    color: transparent;
    border: 3px solid #d1d5db;
    margin-bottom: 6px;
    background: #d1d5db;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 4px white;
    display: inline-block;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
}

ul.AddonBx li .addon-inner span.nameBx {
    font-size: 11px;
    font-weight: 200;
    color: #1f2937;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    overflow-wrap: break-word;
}

ul.AddonBx li .addon-inner span.addInfo {
    font-size: 10px;
    color: #6b7280;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Status colors - filled dots */
ul.AddonBx li .addon-inner span.colorBx.red {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

ul.AddonBx li .addon-inner span.colorBx.orange {
    background: #e15a11 !important;
    border-color: #e15a11 !important;
}

ul.AddonBx li .addon-inner span.colorBx.yellow {
    background: #eab308 !important;
    border-color: #eab308 !important;
}

ul.AddonBx li .addon-inner span.colorBx.green {
    background: #22c55e !important;
    border-color: #22c55e !important;
}

ul.AddonBx li .addon-inner span.colorBx.grey {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

/* Lock icon at the end */
.timeline-lock-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 24px;
    top: 27.5px;
    transform: translateY(-50%);
    z-index: 2;
}

.timeline-lock-icon svg {
    width: 18px;
    height: 18px;
    color: #9ca3af;
}

/* Table Footer Pagination */
.table-footer {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.records-select {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 24px 0 10px;
    font-size: 11px;
    outline: none;
    height: 24px;
    text-align: center;
    line-height: 24px;
    vertical-align: middle;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    cursor: pointer;
}

/* My Cases Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal-overlay.active {
    display: flex;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 505px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 11px;
    top: 11px;
    cursor: pointer;
    z-index: 10;
}

.modal-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 33px;
}

.modal-label {
    font-weight: 600;
    font-size: 12px;
    color: black;
    width: 240px;
}

.modal-value {
    font-weight: 300;
    font-size: 12px;
    color: black;
}

.modal-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-status-dot {
    width: 11px;
    height: 11px;
    min-width: 11px;
    min-height: 11px;
    border-radius: 50%;
    background: #e15a11;
    display: inline-block;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
}

.modal-action-button {
    background: #e15a11;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 6px;
    height: 34px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.modal-action-button span {
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.modal-action-button img {
    width: 12px;
    height: 12px;
}

.case-number-icon {
    width: 16px;
    height: 16px;
}

/* My Cases Helper Classes */
.hidden-column {
    display: none;
}

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

.case-number-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clone-icon {
    color: #e15a11;
}

.pagination-icon {
    width: 12px;
    height: 12px;
}

.pagination-icon.rotated {
    transform: rotate(180deg);
}

.close-icon {
    width: 14px;
    height: 16px;
}

.modal-body {
    padding-top: 5px;
}

.modal-row-last {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* My Cases Responsive Styles */
@media (max-width: 768px) {
    .filters-row {
        gap: 8px;
    }
    
    .filters-group {
        width: 100%;
    }
    
    .actions-group {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }
    
    .filters-divider {
        display: none;
    }

    .search-box {
        flex: 1;
        min-width: 200px;
    }

    .cases-table {
        min-width: 800px;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* My Cases Mobile Responsive (max-width: 640px) */
@media (max-width: 640px) {
    /* Filters Toolbar */
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-meta {
        font-size: 12px;
    }

    /* Search Bar */
    .search-bar-right {
        width: 100%;
    }

    /* Filter Buttons */
    .filter-panel-container,
    .filter-dropdown {
        width: 100%;
    }

    .main-filter-button,
    .btn-action {
        width: 100%;
        justify-content: center;
    }

    /* Export Button - Hide on mobile */
    #myCasesExport {
        display: none !important;
    }

    /* Add Button - Responsive */
    .btn-add {
        width: 100%;
        justify-content: center;
    }

    /* Applied Filters Row */
    .applied-filters-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Table Container */
    .cases-table-container {
        overflow: hidden;
    }

    .cases-table {
        min-width: 700px;
    }

    /* Table Headers and Cells */
    .cases-table th,
    .cases-table td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .cases-table th {
        font-size: 11px;
    }

    /* Status Cell */
    .status-cell {
        gap: 6px;
    }

    .status-cell span {
        font-size: 11px;
    }

    .ellipsis-icon {
        width: 12px;
        height: 12px;
    }

    .expand-icon {
        width: 14px;
        height: 14px;
    }

    /* Case Number Cell */
    .case-number-cell {
        gap: 6px;
    }

    .case-number-icon {
        width: 12px;
        height: 12px;
    }

    /* Action Icons */
    .actions-cell {
        gap: 12px;
    }

    .action-icon {
        width: 10px;
        height: 10px;
    }

    .action-icon img,
    .action-img {
        width: 10px;
        height: 10px;
    }

    .action-divider {
        height: 14px;
    }

    .clone-icon {
        width: 10px;
        height: 10px;
    }

    /* Table Footer */
    .table-footer {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .records-per-page {
        font-size: 11px;
        justify-content: space-between;
        width: 100%;
    }

    .records-select {
        font-size: 11px;
        height: 28px;
        padding: 0 8px;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination-button {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 0 6px;
    }

    .pagination-icon {
        width: 12px;
        height: 12px;
    }

    .pagination-dots {
        font-size: 11px;
    }

    /* Modal - Mobile Responsive */
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .modal-content {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        border-radius: 12px;
        margin: 0;
        max-height: calc(100vh - 40px);
    }

    .modal-close {
        right: 8px;
        top: 8px;
        width: 32px;
        height: 32px;
        font-size: 28px;
    }

    .close-icon {
        width: 14px;
        height: 14px;
    }

    .modal-body {
        padding-top: 20px;
    }

    .modal-row {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 12px 16px;
        gap: 4px;
    }

    .modal-label {
        width: 100%;
        font-size: 11px;
        margin-bottom: 4px;
    }

    .modal-value {
        font-size: 12px;
        width: 100%;
    }

    .modal-status {
        gap: 6px;
    }

    .modal-status-dot {
        width: 8px;
        height: 8px;
        min-width: 8px;
        min-height: 8px;
    }

    /* Journey/Timeline Row */
    .journey-content {
        padding: 10px 12px;
    }

    .journey-timeline {
        padding: 12px 14px;
    }

    .timeline-wrapper {
        gap: 8px;
    }

    .AddonBx li .addon-inner {
        gap: 6px;
        padding: 8px 10px;
    }

    .AddonBx li .addon-inner span.dateBx {
        font-size: 9px;
    }

    .AddonBx li .addon-inner span.nameBx {
        font-size: 10px;
    }

    .AddonBx li .addon-inner span.addInfo {
        font-size: 9px;
    }

    .AddonBx li .addon-inner span.colorBx {
        width: 14px;
        height: 14px;
        min-width: 14px;
        min-height: 14px;
    }

    /* Filter Panel - Mobile */
    .filter-panel {
        width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        max-height: 80vh;
    }

    .filter-panel-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .filter-panel-footer {
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
    }

    .filter-panel-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-clear-all,
    .btn-apply-filters {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .filter-panel {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
    
    .filter-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .applied-filters-row {
        gap: 8px;
    }
    
    .filter-chip {
        font-size: 13px;
        padding: 0 8px 0 12px;
        height: 32px;
    }
    
    .filter-chip-label {
        font-size: 13px;
    }
    
    .btn-reset {
        font-size: 12px;
        height: 28px;
        padding: 0 8px;
    }
}

/* ==========================================================================
   26. Users Page Styles
   ========================================================================== */

/* Structure Dropdown */
.structure-dropdown {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
    min-width: auto;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.2s;
}

.dropdown-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.dropdown-button .arrow-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-button .arrow-icon svg {
    width: 16px;
    height: 16px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.dropdown-item {
    display: block;
    padding: 10px 12px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.active {
    background: #e15a11;
    color: white;
    font-weight: 500;
}


/* Unified Export Button - Single class for all export/download buttons */
.export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 30px;
    padding: 0 12px;
    background: #e15a11;
    color: white;
    border: 1px solid #e15a11;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.export-btn:hover {
    background: #c94e0e;
    border-color: #c94e0e;
}

.export-btn:active {
    transform: scale(0.98);
}

.export-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.export-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100px;
    overflow: hidden;
    z-index: 50;
}

.export-dropdown.active .export-dropdown-menu {
    display: block;
}

.export-dropdown-menu.hidden {
    display: none !important;
}

.export-dropdown-menu button {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    color: #374151;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.export-dropdown-menu button svg {
    flex-shrink: 0;
    margin: 0;
}

.export-dropdown-menu button span {
    text-align: left;
    margin: 0;
}

.export-dropdown-menu button:hover {
    background-color: #f9fafb;
    color: #e15a11;
}

.export-dropdown-menu button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.export-icon,
.export-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-icon {
    width: 16px;
    height: 16px;
}

.export-arrow {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform 0.2s;
}

.export-dropdown.active .export-arrow {
    transform: rotate(180deg);
}

/* Users Table Container */
.users-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: #f9fafb;
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.users-table th:first-child {
    width: 1%;
    white-space: nowrap;
}

.users-table th:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.users-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
}

.users-table td:first-child {
    width: 1%;
    white-space: nowrap;
}

.users-table td:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.users-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
}

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

.users-table tbody tr:hover {
    background: #f9fafb;
}

.table-email {
    text-decoration: underline;
    color: #374151;
}

.table-role,
.table-structure {
    font-size: 14px;
    color: #374151;
    flex-wrap: wrap;
    gap: 6px 6px;
    row-gap: 8px;
    align-items: flex-start;
}

.role-badge {
    display: inline-flex;
    padding: 1px 8px;
    background: #f9fafb;
    color: #374151;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.no-role {
    color: #9ca3af;
}

/* Icon Plus */
.icon-plus::before {
    content: '+';
    font-size: 16px;
    font-weight: 500;
  
}

/* Delete Confirmation Modal */
.delete-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.delete-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 520px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.delete-modal-overlay.active .delete-modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.modal-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.modal-header-text h3 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.modal-header-text p {
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.modal-body p {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.user-info-box {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 0;
}

.user-info-box p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.user-info-box p:last-child {
    margin-bottom: 0;
}

.user-info-box strong {
    color: #dc2626;
    font-weight: 600;
}

.modal-footer {
    padding: 12px 24px 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    font-family: 'Segoe UI', sans-serif;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 90px;
}

.modal-btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.modal-btn-cancel:hover {
    background-color: #e5e7eb;
}

.modal-btn-cancel:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.modal-btn-delete {
    background-color: #dc2626;
    color: white;
}

.modal-btn-delete:hover {
    background-color: #b91c1c;
}

.modal-btn-delete:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Users Page Responsive Styles */
@media (max-width: 768px) {
    .users-table {
        min-width: 800px;
    }
}

/* Mobile Responsive for Users Page (max-width: 640px) */
@media (max-width: 640px) {
    /* Filters Toolbar */
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-meta {
        font-size: 12px;
    }

    /* Search Bar */
    .search-bar-right {
        width: 100%;
    }

    /* Structure Dropdown */
    .structure-dropdown {
        width: 100%;
    }

    .dropdown-button {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        width: 100%;
        left: 0 !important;
        right: 0 !important;
        max-height: 200px;
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Export Button - Hide on mobile */
    #usersExport {
        display: none !important;
    }


    /* Table Container */
    .users-table-container {
        overflow: hidden;
    }

    .users-table {
        min-width: 600px;
    }

    /* Table Headers and Cells */
    .users-table th,
    .users-table td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .users-table th {
        font-size: 11px;
    }

    .users-table th:last-child,
    .users-table td:last-child {
        width: auto;
        text-align: center;
        padding-right: 12px;
    }

    /* Table Content */
    .table-email {
        font-size: 11px;
    }

    .table-role,
    .table-structure {
        font-size: 11px;
    }

    .role-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Action Icons */
    .table-actions {
        gap: 4px;
        justify-content: center;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .action-icon {
        width: 10px;
        height: 10px;
        flex-shrink: 0;
        min-width: 10px;
    }

    .action-icon img,
    .action-img {
        width: 10px;
        height: 10px;
    }

    .action-divider {
        height: 14px;
        flex-shrink: 0;
        min-width: 1px;
    }

    /* Table Footer */
    .table-footer {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .records-per-page {
        font-size: 11px;
        justify-content: space-between;
        width: 100%;
    }

    .records-select {
        font-size: 11px;
        height: 28px;
        padding: 0 8px;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination-button {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 0 6px;
    }

    .pagination-button svg {
        width: 12px;
        height: 12px;
    }

    .pagination-dots {
        font-size: 11px;
    }

    /* Empty State */
    .empty-state {
        padding: 30px 16px;
        font-size: 12px;
    }

    /* User Delete Modal - Mobile Responsive */
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .modal-content {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        border-radius: 12px;
        margin: 0;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header {
        padding: 16px 16px 12px 16px !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .modal-header-text h3 {
        font-size: 16px !important;
    }

    .modal-header-text p {
        font-size: 11px !important;
    }
    
    .modal-body {
        padding: 16px !important;
    }

    .modal-body p {
        font-size: 13px !important;
        line-height: 1.5;
    }

    .user-info-box {
        padding: 12px 14px;
        margin-top: 12px;
    }

    .user-info-box p {
        font-size: 12px !important;
        margin-bottom: 6px;
    }

    .user-info-box strong {
        font-size: 12px;
    }
    
    .modal-footer {
        padding: 12px 16px 16px 16px !important;
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100% !important;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ==========================================================================
   27. Roles Page Styles
   ========================================================================== */


/* Roles Table Container */
.roles-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.roles-table {
    width: 100%;
    border-collapse: collapse;
}

.roles-table thead {
    background: #f9fafb;
}

.roles-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.roles-table th:first-child {
    width: 1%;
    white-space: nowrap;
}

.roles-table th:last-child {
    min-width: 100px;
    width: auto;
    text-align: right;
    padding-right: 16px;
}

.roles-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.roles-table td:first-child {
    width: 1%;
    white-space: nowrap;
}

.roles-table td:last-child {
    min-width: 100px;
    width: auto;
    text-align: right;
    padding-right: 16px;
}

.roles-table .table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.roles-table tbody tr:hover {
    background: #f9fafb;
}

/* Dropdown Arrow */
.dropdown-arrow {
    width: 11px;
    height: 6.792px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

/* Table Container with overflow */
.table-container {
    overflow-x: auto;
}

/* Roles Page Responsive Styles */
@media (max-width: 768px) {
    .roles-table {
        min-width: 600px;
    }

    .roles-table .table-actions {
        gap: 6px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .roles-table td:last-child,
    .roles-table th:last-child {
        min-width: 90px;
        padding-right: 12px;
    }

    /* Toolbar adjustments for mobile */
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    /* Search bar stays on top, full width */
    .toolbar-right .search-bar-right {
        width: 100% !important;
        order: 1;
    }

    /* Export button and Add Role button side by side below search bar */
    /* Create a flex row container effect for buttons */
    .toolbar-right > div[id*="Export"],
    .toolbar-right > a.btn-add {
        order: 2;
        flex-shrink: 0;
    }

    /* Use flex-wrap to allow buttons to be on same row */
    .toolbar-right {
        flex-wrap: wrap;
        flex-direction: row;
    }

    /* But search bar should be full width on its own row */
    .toolbar-right .search-bar-right {
        flex-basis: 100%;
        width: 100%;
    }

    /* Buttons should be on the next row, side by side */
    .toolbar-right > div[id*="Export"] {
        margin-right: 8px;
    }
}

/* ==========================================================================
   28. Permissions Page Styles
   ========================================================================== */


/* Permissions Table Container */
.permissions-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
}

.permissions-table thead {
    background: #f9fafb;
}

.permissions-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.permissions-table th:first-child {
    width: 1%;
    white-space: nowrap;
}

.permissions-table th:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.permissions-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.permissions-table td:first-child {
    width: 1%;
    white-space: nowrap;
}

.permissions-table td:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.permissions-table tbody tr:hover {
    background: #f9fafb;
}

/* Permissions Page Responsive Styles */
@media (max-width: 768px) {
    .permissions-table {
        min-width: 600px;
    }

    .permissions-table .table-actions {
        gap: 6px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .permissions-table td:last-child,
    .permissions-table th:last-child {
        min-width: 90px;
        padding-right: 12px;
    }

    /* Toolbar adjustments for mobile */
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    /* Search bar stays on top, full width */
    .toolbar-right .search-bar-right {
        width: 100% !important;
        order: 1;
    }

    /* Export button and Add button side by side below search bar */
    .toolbar-right > div[id*="Export"],
    .toolbar-right > a.btn-add {
        order: 2;
        flex-shrink: 0;
    }

    /* Use flex-wrap to allow buttons to be on same row */
    .toolbar-right {
        flex-wrap: wrap;
        flex-direction: row;
    }

    /* But search bar should be full width on its own row */
    .toolbar-right .search-bar-right {
        flex-basis: 100%;
        width: 100%;
    }

    /* Buttons should be on the next row, side by side */
    .toolbar-right > div[id*="Export"] {
        margin-right: 8px;
    }
}

/* ==========================================================================
   29. Master Data / Type of GBV Page Styles
   ========================================================================== */

/* Icon Plus */
.icon-plus::before {
    content: '+';
    font-size: 16px;
    font-weight: 500;
   
}

/* Unified Add Button - Single class for all add buttons */
.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: #e15a11;
    color: white;
    border: 1px solid #e15a11;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
}

.btn-add:hover {
    background: #c94e0e;
    border-color: #c94e0e;
}

.btn-add:active {
    transform: scale(0.98);
}

.btn-add svg,
.btn-add .icon-plus {
    width: 14px;
    height: 14px;
   margin-bottom:15px;
}

.btn-add > span:not(.icon-plus) {
    white-space: nowrap;
    order: 1;
}

/* Data Table Container */
.data-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 24px;
    width: 1%;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

/* Master Data List specific - Actions column alignment */
.data-table th:last-child,
.data-table td:last-child {
    width: 120px;
    text-align: right;
    padding-right: 24px;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

/* Table Actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.action-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #e15a11;
    transition: opacity 0.2s;
}

.action-icon:hover {
    opacity: 0.7;
}

.action-icon-img {
    width: 13px;
    height: 13px;
}

.action-divider {
    width: 1px;
    height: 16px;
    background: #e5e5e5;
    flex-shrink: 0;
    min-width: 1px;
}

/* Empty Table Message */
.empty-table-message {
    text-align: center;
    padding: 14px;
    color: #999;
}

/* Table Footer */
.table-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.records-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #374151;
}

.records-select {
    min-width: 50px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 24px 0 10px;
    font-size: 11px;
    color: #374151;
    background: white;
    cursor: pointer;
    text-align: right;
    line-height: 24px;
    vertical-align: middle;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
}

/* Pagination */
.pagination-button {
    min-width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    color: #374151;
    transition: all 0.2s;
}

.pagination-button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.pagination-button.active {
    background: #e15a11;
    color: white;
    border-color: #e15a11;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-button svg {
    width: 16px;
    height: 16px;
}

.pagination-dots {
    padding: 0 4px;
    color: #9ca3af;
    font-size: 11px;
}

/* Delete Confirmation Modal (Master Data) */
.master-data-delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.master-data-delete-modal.active {
    display: flex;
    opacity: 1;
}

.master-data-delete-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.master-data-delete-modal .modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.master-data-delete-modal.active .modal-container {
    transform: scale(1);
}

.master-data-delete-modal .modal-header {
    padding: 16px 24px 12px 24px;
}

.master-data-delete-modal .modal-header h3 {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.master-data-delete-modal .modal-body {
    padding: 16px 24px;
}

.master-data-delete-modal .modal-body p {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.master-data-delete-modal .modal-body strong {
    color: #111827;
}

.master-data-delete-modal .modal-footer {
    padding: 12px 24px 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: none;
}

.master-data-delete-modal .btn-cancel {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background-color: #f3f4f6;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.master-data-delete-modal .btn-cancel:hover {
    background-color: #e5e7eb;
}

.master-data-delete-modal .btn-cancel:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.master-data-delete-modal .btn-delete {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    background-color: #dc2626;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.master-data-delete-modal .btn-delete:hover {
    background-color: #b91c1c;
}

.master-data-delete-modal .btn-delete:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Master Data Page Responsive Styles */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }

    .data-table .table-actions {
        gap: 6px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .data-table td:last-child,
    .data-table th:last-child {
        min-width: 90px;
        padding-right: 12px;
    }

    .table-footer {
        flex-direction: column;
        gap: 12px;
    }

    .pagination {
        justify-content: center;
    }

    /* Toolbar adjustments for mobile */
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-left {
        order: 1;
    }

    .toolbar-right {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    /* Search bar stays on top, full width */
    .toolbar-right .search-bar-right {
        width: 100% !important;
        order: 1;
    }

    /* Export button and Add button side by side below search bar */
    .toolbar-right > div[id*="Export"],
    .toolbar-right > a.btn-add {
        order: 2;
        flex-shrink: 0;
    }

    /* Use flex-wrap to allow buttons to be on same row */
    .toolbar-right {
        flex-wrap: wrap;
        flex-direction: row;
    }

    /* But search bar should be full width on its own row */
    .toolbar-right .search-bar-right {
        flex-basis: 100%;
        width: 100%;
    }

    /* Buttons should be on the next row, side by side */
    .toolbar-right > div[id*="Export"] {
        margin-right: 8px;
    }
}

/* Mobile Responsive for Master Data Delete Modal */
@media (max-width: 640px) {
    .master-data-delete-modal .modal-container {
        width: 95% !important;
        margin: 16px;
    }
    
    .master-data-delete-modal .modal-header {
        padding: 20px 20px 12px 20px !important;
    }
    
    .master-data-delete-modal .modal-header h3 {
        font-size: 18px !important;
    }
    
    .master-data-delete-modal .modal-body {
        padding: 16px 20px !important;
    }
    
    .master-data-delete-modal .modal-body p {
        font-size: 14px !important;
    }
    
    .master-data-delete-modal .modal-footer {
        padding: 12px 20px 20px 20px !important;
        flex-direction: column-reverse !important;
    }
    
    .master-data-delete-modal .modal-footer button {
        width: 100% !important;
    }
}

/* ==========================================================================
   30. Directory Page Styles
   ========================================================================== */

/* Icon sizing utility */
.icon-16 {
    width: 16px;
    height: 16px;
}

/* Custom scrollbar for Directory */
.directory-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.directory-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.directory-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.directory-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Custom dropdown arrow positioning */
.custom-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Search and Filters Section */
.search-filter-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    padding: 16px;
    margin-bottom: 24px;
}

/* Directory Filters Section - Consistent with Home Page */
.directory-filters-section {
    margin-bottom: 16px;
}

.directory-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-group-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.filter-label-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

.filter-icon-small {
    width: 14px;
    height: 14px;
}

.filter-dropdown-inline .custom-dropdown-button {
    height: 30px;
    font-size: 12px;
}

.btn-filter-apply,
.btn-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background-color: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s;
}

.btn-filter-apply:hover,
.btn-filter-reset:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-filter-apply svg,
.btn-filter-reset svg {
    width: 14px;
    height: 14px;
}

.btn-filter-apply svg {
    fill: #e15a11;
}

.btn-filter-reset svg {
    fill: #7f8c8d;
}

/* Sort By Section */
.sort-by-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.sort-by-label {
    font-size: 12px;
    color: #6b7280;
}

.sort-select {
    min-width: 140px;
}

.search-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-container {
    position: relative;
    width: 100%;
    flex: 1;
}

.search-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
    stroke-width: 1.5;
}

.search-input-field {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 44px !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #374151;
}

.search-input-field::placeholder {
    color: #9ca3af;
}

.search-input-field:focus {
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

.filters-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .filters-row {
        flex-direction: row;
        align-items: flex-end;
    }
}

.filter-group {
    flex: 1;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.filter-icon {
    width: 16px;
    height: 16px;
}

.filter-group .filter-select {
    width: 100%;
    height: 32px;
    padding: 0 32px 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-normal);
    color: #374151;
    outline: none;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: all 0.15s ease;
}

.filter-group .filter-select:hover {
    border-color: #9ca3af;
    background-color: #fafafa;
}

.filter-group .filter-select:focus {
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.1);
}

.apply-filter-btn {
    height: 34px;
    padding: 0 24px;
    background: white;
    border: 1px solid #e15a11;
    color: #e15a11;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.apply-filter-btn:hover {
    background-color: #fff5f0;
}

@media (min-width: 768px) {
    .apply-filter-btn {
        width: auto;
        align-self: flex-end;
    }
}

.reset-filter-btn {
    height: 34px;
    padding: 0 24px;
    background: white;
    border: 1px solid #7f8c8d;
    color: #7f8c8d;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.reset-filter-btn:hover {
    background-color: #f5f5f5;
    border-color: #5f6c6d;
    color: #5f6c6d;
}

@media (min-width: 768px) {
    .reset-filter-btn {
        width: auto;
        align-self: flex-end;
    }
}

/* Directory Page Header */
.directory-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    gap: 16px;
}

@media (min-width: 768px) {
    .directory-page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.directory-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.directory-icon-box {
    width: 33px;
    height: 33px;
    background-color: #e15a11;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directory-icon-box.collapsed {
    margin-left: 30px;
}

.directory-icon {
    width: 20px;
    height: 14px;
}

.directory-title {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    margin: 0;
}

.directory-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}


/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .category-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card {
    background: linear-gradient(145deg, #fff7ed 0%, #fefeff 100%);
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(225, 90, 17, 0.1);
    border-left: 4px solid #e15a11;
}

.category-label {
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.category-number {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #e15a11;
}

.category-icon-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #fed7aa 0%, #ffedd5 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.category-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(34%) sepia(78%) saturate(2213%) hue-rotate(356deg) brightness(94%) contrast(92%);
}

/* Responsive adjustments for category cards */
@media (max-width: 768px) {
    .category-card {
        padding: 10px 14px;
    }
    
    .category-number {
        font-size: 1.375rem;
    }
    
    .category-label {
        font-size: 10px;
    }
    
    .category-icon-circle {
        width: 36px;
        height: 36px;
        margin-left: 10px;
    }
    
    .category-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .category-card {
        padding: 10px 12px;
    }
    
    .category-number {
        font-size: 1.25rem;
    }
    
    .category-label {
        font-size: 10px;
    }
    
    .category-icon-circle {
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }
    
    .category-icon {
        width: 16px;
        height: 16px;
    }
}

/* Select with custom arrow */
.select-with-arrow {
    background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 24 24%27 stroke=%27%236b7280%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M19 9l-7 7-7-7%27%3E%3C/path%3E%3C/svg%3E');
    background-position: right 8px center;
    background-size: 12px;
}

/* Sort Section */
.sort-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .sort-wrapper {
        justify-content: flex-end;
    }
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sort-label {
    color: #666;
}

.sort-select {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #333;
    box-sizing: border-box;
}

.sort-select:focus {
    outline: none;
    border-color: #e15a11;
}

/* Contact Cards */
.contact-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .contact-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    display: flex;
    flex-direction: column;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #fef3ec 0%, #fde8db 50%, #fce0cc 100%);
    z-index: 0;
}

.contact-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e15a11;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::after {
    opacity: 1;
}

.contact-card:hover {
    box-shadow: 0 20px 40px rgba(225, 90, 17, 0.15), 0 8px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: rgba(225, 90, 17, 0.25);
}

.contact-card-body {
    padding: 24px 20px 18px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
}

.contact-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 14px;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(225, 90, 17, 0.2), 0 0 0 3px rgba(225, 90, 17, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
    position: relative;
}

.contact-card:hover .contact-avatar {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 12px 28px rgba(225, 90, 17, 0.25);
}

.contact-name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.contact-title {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8de 100%);
    color: #e15a11;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(225, 90, 17, 0.2);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(225, 90, 17, 0.1);
}

.contact-details {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0 0;
    border-top: 1px solid #f1f5f9;
    flex: 1;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 8px;
    margin: 0 -10px;
}

.contact-detail-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.contact-detail-icon {
    width: 18px;
    height: 18px;
    color: #e15a11;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-detail-item:hover .contact-detail-icon {
    transform: rotate(5deg) scale(1.1);
    color: #e15a11;
}

.contact-detail-text {
    color: #475569;
    font-weight: 500;
    word-break: break-word;
    flex: 1;
    font-size: 13px;
}

.contact-date {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    line-height: 1.4;
    font-weight: 500;
    text-align: center;
}

.contact-btn {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: #e15a11;
    border: none;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(225, 90, 17, 0.25);
    position: relative;
    overflow: hidden;
    margin-top: auto;
    flex-shrink: 0;
    text-decoration: none;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 90, 17, 0.35);
}

.contact-btn:active {
    transform: translateY(0);
}

.contact-btn svg {
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
}

.contact-btn:hover svg {
    transform: translateX(3px);
}

/* Edit/Delete Action Buttons */
.contact-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.contact-action-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

.contact-action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.contact-action-btn.edit:hover {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8de 100%);
    border-color: #e15a11;
}

.contact-action-btn.edit:hover svg {
    fill: #e15a11;
    transform: rotate(-5deg);
}

.contact-action-btn.delete:hover {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border-color: #ef4444;
}

.contact-action-btn.delete:hover svg {
    fill: #dc2626;
    transform: scale(1.1);
}

/* Responsive adjustments for contact cards */
@media (max-width: 768px) {
    .contact-card-body {
        padding: 20px 18px 16px;
    }
    
    .contact-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
    
    .contact-name {
        font-size: 16px;
    }
    
    .contact-title {
        font-size: 12px;
    }
    
    .contact-details {
        gap: 8px;
        padding: 14px 0 0;
    }
    
    .contact-detail-item {
        font-size: 12px;
        gap: 10px;
        padding: 5px 8px;
    }
    
    .contact-detail-icon {
        width: 16px;
        height: 16px;
    }
    
    .contact-btn {
        height: 42px;
        font-size: 12px;
    }
    
    .contact-actions {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .contact-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .contact-action-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Directory Page Pagination */
.page-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #666;
    background: white;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.2s;
}

.page-btn:hover {
    background-color: #f9fafb;
}

.page-btn.active {
    background-color: #e15a11;
    color: white;
    border-color: #e15a11;
    font-weight: 500;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #999;
}

@media (max-width: 640px) {
    .page-btn.hidden-sm {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-btn.hidden-md {
        display: none;
    }
}

/* Add Focal Point Button */
.add-focal-point-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 20px;
    background-color: #e15a11;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.add-focal-point-btn:hover {
    background-color: #c94f0f;
}

/* No Focal Points Message */
.no-focal-points {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Hide "Displaying focal points" text on mobile */
@media (max-width: 767px) {
    .focal-points-display-count {
        display: none !important;
    }
}

/* Directory Filters - Shift to Right */
.directory-filters-container {
    justify-content: space-between;
    margin-top: 24px; /* Separation between tiles and search bar */
    padding-top: 24px; /* Space above the border line */
    border-top: 1px solid #e0e0e0; /* Light grey separation line between tiles and filters */
}

.directory-filters-right {
    margin-left: auto;
    justify-content: flex-end;
}

@media (min-width: 640px) {
    .directory-filters-right {
        margin-left: auto;
    }
}

/* Directory Results Grid - Increase Card Width */
.directory-results-grid {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .directory-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .directory-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .directory-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   31. Page Navigation / Breadcrumb Styles
   ========================================================================== */
.page-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* Unified Back Button - Single class for all back buttons */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    background: #e15a11;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Unified Plus/Add Survivor Button - Single class for all plus buttons */
.add-survivor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 37px;
    padding: 0;
    background: #e15a11;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    box-sizing: border-box;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-survivor-btn:hover {
    background: #c14d0e;
}

.add-survivor-btn:active {
    transform: scale(0.98);
}

.add-survivor-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Back button with text - expand width and add padding */
.btn-back span {
    white-space: nowrap;
}

/* When button contains span (text button), expand and add padding */
.btn-back:has(span) {
    width: auto;
    padding: 0 12px;
}

.btn-back:hover {
    background: #c94e0e;
}

.btn-back:active {
    transform: scale(0.98);
}

.btn-back svg {
    width: 14px;
    height: 14px;
    stroke: white;
    flex-shrink: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    white-space: nowrap;
}

.breadcrumb-link:hover {
    color: #e15a11;
}

.breadcrumb-separator {
    color: #d1d5db;
    flex-shrink: 0;
}

.breadcrumb-current {
    color: #e15a11;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   32. Add/Edit Focal Point Page Styles
   ========================================================================== */

/* Form Card */
.focal-point-card {
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Section Header */
.focal-point-section-header {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.focal-point-section-title {
    color: #212121;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Form Fields Container */
.focal-point-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Photo Upload Section */
.focal-point-photo-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.photo-upload-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e15a11;
}

.photo-upload-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: #e15a11;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    transition: background 0.2s;
}

.photo-upload-overlay:hover {
    background: #c94e0e;
}

.photo-upload-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-upload-label {
    font-size: 14px;
    color: #1c1d1f;
    font-weight: 500;
    margin: 0;
}

.photo-upload-hint {
    font-size: 12px;
    color: #94979e;
    margin: 0;
}

.remove-photo-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.remove-photo-label input[type="checkbox"] {
    accent-color: #e15a11;
}

.remove-photo-text {
    font-size: 12px;
    color: #ef4444;
}

/* Two Column Grid */
.focal-point-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .focal-point-row {
        grid-template-columns: 1fr;
    }
}

/* Field Container */
.focal-point-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Labels */
.focal-point-label {
    color: #1c1d1f;
    font-size: 14px;
    font-weight: 400;
}

.required-asterisk {
    color: #ff3535;
}

/* Inputs */
.focal-point-input {
    width: 100%;
    height: 34px;
    background: white;
    border: 1px solid rgba(191, 193, 197, 0.53);
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    color: #1c1d1f;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.focal-point-input::placeholder {
    color: #94979e;
}

.focal-point-input:focus {
    border-color: #e15a11;
}

.focal-point-input.country-code {
    width: 100px;
    flex-shrink: 0;
}

.focal-point-input.phone-number {
    flex: 1;
}

/* Phone Row */
.phone-input-row {
    display: flex;
    gap: 12px;
}

/* Select Dropdown Arrow */
.focal-point-card select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394979E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Action Buttons */
.focal-point-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eaeaea;
}


/* Hidden file input */
.hidden-input {
    display: none;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

/* Login page specific body styles */
body.login-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Login page specific container */
body.login-page .container {
    background: #F4EDE2;
    position: relative;
    width: 920px;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

body.login-page .container,
body.login-page .container * {
    box-sizing: border-box;
}

/* Wave Background Pattern */
body.login-page .wave-pattern {
    position: absolute;
    left: -7.44%;
    top: -22.5%;
    right: -5.3%;
    bottom: -56.66%;
    pointer-events: none;
    opacity: 0.3;
}

body.login-page .wave-pattern svg,
body.login-page .wave-pattern-svg {
    width: 100%;
    height: 100%;
}

body.login-page .toggle-password-icon--hidden {
    display: none;
}

body.login-page .modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Left Side Content */
body.login-page .left-content {
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 346px;
}

/* GBVIMS Logo Section */
body.login-page .logo-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

body.login-page .logo-icon {
    background-color: rgba(255, 255, 255, 0.32);
    width: 57px;
    height: 57px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    flex-shrink: 0;
}

body.login-page .logo-icon svg {
    width: 32px;
    height: 32px;
    color: #e15a11;
}

/* Global logo-text styling - consistent across all pages */
.logo-text {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 16px !important;
    color: #e15a11;
    letter-spacing: -0.02em;
    line-height: 1;
}

body.login-page .logo-text {
    color: white; /* White color for login page background */
    width: 223px;
    line-height: normal;
}

body.login-page .logo-text h1 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 18px !important;
    color: #e15a11;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

body.login-page .logo-text p {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400 !important;
    font-size: 14px;
    margin: 0;
    line-height: normal;
    color: #000000;
}

/* Feature Boxes */
body.login-page .features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.login-page .feature-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

body.login-page .feature-icon {
    background-color: rgba(255, 255, 255, 0.32);
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px;
    flex-shrink: 0;
}

body.login-page .feature-icon svg {
    width: 20px;
    height: 20px;
    color: #e15a11;
}

body.login-page .feature-text {
    color: white;
    width: 288px;
    line-height: normal;
}

body.login-page .feature-text h3 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 18px !important;
    margin: 0;
    line-height: normal;
    color: #e15a11;
}

body.login-page .feature-text p {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400 !important;
    font-size: 14px;
    margin: 0;
    line-height: normal;
    color: #000000;
}

body.login-page .feature-text.first-feature p {
    font-weight: 400 !important;
}

/* Login Card */
body.login-page .login-card {
    position: absolute;
    left: 438px;
    top: 43px;
    width: 439px;
    height: 515px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 41px;
    box-sizing: border-box;
}

/* Login Header */
body.login-page .login-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    white-space: nowrap;
}

body.login-page .login-header h2 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 28px !important;
    color: #e15a11;
    letter-spacing: 0.56px;
    margin: 0;
    line-height: normal;
}

body.login-page .login-header p {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #666666;
    margin: 0;
    line-height: normal;
}

/* Form */
body.login-page .login-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.login-page .form-group {
    position: relative;
    width: 100%;
}

body.login-page .form-group.user-id-group {
    margin-bottom: 0;
}

body.login-page .form-group.password-group {
    margin-bottom: 0;
}

body.login-page .input-field {
    width: 100%;
    max-width: 100%;
    height: 34px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 0 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    outline: none;
    transition: border-color 0.3s;
    line-height: 34px;
    box-sizing: border-box;
}

body.login-page .input-field::placeholder {
    color: #929292;
    font-weight: 500;
}

body.login-page .input-field:focus {
    border-color: #e15a11;
}

body.login-page .input-field.password-input {
    padding-right: 46px;
}

body.login-page .password-wrapper {
    position: relative;
    width: 100%;
}

body.login-page .toggle-password-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #929292;
}

/* Forgot Password */
body.login-page .forgot-password {
    position: relative;
    text-align: right;
    width: 100%;
    margin-top: -8px;
    margin-bottom: 0;
}

body.login-page .forgot-password a {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #e15a11;
    text-decoration: none;
    line-height: 24px;
    white-space: nowrap;
}

body.login-page .forgot-password a:hover {
    text-decoration: underline;
}

/* Captcha Section */
body.login-page .login-captcha-section {
    position: relative;
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

body.login-page .captcha-label {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #343434;
    line-height: 24px;
    margin-bottom: 8px !important;
    white-space: nowrap;
}

body.login-page .captcha-row {
    display: flex;
    gap: 11px;
    align-items: center;
}

body.login-page .captcha-refresh-icon {
    width: 21px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

body.login-page .captcha-refresh-icon:active {
    transform: rotate(360deg);
}

body.login-page .captcha-question-box {
    width: 128px;
    height: 34px !important;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px !important;
    color: #343434;
    line-height: 24px;
}

body.login-page .captcha-equals-sign {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #000000;
    line-height: 24px;
}

body.login-page .captcha-answer-input {
    width: 128px;
    height: 34px !important;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 0 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    outline: none;
    line-height: 34px;
    text-align: center;
    box-sizing: border-box;
}

body.login-page .captcha-answer-input::placeholder {
    color: #929292;
    font-weight: 500;
    text-align: center;
}

body.login-page .captcha-answer-input:focus {
    border-color: #e15a11;
}

/* Login Button */
body.login-page .login-button {
    position: relative;
    width: 100%;
    height: 34px;
    margin-top: 8px;
    background-color: #e15a11;
    opacity: 0.5;
    border: none;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
    letter-spacing: 0.1px;
    cursor: not-allowed;
    transition: opacity 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    box-sizing: border-box;
}

body.login-page .login-button span {
    line-height: 34px;
}

body.login-page .login-button.active {
    opacity: 1;
    cursor: pointer;
}

body.login-page .login-button.active:hover {
    background-color: #c94e0e;
}

/* Modal Overlay - Login specific */
body.login-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

body.login-page .modal-overlay.active {
    display: flex;
}

/* Reset Password Modal */
body.login-page .reset-password-modal {
    background-color: #ffffff;
    width: 556px;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 
                0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

body.login-page .modal-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 16px !important;
    color: #e15a11;
    line-height: 34px;
    margin: 0 0 0 0;
}

body.login-page .modal-description {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #344054;
    line-height: 24px;
    margin: 0;
    height: 25px;
}

body.login-page .modal-input-field {
    width: 100%;
    height: 34px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 0 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    outline: none;
    transition: border-color 0.3s;
    line-height: 34px;
    box-sizing: border-box;
}

body.login-page .modal-input-field::placeholder {
    color: #929292;
    font-weight: 500;
}

body.login-page .modal-input-field:focus {
    border-color: #e15a11;
}

body.login-page .modal-input-field.error {
    border-color: #dc2626;
}

body.login-page .modal-captcha-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.login-page .modal-captcha-label {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #343434;
    line-height: 24px;
    margin-bottom: 12px;
}

body.login-page .modal-captcha-row {
    display: flex;
    gap: 11px;
    align-items: center;
}

body.login-page .modal-captcha-icon {
    width: 21px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

body.login-page .modal-captcha-icon:active {
    transform: rotate(360deg);
}

body.login-page .modal-captcha-question {
    width: 128px;
    height: 56px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #343434;
    line-height: 24px;
}

body.login-page .modal-captcha-equals {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #000000;
    line-height: 24px;
}

body.login-page .modal-captcha-input {
    width: 160px;
    height: 34px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 0 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    outline: none;
    line-height: 34px;
    text-align: center;
    box-sizing: border-box;
}

body.login-page .modal-captcha-input::placeholder {
    color: #929292;
    font-weight: 500;
    text-align: center;
}

body.login-page .modal-captcha-input:focus {
    border-color: #e15a11;
}

body.login-page .modal-captcha-input.error {
    border-color: #dc2626;
}

body.login-page .modal-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

body.login-page .modal-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 34px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

body.login-page .modal-btn-cancel {
    background-color: transparent;
    color: #475467;
    height: 34px;
    padding: 0 14px;
}

body.login-page .modal-btn-cancel:hover {
    background-color: #f5f5f5;
}

body.login-page .modal-btn-confirm {
    background-color: rgba(225, 90, 17, 0.5);
    color: #ffffff;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    cursor: not-allowed;
    height: 34px;
    padding: 0 14px;
}

body.login-page .modal-btn-confirm.active {
    background-color: #e15a11;
    cursor: pointer;
}

body.login-page .modal-btn-confirm.active:hover {
    background-color: #c94e0e;
}

/* Loading Spinner - Login specific */
body.login-page .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body.login-page .spinner.hidden {
    display: none;
}

/* Check Inbox Modal */
body.login-page .check-inbox-modal {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 
                0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 556px;
    width: 100%;
}

body.login-page .inbox-modal-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 16px !important;
    color: #e15a11;
    line-height: 34px;
    margin: 0;
}

body.login-page .inbox-modal-message {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #344054;
    line-height: 24px;
    margin: 0;
}

body.login-page .inbox-modal-message strong {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
}

body.login-page .inbox-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

body.login-page .inbox-modal-btn {
    background-color: #e15a11;
    color: #ffffff;
    height: 34px;
    padding: 0 14px;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 34px;
    cursor: pointer;
    border: none;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

body.login-page .inbox-modal-btn:hover {
    background-color: #c94e0e;
}

/* Error Messages - Login specific */
body.login-page .error-message {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

body.login-page .error-message.active {
    display: block;
}

/* Toast Notification - Login specific */
body.login-page .toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #dc2626;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

body.login-page .toast.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.login-page .toast.success {
    background-color: #10b981;
}

body.login-page .toast.error {
    background-color: #dc2626;
}

body.login-page .toast.warning {
    background-color: #f59e0b;
}

body.login-page .toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

body.login-page .toast-message {
    flex: 1;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

body.login-page .toast-close {
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

body.login-page .toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

body.login-page .toast.hiding {
    animation: slideOut 0.3s ease-in;
}

/* ============================================
   LOGIN PAGE RESPONSIVE STYLES
   ============================================ */

/* Large tablets and below (960px) */
@media (max-width: 960px) {
    body.login-page {
        padding: 16px;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.login-page .container {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: visible;
    }

    body.login-page .wave-pattern {
        display: none;
    }

    body.login-page .left-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        padding: 30px 20px;
        gap: 20px;
    }

    body.login-page .logo-section {
        justify-content: center;
    }

    body.login-page .logo-text {
        width: auto;
        text-align: center;
    }

    body.login-page .features {
        gap: 16px;
    }

    body.login-page .feature-item {
        justify-content: center;
    }

    body.login-page .feature-text {
        width: auto;
        text-align: center;
    }

    body.login-page .login-card {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        margin: 0;
        border-radius: 0 0 16px 16px;
        padding: 30px 20px;
    }

    body.login-page .login-header {
        margin-bottom: 24px;
    }

    body.login-page .login-form {
        padding: 0;
        gap: 14px;
    }

    body.login-page .form-group {
        width: 100%;
    }

    body.login-page .forgot-password {
        text-align: right;
        margin-top: -4px;
    }

    body.login-page .login-captcha-section {
        margin-top: 0;
        margin-bottom: 0;
    }

    body.login-page .captcha-row {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Tablet and below (768px) */
@media (max-width: 768px) {
    body.login-page {
        padding: 16px;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.login-page .container {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: visible;
    }

    body.login-page .wave-pattern {
        display: none;
    }

    body.login-page .left-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        padding: 30px 20px;
        gap: 20px;
    }

    body.login-page .logo-section {
        justify-content: center;
    }

    body.login-page .logo-text {
        width: auto;
        text-align: center;
    }

    body.login-page .features {
        gap: 16px;
    }

    body.login-page .feature-item {
        justify-content: center;
    }

    body.login-page .feature-text {
        width: auto;
        text-align: center;
    }

    body.login-page .login-card {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        margin: 0;
        border-radius: 0 0 16px 16px;
        padding: 30px 20px;
    }

    body.login-page .login-header {
        margin-bottom: 24px;
    }

    body.login-page .login-header h2 {
        font-size: 24px !important;
    }

    body.login-page .login-form {
        padding: 0;
        gap: 14px;
    }

    body.login-page .form-group {
        width: 100%;
    }

    body.login-page .forgot-password {
        text-align: right;
        margin-top: -4px;
    }

    body.login-page .login-captcha-section {
        margin-top: 0;
        margin-bottom: 0;
    }

    body.login-page .captcha-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    body.login-page .captcha-question-box,
    body.login-page .captcha-answer-input {
        width: 100px;
    }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
    body.login-page {
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    body.login-page .container {
        border-radius: 12px;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 0 0 auto;
    }

    body.login-page .left-content {
        padding: 20px 15px;
        gap: 16px;
        display: none;
    }

    body.login-page .logo-icon {
        width: 48px;
        height: 48px;
        padding: 10px;
    }

    body.login-page .logo-icon svg {
        width: 28px;
        height: 28px;
    }

    body.login-page .logo-text h1 {
        font-size: 18px !important;
    }

    body.login-page .logo-text p {
        font-size: 14px;
    }

    body.login-page .feature-icon {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    body.login-page .feature-icon svg {
        width: 18px;
        height: 18px;
    }

    body.login-page .feature-text h3 {
        font-size: 18px !important;
    }

    body.login-page .feature-text p {
        font-size: 14px;
    }

    body.login-page .features {
        gap: 12px;
    }

    body.login-page .login-card {
        padding: 24px 16px;
        border-radius: 12px;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
    }

    body.login-page .login-header {
        margin-bottom: 20px;
    }

    body.login-page .login-header h2 {
        font-size: 22px !important;
    }

    body.login-page .login-header p {
        font-size: 11px;
    }

    body.login-page .login-form {
        gap: 12px;
    }

    body.login-page .input-field {
        height: 44px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0 16px;
    }

    body.login-page .password-wrapper {
        width: 100%;
    }

    body.login-page .toggle-password-icon {
        width: 24px;
        height: 24px;
        right: 12px;
    }

    body.login-page .forgot-password {
        text-align: right;
        margin-top: 4px;
        margin-bottom: 8px;
    }

    body.login-page .forgot-password a {
        font-size: 13px;
    }

    body.login-page .captcha-label {
        font-size: 12px;
        margin-bottom: 6px !important;
    }

    body.login-page .captcha-question-box,
    body.login-page .captcha-answer-input {
        width: 90px;
        height: 40px !important;
    }

    body.login-page .captcha-question-box {
        font-size: 12px !important;
    }

    body.login-page .captcha-equals-sign {
        font-size: 16px;
    }

    body.login-page .login-button {
        height: 44px !important;
        font-size: 16px !important;
        margin-top: 12px;
    }

    body.login-page .reset-password-modal {
        width: 90%;
        max-width: 500px;
        padding: 20px;
    }

    body.login-page .check-inbox-modal {
        width: 90%;
        max-width: 500px;
    }

    body.login-page .modal-captcha-row {
        flex-wrap: wrap;
    }
}

/* Small mobile devices (360px and below) */
@media (max-width: 360px) {
    body.login-page {
        padding: 10px;
    }

    body.login-page .left-content {
        padding: 15px 10px;
    }

    body.login-page .login-card {
        padding: 20px 12px;
        min-width: 0;
    }

    body.login-page .login-header h2 {
        font-size: 20px !important;
    }

    body.login-page .captcha-question-box,
    body.login-page .captcha-answer-input {
        width: 80px;
    }
}

/* Very small mobile (320px and below) */
@media (max-width: 320px) {
    body.login-page {
        padding: 8px;
    }

    body.login-page .login-card {
        padding: 16px 10px;
    }

    body.login-page .login-header h2 {
        font-size: 18px !important;
    }

    body.login-page .captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body.login-page .captcha-question-box,
    body.login-page .captcha-answer-input {
        width: 100%;
        max-width: 100%;
    }
}

/* Additional responsive improvements for login page */
@media (max-width: 768px) {
    body.login-page .reset-password-modal,
    body.login-page .check-inbox-modal {
        width: 90%;
        max-width: 90%;
        margin: 20px;
        padding: 20px;
    }

    body.login-page .modal-captcha-question,
    body.login-page .modal-captcha-input {
        width: 100px;
    }

    body.login-page .modal-captcha-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    body.login-page .toast {
        min-width: 280px;
        max-width: 90%;
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    body.login-page .reset-password-modal,
    body.login-page .check-inbox-modal {
        width: 95%;
        max-width: 95%;
        padding: 16px;
    }

    body.login-page .modal-title {
        font-size: 14px !important;
    }

    body.login-page .modal-description {
        font-size: 11px;
    }

    body.login-page .modal-input-field {
        height: 44px !important;
        font-size: 16px !important;
    }

    body.login-page .modal-captcha-question,
    body.login-page .modal-captcha-input {
        width: 90px;
        height: 40px !important;
    }

    body.login-page .modal-btn {
        height: 44px !important;
        font-size: 14px !important;
        padding: 0 16px;
    }

    body.login-page .toast {
        min-width: auto;
        max-width: 95%;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ============================================
   HEADER LANGUAGE DROPDOWN STYLES
   ============================================ */

.header-language-dropdown {
    position: relative;
    display: inline-block;
}

.header-language-button {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 36px;
    gap: 8px;
    transition: all 0.2s ease;
    height: 34px;
    min-width: 90px;
}

.header-language-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.header-language-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-language-text {
    font-size: 13px;
    color: #333333;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.header-language-arrow {
    margin-left: auto;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.header-language-dropdown.active .header-language-arrow {
    transform: rotate(180deg);
}

.header-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 220px;
    overflow: hidden;
    z-index: 10000;
}

.header-language-dropdown.active .header-language-menu {
    display: block;
}

.header-language-menu-header {
    padding: 16px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.header-language-menu-avatar {
    width: 40px;
    height: 40px;
    background: #fef3e7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e15a11;
}

.header-language-menu-avatar svg {
    width: 20px;
    height: 20px;
}

.header-language-menu-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.header-language-menu-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-language-menu-subtitle {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #666666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-language-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    transition: background 0.15s ease;
    background: white;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.header-language-option:hover {
    background: #f3f4f6;
}

.header-language-option.active {
    background: #fef3e7;
    color: #e15a11;
    font-weight: 500;
}

.header-language-option svg {
    flex-shrink: 0;
    color: #6b7280;
}

.header-language-option.active svg {
    color: #e15a11;
}

/* ============================================
   DASHBOARD CARDS STYLES
   ============================================ */

/* Dashboard card title text - increase font size to 14px */
.dashboard-container [data-i18n="dashboardcasesRecorded"],
.dashboard-container [data-i18n="dashboardopenCases"],
.dashboard-container [data-i18n="dashboardclosedCases"] {
    font-size: 14px !important;
    margin-bottom: 12px !important;
}

/* Increase dashboard card icon sizes */
.dashboard-container .bg-orange-50 svg.w-5,
.dashboard-container .bg-orange-50 svg.h-5 {
    width: 24px !important;
    height: 24px !important;
}

/* Increase icon container size for better proportion */
.dashboard-container .bg-orange-50.w-10 {
    width: 44px !important;
    height: 44px !important;
}

/* ============================================
   PAGE HEADER TITLES - MATCH SIDEBAR NAV (font-weight: 500)
   ============================================ */

/* Make all page header titles match sidebar nav font weight (500) - Override all existing font-weight values */
.header-page-title {
    font-weight: 500 !important;
}

.directory-title,
h1.directory-title {
    font-weight: 500 !important;
}

.focal-point-section-title,
h2.focal-point-section-title {
    font-weight: 500 !important;
}

.modal-section-title {
    font-weight: 500 !important;
}

/* Override any bold/semibold classes on page titles */
.header-page-title.font-bold,
.header-page-title.font-semibold,
.directory-title.font-bold,
.directory-title.font-semibold,
h1.directory-title.font-bold,
h1.directory-title.font-semibold,
.focal-point-section-title.font-bold,
.focal-point-section-title.font-semibold,
h2.focal-point-section-title.font-bold,
h2.focal-point-section-title.font-semibold,
.modal-section-title.font-bold,
.modal-section-title.font-semibold {
    font-weight: 500 !important;
}

/* Page title headings (h1, h2 used as page titles) */
h2[data-i18n="caseActionsReferquestionTitle"],
h2[data-i18n="dashboardgbvSituation"],
h2.font-semibold.text-\[#1F2937\],
h3[data-i18n="dashboardannualTrend"],
h3.font-semibold.text-\[#1F2937\] {
    font-weight: 500 !important;
}

/* Dashboard section headings - 14px font size */
h2[data-i18n="dashboardgbvSituation"],
h2[data-i18n="dashboardtreatment"],
h2[data-i18n="dashboardsurvivorProfile"] {
    font-size: 14px !important;
}

/* GBV Situation section - all three titles 14px */


/* Open Cases Card - Change orange to red */
/* Target the number value */
#openCasesValue {
    color: #ef4444 !important; /* red-500 */
}

/* Target the card container - Open Cases card has border-l-orange-500 and contains openCasesValue */
.border-l-orange-500.border-l-4:has([data-i18n="dashboardopenCases"]),
.border-l-orange-500.border-l-4:has(#openCasesValue) {
    border-left-color: #ef4444 !important; /* red-500 */
}

/* Target icon container background in Open Cases card */
.border-l-orange-500:has([data-i18n="dashboardopenCases"]) .bg-orange-50,
.border-l-orange-500:has(#openCasesValue) .bg-orange-50 {
    background-color: #fef2f2 !important; /* red-50 */
}

/* Target icon SVG color in Open Cases card */
.border-l-orange-500:has([data-i18n="dashboardopenCases"]) svg.text-orange-500,
.border-l-orange-500:has(#openCasesValue) svg.text-orange-500 {
    color: #ef4444 !important; /* red-500 */
}

/* Closed Cases Card - Change orange to green */
/* Target the number value */
#closedCasesValue {
    color: #22c55e !important; /* green-500 */
}

/* Target the card container - Closed Cases card has border-l-orange-500 and contains closedCasesValue */
.border-l-orange-500.border-l-4:has([data-i18n="dashboardclosedCases"]),
.border-l-orange-500.border-l-4:has(#closedCasesValue) {
    border-left-color: #22c55e !important; /* green-500 */
}

/* Target icon container background in Closed Cases card */
.border-l-orange-500:has([data-i18n="dashboardclosedCases"]) .bg-orange-50,
.border-l-orange-500:has(#closedCasesValue) .bg-orange-50 {
    background-color: #f0fdf4 !important; /* green-50 */
}

/* Target icon SVG color in Closed Cases card */
.border-l-orange-500:has([data-i18n="dashboardclosedCases"]) svg.text-orange-500,
.border-l-orange-500:has(#closedCasesValue) svg.text-orange-500 {
    color: #22c55e !important; /* green-500 */
}

/* Chart labels - make all labels regular weight (not bold) */
canvas[data-chartjs] *,
canvas * {
    font-weight: normal !important;
}

/* ECharts labels - target any text elements */
.dashboard-container canvas,
.dashboard-container svg text {
    font-weight: normal !important;
}

/* Section headings in dashboard and other pages */
/*.bg-white.border-b.border-orange-500 h2,
.bg-white.border.border-\[#E5E7EB\] h3 {
    font-weight: 500 !important;
}

/* ============================================
   DIRECTORY CARDS STYLES (Match Dashboard)
   ============================================ */

/* Directory card title text - match dashboard (14px) */
[data-i18n="directoryjustice"],
[data-i18n="directorysocial"],
[data-i18n="directoryhealth"] {
    font-size: 14px !important;
    margin-bottom: 12px !important;
}

/* Directory card number font size - 16px */
.bg-white.border.border-gray-200.border-l-4 .text-lg.font-semibold.text-orange-500,
.bg-white.border.border-gray-200.border-l-4 .text-xl.font-semibold.text-orange-500 {
    font-size: 16px !important;
}

/* Directory card icon sizes - match dashboard (24px) */
.category-icon,
.bg-orange-50 img.category-icon {
    width: 24px !important;
    height: 24px !important;
}

/* Directory icon container size - match dashboard (44px) */
.bg-orange-50.w-12,
.bg-orange-50.w-10 {
    width: 44px !important;
    height: 44px !important;
}

/* ============================================
   DFA HELP BUTTON STYLES
   ============================================ */

/* Help Button - Match Language Button Style */
.dfa-help-button {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    height: 36px !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    height: 34px !important;
    min-width: 90px !important;
    box-shadow: none !important;
    transform: none !important;
}

.dfa-help-button:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.dfa-help-button:active {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    transform: none !important;
}

.dfa-help-button:focus {
    outline: none !important;
    border-color: #9ca3af !important;
}

.dfa-help-button svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

.dfa-help-button svg circle {
    fill: #ffffff !important;
    stroke: #e15a11 !important;
    stroke-width: 2 !important;
}

.dfa-help-button svg path,
.dfa-help-button svg line {
    stroke: #e15a11 !important;
    stroke-width: 2 !important;
    fill: none !important;
}

.dfa-help-button-text {
    font-size: 13px !important;
    color: #333333 !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
}

/* ============================================
   EDIT CASE PAGE STYLES
   ============================================ */

/* Edit case page specific body styles */
body.edit-case-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #333333;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Main Content - Edit Case specific */
body.edit-case-page .main-content {
    background-color: #f8f9fa;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    width: calc(100% - 240px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.edit-case-page .main-content {
        padding: 14px;
    }
}

/* Page Navigation (Back Button and Breadcrumb) */
body.edit-case-page .page-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}


body.edit-case-page .breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

body.edit-case-page .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

body.edit-case-page .breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

body.edit-case-page .breadcrumb-link:hover {
    color: #e15a11;
}

body.edit-case-page .breadcrumb-separator {
    color: #d1d5db;
    flex-shrink: 0;
}

body.edit-case-page .breadcrumb-current {
    color: #e15a11;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Container */
body.edit-case-page .form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

/* Tabs Wrapper for edit case page */
body.edit-case-page .tabs-wrapper {
    position: relative;
    width: 100%;
}

/* Tabs Navigation */
body.edit-case-page .tabs-nav {
    display: flex;
    border-bottom: none;
    background: #ffebe2;
    padding: 0;
    height: 58px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
}


body.edit-case-page .tabs-nav::-webkit-scrollbar {
    height: 1px;
}

body.edit-case-page .tabs-nav::-webkit-scrollbar-track {
    background: transparent;
}

body.edit-case-page .tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 0.5px;
}

body.edit-case-page .tabs-container::-webkit-scrollbar {
    height: 1px;
}

body.edit-case-page .tabs-container::-webkit-scrollbar-track {
    background: transparent;
}

body.edit-case-page .tabs-container::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 0.5px;
}

body.edit-case-page .tab-button {
    flex: 0 1 auto;
    min-width: max-content;
    padding: 14px 24px;
    height: 58px;
    border-radius: 0;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    position: relative;
    outline: none;
    color: #6b7280;
    border-bottom: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

body.edit-case-page .tab-button:last-child {
    border-right: none;
}

body.edit-case-page .tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

body.edit-case-page .tab-button:hover {
    color: #e15a11;
    background: rgba(225, 90, 17, 0.05);
    background: rgba(255, 255, 255, 0.5);
}

body.edit-case-page .tab-button.active {
    background: transparent;
    color: #e15a11;
}

body.edit-case-page .tab-button.active::after {
    background: #e15a11;
    bottom: -3px;
}

/* Tab Content */
body.edit-case-page .tab-content {
    display: none;
    padding: 22px;
    overflow: visible;
}

body.edit-case-page .tab-content.active {
    display: block;
}

/* Override for grid-layout tabs */
body.edit-case-page .tab-content.grid-layout.active {
    display: grid;
}

/* Form Fields */
body.edit-case-page .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

body.edit-case-page .form-row.full-width {
    grid-template-columns: 1fr;
}

body.edit-case-page .form-row.conditional-row {
    margin-bottom: 0;
    margin-top: -24px;
}

body.edit-case-page .form-group {
    display: flex;
    flex-direction: column;
}

body.edit-case-page .form-group.hidden {
    display: none !important;
}

body.edit-case-page .form-group.full-width {
    grid-column: 1 / -1;
}

/* Tab content as grid container (for restructured tabs like Tab 1) */
body.edit-case-page .tab-content.grid-layout.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

body.edit-case-page .tab-content.grid-layout .form-group {
    margin-bottom: 0;
}

body.edit-case-page .tab-content.grid-layout .section-header {
    grid-column: 1 / -1;
    margin: 32px 0 16px 0;
    background: transparent;
}

body.edit-case-page .tab-content.grid-layout .section-header:first-child {
    margin-top: 0;
}

body.edit-case-page .form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

body.edit-case-page .form-label.required::after {
    content: ' *';
    color: #ef4444;
}

body.edit-case-page .form-input,
body.edit-case-page .form-select,
body.edit-case-page .form-textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: white;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

body.edit-case-page .form-input:focus,
body.edit-case-page .form-select:focus,
body.edit-case-page .form-textarea:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

body.edit-case-page .form-input::placeholder,
body.edit-case-page .form-textarea::placeholder {
    color: #9ca3af;
}

body.edit-case-page .form-textarea {
    min-height: 120px;
    resize: vertical;
}

body.edit-case-page .form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-left: 12px !important;
    padding-right: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.edit-case-page .form-input:disabled,
body.edit-case-page .form-select:disabled,
body.edit-case-page .form-textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Section Headers */
body.edit-case-page .section-header {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 32px 0 16px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
    height: auto;
}

body.edit-case-page .section-header:first-child {
    margin-top: 0;
}


/* Survivor field with inline button */
body.edit-case-page .survivor-field-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body.edit-case-page .survivor-field-wrapper .searchable-select-wrapper {
    flex: 1;
}

/* Form Actions */
body.edit-case-page .form-actions {
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

body.edit-case-page .btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.edit-case-page .btn-primary {
    background: #e15a11;
    color: white;
}

body.edit-case-page .btn-primary:hover {
    background: #c14d0e;
}

body.edit-case-page .btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

body.edit-case-page .btn-secondary:hover {
    background: #f9fafb;
}

body.edit-case-page .nav-buttons {
    display: flex;
    gap: 12px;
}

/* Helper Text */
body.edit-case-page .helper-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Modal Styles - Edit Case specific */
body.edit-case-page .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

body.edit-case-page .modal.active {
    display: flex;
}

body.edit-case-page .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.edit-case-page .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.edit-case-page .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

body.edit-case-page .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

body.edit-case-page .modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

body.edit-case-page .modal-body {
    padding: 24px;
}

body.edit-case-page .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Phone Validation Styles */
body.edit-case-page .phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

body.edit-case-page .phone-input-wrapper .form-input {
    padding-right: 35px;
}

body.edit-case-page .phone-validation-icon {
    position: absolute;
    right: 10px;
    font-size: 16px;
}

body.edit-case-page .phone-validation-icon.valid::after {
    content: '✓';
    color: #28a745;
}

body.edit-case-page .phone-validation-icon.invalid::after {
    content: '✗';
    color: #dc3545;
}

body.edit-case-page .phone-hint {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

body.edit-case-page .phone-error {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

body.edit-case-page .form-input.phone-valid {
    border-color: #28a745 !important;
}

body.edit-case-page .form-input.phone-invalid {
    border-color: #dc3545 !important;
}

/* Searchable Select */
body.edit-case-page .searchable-select-wrapper {
    position: relative;
}

body.edit-case-page .searchable-select-input {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    color: #374151;
    background: white;
    cursor: pointer;
}

body.edit-case-page .searchable-select-input:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

body.edit-case-page .searchable-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.edit-case-page .searchable-select-dropdown.active {
    display: block;
}

body.edit-case-page .searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background 0.1s;
}

body.edit-case-page .searchable-select-option:hover {
    background: #f3f4f6;
}

body.edit-case-page .searchable-select-option.selected {
    background: #fef3e8;
    color: #e15a11;
}

body.edit-case-page .searchable-select-no-results {
    padding: 10px 12px;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

body.edit-case-page .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top-color: #e15a11;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Checkbox and Radio Button Styling - Edit Case specific */
body.edit-case-page input[type="checkbox"],
body.edit-case-page input[type="radio"] {
    cursor: pointer;
    accent-color: #e15a11;
}

body.edit-case-page input[type="checkbox"]:focus,
body.edit-case-page input[type="radio"]:focus {
    outline: 2px solid #e15a11;
    outline-offset: 2px;
}

/* Toast Notification Styles - Edit Case specific */
body.edit-case-page .toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    transform: translateX(500px);
    opacity: 0;
    transition: all 0.3s ease;
}

body.edit-case-page .toast.show {
    transform: translateX(0);
    opacity: 1;
}

body.edit-case-page .toast.success {
    border-left: 4px solid #10b981;
}

body.edit-case-page .toast.error {
    border-left: 4px solid #ef4444;
}

body.edit-case-page .toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

body.edit-case-page .toast.success .toast-icon {
    color: #10b981;
}

body.edit-case-page .toast.error .toast-icon {
    color: #ef4444;
}

body.edit-case-page .toast-content {
    flex: 1;
}

body.edit-case-page .toast-message {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

body.edit-case-page .toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

body.edit-case-page .toast-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Responsive - Edit Case */
@media (max-width: 768px) {
    body.edit-case-page .main-wrapper {
        margin-left: 0;
    }

    body.edit-case-page .content-wrapper {
        padding: 20px 16px;
    }

    body.edit-case-page .form-row {
        grid-template-columns: 1fr;
    }

    body.edit-case-page .tabs-nav {
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
        width: 100%;
        max-width: 100%;
    }

    body.edit-case-page .tabs-nav::-webkit-scrollbar {
        height: 1px;
    }

    body.edit-case-page .tabs-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    body.edit-case-page .tabs-nav::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.3);
        border-radius: 0.5px;
    }

    body.edit-case-page .tabs-container {
        height: 58px;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
    }

    body.edit-case-page .tabs-container::-webkit-scrollbar {
        height: 1px;
    }

    body.edit-case-page .tabs-container::-webkit-scrollbar-track {
        background: transparent;
    }

    body.edit-case-page .tabs-container::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.3);
        border-radius: 0.5px;
    }

    body.edit-case-page .tab-button {
        padding: 12px 16px;
        height: 58px;
        font-size: 13px;
        white-space: nowrap;
        min-width: max-content;
        flex-shrink: 0;
    }

    body.edit-case-page .tab-content {
        padding: 24px 16px;
    }

    body.edit-case-page .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    body.edit-case-page .nav-buttons {
        flex-direction: column;
        width: 100%;
    }

    body.edit-case-page .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    body.edit-case-page .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    body.edit-case-page .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    body.edit-case-page .section-header {
        font-size: 15px;
        margin: 24px 0 12px 0;
        background: transparent;
    }

    body.edit-case-page .form-label {
        font-size: 13px;
    }

    body.edit-case-page .form-input,
    body.edit-case-page .form-select,
    body.edit-case-page .form-textarea {
        font-size: 14px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    body.edit-case-page .tabs-nav {
        padding: 0 8px;
    }

    body.edit-case-page .tab-button {
        padding: 12px 12px;
        font-size: 12px;
    }

    body.edit-case-page .tab-content {
        padding: 16px 12px;
    }

    body.edit-case-page .content-wrapper {
        padding: 16px 12px;
    }
}

/* ============================================
   CREATE CASE PAGE STYLES
   ============================================ */

/* Create case page specific body styles */
body.create-case-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #333333;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Main Content - Create Case specific */
body.create-case-page .main-content {
    background-color: #f8f9fa;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

/* Create Case Page - scrollbar hidden (consistent with dashboard) */
body.create-case-page .main-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.create-case-page .main-content::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    body.create-case-page .main-content {
        padding: 14px;
    }
}

/* Page Navigation (Back Button and Breadcrumb) */
body.create-case-page .page-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}


body.create-case-page .breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

body.create-case-page .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

body.create-case-page .breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

body.create-case-page .breadcrumb-link:hover {
    color: #e15a11;
}

body.create-case-page .breadcrumb-separator {
    color: #d1d5db;
    flex-shrink: 0;
}

body.create-case-page .breadcrumb-current {
    color: #e15a11;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Container */
body.create-case-page .form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

/* Add Document Page - User Information Title */
body.add-document-page h3[data-i18n="addDocumentUserInformation"],
body.add-document-page .bg-white.rounded-\[10px\] h3 {
    font-size: 14px !important;
}

/* Tabs Wrapper for create case page */
body.create-case-page .tabs-wrapper {
    position: relative;
    width: 100%;
}

/* Tabs Container for create case page */
body.create-case-page .tabs-container {
    height: 58px;
}

/* Tabs Navigation */
body.create-case-page .tabs-nav {
    display: flex;
    border-bottom: none;
    background: #ffebe2;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
}


body.create-case-page .tabs-nav::-webkit-scrollbar {
    height: 1px;
}

body.create-case-page .tabs-nav::-webkit-scrollbar-track {
    background: transparent;
}

body.create-case-page .tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 0.5px;
}

body.create-case-page .tabs-container::-webkit-scrollbar {
    height: 1px;
}

body.create-case-page .tabs-container::-webkit-scrollbar-track {
    background: transparent;
}

body.create-case-page .tabs-container::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 0.5px;
}

body.create-case-page .tab-button {
    flex: 0 1 auto;
    min-width: max-content;
    padding: 14px 24px;
    height: 58px;
    border-radius: 0;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    position: relative;
    outline: none;
    color: #6b7280;
    border-bottom: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

body.create-case-page .tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

body.create-case-page .tab-button:hover {
    color: #e15a11;
    background: rgba(225, 90, 17, 0.05);
    background: rgba(255, 255, 255, 0.5);
}

body.create-case-page .tab-button.active {
    background: transparent;
    color: #e15a11;
}

body.create-case-page .tab-button.active::after {
    background: #e15a11;
    bottom: -3px;
}

/* Tab Content */
body.create-case-page .tab-content {
    display: none;
    padding: 22px;
    overflow: visible;
}

body.create-case-page .tab-content.active {
    display: block;
}

/* Override for grid-layout tabs */
body.create-case-page .tab-content.grid-layout.active {
    display: grid;
}

/* Form Fields */
body.create-case-page .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

body.create-case-page .form-row.full-width {
    grid-template-columns: 1fr;
}

body.create-case-page .form-row.conditional-row {
    margin-bottom: 0;
    margin-top: -24px;
}

body.create-case-page .form-group {
    display: flex;
    flex-direction: column;
}

body.create-case-page .form-group.hidden {
    display: none !important;
}

body.create-case-page .form-group.full-width {
    grid-column: 1 / -1;
}

/* Tab content as grid container (for restructured tabs like Tab 1) */
body.create-case-page .tab-content.grid-layout.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

body.create-case-page .tab-content.grid-layout .form-group {
    margin-bottom: 0;
}

body.create-case-page .tab-content.grid-layout .section-header {
    grid-column: 1 / -1;
    margin: 32px 0 16px 0;
    background: transparent;
}

body.create-case-page .tab-content.grid-layout .section-header:first-child {
    margin-top: 0;
}

body.create-case-page .form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

body.create-case-page .form-label.required::after {
    content: ' *';
    color: #ef4444;
}

body.create-case-page .form-input,
body.create-case-page .form-select,
body.create-case-page .form-textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: white;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

body.create-case-page .form-input:focus,
body.create-case-page .form-select:focus,
body.create-case-page .form-textarea:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

body.create-case-page .form-input::placeholder,
body.create-case-page .form-textarea::placeholder {
    color: #9ca3af;
}

body.create-case-page .form-textarea {
    min-height: 120px;
    resize: vertical;
}

body.create-case-page .form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-left: 12px !important;
    padding-right: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.create-case-page .form-input:disabled,
body.create-case-page .form-select:disabled,
body.create-case-page .form-textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Custom dropdown styling for create case page - match form-select appearance */
body.create-case-page .create-case-dropdown {
    width: 100%;
    /* Remove any wrapper styling that might create nested boxes */
    border: none;
    padding: 0;
    margin: 0;
}

body.create-case-page .create-case-dropdown .custom-dropdown-button {
    width: 100%;
    padding: 10px 12px !important;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font-family-primary);
    color: #374151;
    background: white;
    /* Remove background-image arrow - custom dropdown has its own arrow icon */
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s;
    box-sizing: border-box;
    /* Override default height from custom-dropdown.css to match form-input */
    height: 30px;
    min-height: unset !important;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.create-case-page .create-case-dropdown .custom-dropdown-button:hover {
    border-color: #9ca3af;
    background-color: #fafafa;
}

body.create-case-page .create-case-dropdown .custom-dropdown-button:focus,
body.create-case-page .create-case-dropdown.active .custom-dropdown-button {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

body.create-case-page .create-case-dropdown .custom-dropdown-button.placeholder {
    color: #9ca3af;
    max-height: 30px;
}

/* Section Headers */
body.create-case-page .section-header {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 32px 0 16px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
    height: auto;
}

body.create-case-page .section-header:first-child {
    margin-top: 0;
}


/* Survivor field with inline button */
body.create-case-page .survivor-field-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body.create-case-page .survivor-field-wrapper .searchable-select-wrapper {
    flex: 1;
}

/* Form Actions */
body.create-case-page .form-actions {
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

body.create-case-page .btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.create-case-page .btn-primary {
    background: #e15a11;
    color: white;
}

body.create-case-page .btn-primary:hover {
    background: #c14d0e;
}

body.create-case-page .btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

body.create-case-page .btn-secondary:hover {
    background: #f9fafb;
}

body.create-case-page .nav-buttons {
    display: flex;
    gap: 12px;
}

/* Helper Text */
body.create-case-page .helper-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Modal Styles - Create Case specific */
body.create-case-page .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

body.create-case-page .modal.active {
    display: flex;
}

body.create-case-page .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.create-case-page .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.create-case-page .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

body.create-case-page .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

body.create-case-page .modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

body.create-case-page .modal-body {
    padding: 24px;
}

body.create-case-page .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Searchable Select */
body.create-case-page .searchable-select-wrapper {
    position: relative;
}

body.create-case-page .searchable-select-input {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    color: #374151;
    background: white;
    cursor: pointer;
}

body.create-case-page .searchable-select-input:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.1);
}

body.create-case-page .searchable-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.create-case-page .searchable-select-dropdown.active {
    display: block;
}

body.create-case-page .searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background 0.1s;
}

body.create-case-page .searchable-select-option:hover {
    background: #f3f4f6;
}

body.create-case-page .searchable-select-option.selected {
    background: #fef3e8;
    color: #e15a11;
}

body.create-case-page .searchable-select-no-results {
    padding: 10px 12px;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

body.create-case-page .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top-color: #e15a11;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Checkbox and Radio Button Styling - Create Case specific */
body.create-case-page input[type="checkbox"],
body.create-case-page input[type="radio"] {
    cursor: pointer;
    accent-color: #e15a11;
}

body.create-case-page input[type="checkbox"]:focus,
body.create-case-page input[type="radio"]:focus {
    outline: 2px solid #e15a11;
    outline-offset: 2px;
}

/* Toast Notification Styles - Create Case specific */
body.create-case-page .toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    transform: translateX(500px);
    opacity: 0;
    transition: all 0.3s ease;
}

body.create-case-page .toast.show {
    transform: translateX(0);
    opacity: 1;
}

body.create-case-page .toast.success {
    border-left: 4px solid #10b981;
}

body.create-case-page .toast.error {
    border-left: 4px solid #ef4444;
}

body.create-case-page .toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

body.create-case-page .toast.success .toast-icon {
    color: #10b981;
}

body.create-case-page .toast.error .toast-icon {
    color: #ef4444;
}

body.create-case-page .toast-content {
    flex: 1;
}

body.create-case-page .toast-message {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

body.create-case-page .toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

body.create-case-page .toast-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Responsive - Create Case */
@media (max-width: 768px) {
    body.create-case-page .main-wrapper {
        margin-left: 0;
    }

    body.create-case-page .content-wrapper {
        padding: 20px 16px;
    }

    body.create-case-page .form-row {
        grid-template-columns: 1fr;
    }

    body.create-case-page .tabs-nav {
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
    }

    body.create-case-page .tabs-nav::-webkit-scrollbar {
        height: 1px;
    }

    body.create-case-page .tabs-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    body.create-case-page .tabs-nav::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.3);
        border-radius: 0.5px;
    }

    body.create-case-page .tabs-container {
        height: 58px;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
    }

    body.create-case-page .tabs-container::-webkit-scrollbar {
        height: 1px;
    }

    body.create-case-page .tabs-container::-webkit-scrollbar-track {
        background: transparent;
    }

    body.create-case-page .tabs-container::-webkit-scrollbar-thumb {
        background: rgba(156, 163, 175, 0.3);
        border-radius: 0.5px;
    }

    body.create-case-page .tab-button {
        padding: 12px 16px;
        height: 58px;
        font-size: 13px;
        white-space: nowrap;
        min-width: max-content;
        flex-shrink: 0;
    }

    body.create-case-page .tab-content {
        padding: 24px 16px;
    }

    body.create-case-page .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    body.create-case-page .nav-buttons {
        flex-direction: column;
        width: 100%;
    }

    body.create-case-page .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    body.create-case-page .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    body.create-case-page .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    body.create-case-page .section-header {
        font-size: 15px;
        margin: 24px 0 12px 0;
        background: transparent;
    }

    body.create-case-page .form-label {
        font-size: 13px;
    }

    body.create-case-page .form-input,
    body.create-case-page .form-select,
    body.create-case-page .form-textarea {
        font-size: 14px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    body.create-case-page .tabs-nav {
        padding: 0 8px;
    }

    body.create-case-page .tab-button {
        padding: 12px 12px;
        font-size: 12px;
    }

    body.create-case-page .tab-content {
        padding: 16px 12px;
    }

    body.create-case-page .content-wrapper {
        padding: 16px 12px;
    }
}

/* ============================================
   CLASSIFY CASE PAGE STYLES
   ============================================ */

/* Classify case page specific body styles */
body.classify-case-page {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Main Content - Classify Case specific (reuses same styles as edit/create) */
body.classify-case-page .main-content {
    background-color: #f8f9fa;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    width: calc(100% - 240px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.classify-case-page .main-content {
        padding: 14px;
    }
}

/* Page Navigation - Classify Case (reuses same styles as edit/create) */
body.classify-case-page .page-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}


body.classify-case-page .breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

body.classify-case-page .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

body.classify-case-page .breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

body.classify-case-page .breadcrumb-link:hover {
    color: #e15a11;
}

body.classify-case-page .breadcrumb-separator {
    color: #d1d5db;
    flex-shrink: 0;
}

body.classify-case-page .breadcrumb-current {
    color: #e15a11;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Label - Classify Case specific (unique color) */
body.classify-case-page .form-label {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #666666;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* Form Input and Textarea - Classify Case specific (unique focus color) */
body.classify-case-page .form-input,
body.classify-case-page .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    color: #333333;
    outline: none;
    transition: border-color 0.2s;
}

body.classify-case-page .form-input:focus,
body.classify-case-page .form-textarea:focus {
    border-color: #e15a11;
}

body.classify-case-page .form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons - Classify Case specific (unique colors) */
body.classify-case-page .btn-primary {
    background: #e15a11;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

body.classify-case-page .btn-primary:hover {
    background: #c94e0e;
}

body.classify-case-page .btn-secondary {
    background: white;
    color: #e15a11;
    padding: 10px 24px;
    border: 2px solid #e15a11;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

body.classify-case-page .btn-secondary:hover {
    background: #fff5ee;
}

/* ============================================
   ADD PERMISSION PAGE STYLES
   ============================================ */

/* Dropdown arrow styles for add permission page */
body.add-permission-page select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394979E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ============================================
   ADD DOCUMENT PAGE STYLES
   ============================================ */

/* Custom Year Picker Styles */
body.add-document-page .year-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: none;
    z-index: 1000;
}

body.add-document-page .year-picker-dropdown.active {
    display: block;
}

body.add-document-page .year-picker-item.selected {
    background: #e15a11;
    color: white;
    font-weight: 600;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

body.add-document-page .file-upload-success-icon {
    display: none;
    animation: scaleIn 0.3s ease;
}

body.add-document-page .file-name.has-file .file-upload-success-icon {
    display: inline-block;
}

/* ============================================
   EDIT DOCUMENT PAGE STYLES
   ============================================ */

/* Custom Year Picker Styles - Same as Add Document Page */
body.edit-document-page .year-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: none;
    z-index: 1000;
}

body.edit-document-page .year-picker-dropdown.active {
    display: block;
}

body.edit-document-page .year-picker-item.selected {
    background: #e15a11;
    color: white;
    font-weight: 600;
}

body.edit-document-page .file-upload-success-icon {
    display: none;
    animation: scaleIn 0.3s ease;
}

body.edit-document-page .file-name.has-file .file-upload-success-icon {
    display: inline-block;
}

body.edit-document-page .year-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

body.edit-document-page .year-picker-item {
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
    border: 1px solid transparent;
    transition: all 0.2s;
}

body.edit-document-page .year-picker-item:hover {
    background: #fef3e7;
    border-color: #e15a11;
    color: #e15a11;
}

body.edit-document-page .year-picker-item.selected {
    background: #e15a11;
    color: white;
    font-weight: 600;
}

body.edit-document-page .date-input-wrapper {
    position: relative;
}

/* ============================================
   PROFILE CASE PAGE STYLES
   ============================================ */

/* Profile Case page specific body styles */
body.profile-case-page {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Font utility classes - can be shared globally */
.font-poppins,
.font-inter,
.font-segoe {
    font-family: 'Segoe UI', sans-serif;
}

/* Tab Styles - Profile Case specific */
body.profile-case-page .profile-tabs-container {
    background-color: #e15a11;
    padding: 2px;
    border-radius: 8px;
    display: flex;
    margin-bottom: 24px;
    overflow-x: auto;
}

body.profile-case-page .profile-tab-button {
    flex: 1;
    min-width: 150px;
    padding: 4px 20px;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

body.profile-case-page .profile-tab-button:last-child {
    border-right: none;
}

body.profile-case-page .profile-tab-button.active {
    background-color: white;
    color: #000000;
}

body.profile-case-page .profile-tab-button:not(.active) {
    background-color: #e15a11;
    color: white;
}

body.profile-case-page .profile-tab-button:not(.active):hover {
    background-color: #c74d0e;
}

@media (max-width: 768px) {
    body.profile-case-page .profile-tab-button {
        font-size: 14px;
        padding: 4px 16px;
        min-width: 120px;
    }
}

body.profile-case-page .profile-tab-content {
    display: none;
}

body.profile-case-page .profile-tab-content.active {
    display: block;
}

/* Consent Tab Styles - Profile Case specific */
body.profile-case-page .consent-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}

body.profile-case-page .consent-statement {
    background: #fef3e8;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
}

body.profile-case-page .consent-points {
    margin-bottom: 24px;
}

body.profile-case-page .consent-points ol {
    margin: 0;
    padding-left: 24px;
}

body.profile-case-page .consent-points li {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
}

body.profile-case-page .consent-service-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    background-color: rgba(248, 249, 250, 0.51);
    border-radius: 6px;
    margin-bottom: 12px;
    min-height: 48px;
    height: auto;
}

/* Consent form authorization sections - grey backgrounds */
body.profile-case-page .consent-section div[style*="background: #f9fafb"],
body.profile-case-page .consent-section div[style*="background:#f9fafb"] {
    padding: 12px 24px !important;
}

body.profile-case-page .consent-section div[style*="background: #f9fafb"] > div,
body.profile-case-page .consent-section div[style*="background:#f9fafb"] > div {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 100% !important;
}

body.profile-case-page .consent-service-label {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1f2937;
    min-width: 200px;
    flex-shrink: 0;
}

body.profile-case-page .consent-service-value {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #333333;
}

body.profile-case-page .consent-medical-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Profile case page - Make all answer values font-weight 500 and ensure consistent gap */
/* Target all answer values in profile sections - font-weight 500 */
body.profile-case-page .profile-tab-content span.font-medium,
body.profile-case-page .profile-tab-content .font-medium,
body.profile-case-page .profile-tab-content span.text-\[#333333\].text-sm.font-medium,
body.profile-case-page .profile-tab-content .text-\[#333333\].text-sm.font-medium {
    font-weight: 500 !important; /* Medium weight for all answers */
}

/* Ensure consistent gap between label and answer (mb-1.5 = 6px) - same as summary */
body.profile-case-page .profile-tab-content .mb-1\.5,
body.profile-case-page .profile-tab-content span.mb-1\.5 {
    margin-bottom: 6px !important;
}

body.profile-case-page .consent-medical-item:last-child {
    border-bottom: none;
}

body.profile-case-page .consent-medical-question {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 8px;
}

body.profile-case-page .consent-medical-answer {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

/* Consent and Suivi Medical: text is always black, never orange */
body.profile-case-page .consent-auth-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* ============================================
   SUIVI MEDICAL PAGE STYLES
   ============================================ */

/* Suivi Medical page specific body styles */
body.suivi-medical-page {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Form Styles - Suivi Medical specific */
body.suivi-medical-page .form-label {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-subtitle);
    color: #666666;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

body.suivi-medical-page .form-input,
body.suivi-medical-page .form-textarea,
body.suivi-medical-page .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: var(--font-size-normal);
    font-family: var(--font-family-primary);
    color: #333333;
    outline: none;
    transition: border-color 0.2s;
}

body.suivi-medical-page .form-input:focus,
body.suivi-medical-page .form-textarea:focus,
body.suivi-medical-page .form-select:focus {
    border-color: #e15a11;
}

body.suivi-medical-page .form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles - Suivi Medical specific */
body.suivi-medical-page .btn-primary {
    background: #e15a11;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-subtitle);
    font-family: var(--font-family-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

body.suivi-medical-page .btn-primary:hover {
    background: #c94e0e;
}

body.suivi-medical-page .btn-secondary {
    background: white;
    color: #e15a11;
    padding: 10px 24px;
    border: 2px solid #e15a11;
    border-radius: 6px;
    font-size: var(--font-size-subtitle);
    font-family: var(--font-family-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.suivi-medical-page .btn-secondary:hover {
    background: #fff5ee;
}

/* Section Styles - Suivi Medical specific */
body.suivi-medical-page .section-header {
    background-color: white;
    border-left: 4px solid #e15a11;
    padding: 12px 16px;
    font-family: var(--font-family-primary);
    font-weight: 600;
    font-size: var(--font-size-title);
    color: #333333;
    margin-bottom: 0;
}

body.suivi-medical-page .section-content {
    background: white;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-top: none;
    margin-bottom: 16px;
}

/* Radio Group Styles - Suivi Medical specific */
body.suivi-medical-page .radio-group {
    display: flex;
    gap: 24px;
    align-items: center;
}

body.suivi-medical-page .radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-subtitle);
    color: #333333;
}

body.suivi-medical-page .radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e15a11;
}

/* Treatment Table Styles - Suivi Medical specific */
body.suivi-medical-page .treatment-table {
    width: 100%;
    border-collapse: collapse;
}

body.suivi-medical-page .treatment-table thead th {
    background-color: #e15a11;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-family-primary);
    font-weight: 600;
    font-size: var(--font-size-subtitle);
}

body.suivi-medical-page .treatment-table thead th:nth-child(2),
body.suivi-medical-page .treatment-table thead th:nth-child(3) {
    text-align: center;
    width: 80px;
}

body.suivi-medical-page .treatment-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-normal);
}

body.suivi-medical-page .treatment-table tbody td:nth-child(2),
body.suivi-medical-page .treatment-table tbody td:nth-child(3) {
    text-align: center;
}

body.suivi-medical-page .treatment-table tbody tr:hover {
    background-color: #fafafa;
}

body.suivi-medical-page .treatment-note-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-normal);
    width: 100%;
    min-width: 200px;
}

body.suivi-medical-page .treatment-note-input:focus {
    outline: none;
    border-color: #e15a11;
}

body.suivi-medical-page .treatment-note-input::placeholder {
    color: #9ca3af;
}

/* Case Info Card - Suivi Medical specific */
body.suivi-medical-page .case-info-text {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-title);
    color: #333333;
    margin-bottom: 4px;
}

/* ============================================
   EMAIL TEMPLATE PAGE STYLES
   ============================================ */

/* Email template page specific body styles */
body.email-template-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #333333;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Main Content - Email Template (reuses same structure as edit/create) */
body.email-template-page .main-content {
    background-color: #f8f9fa;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    width: calc(100% - 240px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.email-template-page .main-content {
        padding: 14px;
    }
}

/* Page Navigation - Email Template (slightly different margin) */
body.email-template-page .page-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}


body.email-template-page .breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

body.email-template-page .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.email-template-page .breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

body.email-template-page .breadcrumb-link:hover {
    color: #e15a11;
}

body.email-template-page .breadcrumb-separator {
    color: #d1d5db;
}

body.email-template-page .breadcrumb-current {
    color: #e15a11;
    font-weight: 500;
}

/* Unique Email Template Styles */
body.email-template-page .content-inner {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

body.email-template-page .form-header {
    background: white;
    border-bottom: 1px solid #eeeeee;
    padding: 20px 24px;
}

body.email-template-page .form-title {
    font-size: 14px !important; 
    font-weight: 600;
    color: #333333;
}

body.email-template-page .form-body {
    padding: 24px;
}

body.email-template-page .form-section {
    margin-bottom: 24px;
}

body.email-template-page .section-divider {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e15a11;
}

body.email-template-page .section-divider:first-of-type {
    margin-top: 0;
}

body.email-template-page .form-group {
    margin-bottom: 20px;
}

body.email-template-page .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
}

body.email-template-page .form-label.required::after {
    content: ' *';
    color: #e15a11;
}

body.email-template-page .form-input,
body.email-template-page .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    background: white;
    transition: border-color 0.2s;
    font-family: 'Segoe UI', sans-serif;
}

body.email-template-page .form-input:focus,
body.email-template-page .form-textarea:focus {
    outline: none;
    border-color: #e15a11;
}

body.email-template-page .form-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

body.email-template-page .form-textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Courier New', monospace;
}

body.email-template-page .form-help {
    font-size: 12px;
    color: #666666;
    margin-top: 4px;
}

body.email-template-page .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.email-template-page .checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Language Tabs */
body.email-template-page .lang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 0;
}

body.email-template-page .lang-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

body.email-template-page .lang-tab:hover:not(:disabled) {
    color: #e15a11;
    background: #fff5f2;
}

body.email-template-page .lang-tab.active {
    color: #e15a11;
    border-bottom-color: #e15a11;
    background: #fff5f2;
}

body.email-template-page .lang-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.email-template-page .language-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: #e3f2fd;
    color: #1976d2;
    margin-left: 6px;
}

body.email-template-page .lang-content {
    display: none;
}

body.email-template-page .lang-content.active {
    display: block;
}

body.email-template-page .help-box {
    background: #f8f9fa;
    border-left: 4px solid #e15a11;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

body.email-template-page .help-box-title {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

body.email-template-page .help-box-content {
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
}

body.email-template-page .help-box code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

body.email-template-page .form-footer {
    background: #f9fafc;
    border-top: 1px solid #eeeeee;
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

body.email-template-page .btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.email-template-page .btn-primary {
    background: #e15a11;
    color: white;
}

body.email-template-page .btn-primary:hover {
    background: #c14d0e;
}

body.email-template-page .btn-secondary {
    background: white;
    color: #333333;
    border: 1px solid #d9d9d9;
}

body.email-template-page .btn-secondary:hover {
    background: #f5f5f5;
}

@media (max-width: 768px) {
    body.email-template-page .form-footer {
        flex-direction: column;
    }

    body.email-template-page .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Audit Logs Page Styles
   ========================================================================== */

/* Unique Audit Logs Table Styles */
.audit-logs-table-container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.audit-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.audit-logs-table thead {
    background: #f9fafb;
}

.audit-logs-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.audit-logs-table th:first-child {
    width: 1%;
    white-space: nowrap;
}

.audit-logs-table th:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.audit-logs-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
}

.audit-logs-table td:first-child {
    width: 1%;
    white-space: nowrap;
}

.audit-logs-table td:last-child {
    width: 120px;
    text-align: right;
    padding-right: 20px;
}

.audit-logs-table tbody tr:hover {
    background: #f9fafb;
}

@media (max-width: 768px) {
    .audit-logs-table {
        min-width: 800px;
    }
}

/* Event Type Badges */
.event-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.event-badge.create {
    background: #d1fae5;
    color: #065f46;
}

.event-badge.update {
    background: #dbeafe;
    color: #1e40af;
}

.event-badge.delete {
    background: #fee2e2;
    color: #991b1b;
}

/* Audit Logs Modal Detail Styles */
.detail-row {
    display: flex;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #374151;
    min-width: 140px;
    font-size: 14px;
}

.detail-value {
    flex: 1;
    color: #6b7280;
    font-size: 14px;
    word-break: break-word;
}

.detail-value pre {
    background: #f9fafb;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Scoped styles for audit logs page - handling conflicts */
body.audit-logs-page .filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.audit-logs-page .filter-select {
    min-width: 150px;
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 28px 0 12px;
    font-size: 14px;
    color: #374151;
    background: white url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394979E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 10px 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Custom dropdown styling for audit logs filters */
body.audit-logs-page .audit-filter-dropdown {
    min-width: 150px;
}

body.audit-logs-page .audit-filter-dropdown .custom-dropdown-button {
    min-width: 150px;
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 12px 0 12px;
    font-size: 14px;
    color: #374151;
    background: white;
    position: relative;
}

body.audit-logs-page .audit-filter-dropdown .custom-dropdown-selected {
    padding-right: 8px;
}

/* Make selected text grey when a value is selected (not placeholder) */
body.audit-logs-page .audit-filter-dropdown .custom-dropdown-button:not(.placeholder) .custom-dropdown-selected {
    color: #6b7280;
}

body.audit-logs-page .audit-filter-dropdown .custom-dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

body.audit-logs-page .audit-filter-dropdown.active .custom-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

body.audit-logs-page .toolbar-right {
    gap: 12px;
}

body.audit-logs-page .search-bar-right {
    width: 270px;
}

body.audit-logs-page .search-input-wrapper {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 34px;
    box-sizing: border-box;
}

body.audit-logs-page .search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #6f6a69;
    margin-left: 8px;
    height: 100%;
}

body.audit-logs-page .search-icon {
    width: 12px;
    height: 12px;
}

body.audit-logs-page .table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

body.audit-logs-page .action-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #e15a11;
    transition: opacity 0.2s;
}

body.audit-logs-page .action-icon:hover {
    opacity: 0.7;
}

body.audit-logs-page .table-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

body.audit-logs-page .records-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

body.audit-logs-page .records-select {
    min-width: 60px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 32px 0 8px;
    font-size: 14px;
    color: #374151;
    background: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

body.audit-logs-page .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.audit-logs-page .pagination-button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

body.audit-logs-page .pagination-button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

body.audit-logs-page .pagination-button.active {
    background: #e15a11;
    color: white;
    border-color: #e15a11;
}

body.audit-logs-page .pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.audit-logs-page .pagination-button svg {
    width: 16px;
    height: 16px;
}

body.audit-logs-page .pagination-dots {
    padding: 0 8px;
    color: #9ca3af;
    font-size: 14px;
}

/* Audit Logs Modal Styles - scoped to avoid conflicts */
#logDetailModal.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#logDetailModal.modal.active {
    display: flex;
}

#logDetailModal .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#logDetailModal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logDetailModal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

#logDetailModal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

#logDetailModal .modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

#logDetailModal .modal-body {
    padding: 24px;
}

#logDetailModal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


body.audit-logs-page .export-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.audit-logs-page .dropdown-arrow {
    width: 11px;
    height: 6.792px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

@media (max-width: 768px) {
    body.audit-logs-page .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    body.audit-logs-page .toolbar-left {
        order: 1;
    }
    
    body.audit-logs-page .toolbar-right {
        order: 2;
    }
    
    body.audit-logs-page .search-bar-right {
        width: 100%;
    }
    
    body.audit-logs-page .filter-group {
        width: 100%;
    }
    
    body.audit-logs-page .filter-select {
        width: 100%;
    }
}

/* Email Templates Page Mobile Responsive */
@media (max-width: 768px) {
    /* Search bar section mobile layout - override inline styles */
    body .search-bar-section,
    .content-inner .search-bar-section,
    .main-wrapper .search-bar-section {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    /* Search form full width on top */
    body .search-bar-section .search-form,
    .content-inner .search-bar-section .search-form,
    .main-wrapper .search-bar-section .search-form {
        order: 1 !important;
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-bottom: 0 !important;
    }

    /* Export button and Add button side by side below search */
    body .search-bar-section > button[onclick*="export"],
    body .search-bar-section > button[onclick*="Export"],
    body .search-bar-section > a.btn-add,
    .content-inner .search-bar-section > button,
    .content-inner .search-bar-section > a.btn-add,
    .main-wrapper .search-bar-section > button,
    .main-wrapper .search-bar-section > a.btn-add {
        order: 2 !important;
        flex-shrink: 0 !important;
        align-self: flex-start !important;
        height: 32px !important;
    }

    /* Buttons should be on the next row, side by side */
    body .search-bar-section > button[onclick*="export"],
    body .search-bar-section > button[onclick*="Export"],
    .content-inner .search-bar-section > button:not(.search-form button),
    .main-wrapper .search-bar-section > button:not(.search-form button) {
        margin-right: 8px !important;
    }

    /* Table actions mobile */
    .action-buttons {
        gap: 6px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }

    .action-icon {
        flex-shrink: 0 !important;
        min-width: 13px !important;
    }

    .action-divider {
        flex-shrink: 0 !important;
        min-width: 1px !important;
    }

    /* Table footer mobile */
    .table-footer {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
        align-items: stretch !important;
    }

    .pagination {
        justify-content: center !important;
    }

    /* Table wrapper mobile */
    .table-wrapper {
        overflow-x: auto !important;
    }

    /* Table mobile adjustments */
    table {
        min-width: 600px !important;
    }

    thead th,
    tbody td {
        padding: 12px 10px !important;
        font-size: 13px !important;
    }
}

/* Help Admin Page Mobile Responsive */
@media (max-width: 768px) {
    /* Override inline styles for mobile */
    .dfa-help-admin {
        min-height: auto !important;
    }

    /* Content layout - stack vertically */
    .dfa-admin-content {
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* Left panel - full width, reduced height */
    .dfa-admin-left-panel {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 250px !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid #d9d9d9 !important;
    }

    /* Left header adjustments */
    .dfa-admin-left-header {
        padding: 12px !important;
    }

    .dfa-admin-left-header h3 {
        font-size: 13px !important;
        margin-bottom: 0.5rem !important;
    }

    .adaptation-selector label {
        font-size: 12px !important;
        margin-bottom: 0.25rem !important;
    }

    /* Styles for native select (fallback) */
    select.adaptation-dropdown {
        padding: 10px 40px 10px 12px !important;
        font-size: 14px !important;
        color: #374151 !important;
        line-height: 1.5 !important;
        height: auto !important;
        min-height: 38px !important;
        background-position: right 12px center !important;
        background-size: 16px !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }

    select.adaptation-dropdown option {
        padding: 8px 12px !important;
        color: #374151 !important;
        background-color: white !important;
    }
    
    /* Custom dropdown wrapper - ensure it takes full width */
    .adaptation-selector .custom-dropdown.adaptation-dropdown {
        width: 100% !important;
    }

    /* Tree container */
    .dfa-admin-tree-container {
        padding: 0.5rem !important;
    }

    /* Right panel - full width */
    .dfa-admin-body-panel {
        flex: 1 !important;
        max-height: none !important;
        width: 100% !important;
    }

    /* Form container */
    .dfa-admin-form-container {
        max-width: 100% !important;
    }

    /* Form title */
    .dfa-admin-form-title {
        padding: 12px !important;
        font-size: 13px !important;
    }

    /* Language tabs - wrap and smaller */
    .dfa-admin-form-tabs {
        padding: 0 12px !important;
        gap: 0.25rem !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
    }

    .dfa-admin-tab {
        padding: 0.4rem 0.6rem !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    /* Form adjustments */
    .dfa-admin-form {
        margin: 0 12px 12px 12px !important;
        padding: 12px !important;
        gap: 0.75rem !important;
    }

    .dfa-admin-form-group {
        gap: 3px !important;
    }

    .dfa-admin-form-group label {
        font-size: 12px !important;
    }

    .dfa-admin-form-input {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }

    /* HTML Editor */
    .dfa-admin-html-editor {
        border-radius: 4px !important;
    }

    .dfa-admin-editor-toolbar {
        padding: 4px 6px !important;
        gap: 3px !important;
        flex-wrap: wrap !important;
    }

    .dfa-admin-toolbar-btn {
        padding: 3px 6px !important;
        font-size: 11px !important;
        min-width: 24px !important;
    }

    .dfa-admin-editor-content {
        padding: 8px !important;
        min-height: 80px !important;
        font-size: 12px !important;
    }

    /* Form actions - stack vertically */
    .dfa-admin-form-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }

    .dfa-admin-btn {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 12px !important;
    }

    .dfa-admin-api-key {
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    /* Placeholder */
    .dfa-admin-placeholder {
        padding: 2rem 1rem !important;
    }

    .dfa-admin-placeholder h3 {
        font-size: 14px !important;
    }

    .dfa-admin-placeholder p {
        font-size: 12px !important;
    }

    .dfa-admin-placeholder-icon {
        font-size: 36px !important;
        margin-bottom: 0.75rem !important;
    }

    /* Message container - adjust position */
    #message-container {
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px) !important;
    }

    /* Tree view adjustments */
    .tree-node {
        padding: 5px 10px 5px 6px !important;
        font-size: 12px !important;
    }

    .tree-expand-icon {
        width: 14px !important;
        height: 14px !important;
    }

    .tree-label {
        font-size: 12px !important;
    }

    .tree-add-root {
        padding: 0.5rem !important;
    }

    .tree-add-btn {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .tree-input {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   Header Component Styles
   ========================================================================== */
/* 
   Note: These styles are specific to the header component (header.html).
   All classes are prefixed with "header-", "notification-", or "user-profile-"
   to ensure they don't conflict with other components.
*/

/* Top Header Container */
.top-header {
    position: fixed;
    left: 240px;
    top: 0;
    right: 0;
    height: 66px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transition: left 0.3s ease;
}

body.sidebar-collapsed .top-header {
    left: 0;
    padding-left: 28px;
}

/* Header Left Content */
.header-left-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.header-sidebar-toggle {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #e15a11;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Show hamburger on mobile (always visible) */
@media (max-width: 768px) {
    .header-sidebar-toggle {
        display: flex;
    }
}

/* Show hamburger on desktop only when sidebar is collapsed */
@media (min-width: 769px) {
    body.sidebar-collapsed .header-sidebar-toggle {
        display: flex;
    }
}

.header-sidebar-toggle:hover {
    background-color: #fff5ed;
    border-color: #e15a11;
    box-shadow: 0 2px 4px rgba(225, 90, 17, 0.1);
}

.header-sidebar-toggle:active {
    transform: scale(0.95);
}

.header-sidebar-toggle svg {
    width: 18px;
    height: 18px;
    color: #e15a11;
    stroke-width: 2.5;
}

.header-page-info {
    display: flex;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    min-width: 0;
    flex: 1;
}

.header-page-title {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-divider {
    height: 35.5px;
    width: 1px;
    background-color: #d1d5db;
    margin: 0 8px;
}

/* Header Action Buttons */
.action-button {
    background-color: #e15a11;
    border-radius: 4px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: white;
    border: none;
    box-sizing: border-box;
}

.action-button:hover {
    background-color: #c94e0e;
}


/* Header Right Content */
.header-right-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Notification Button */
.notification-btn {
    position: relative;
    width: 36px;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    box-sizing: border-box;
    padding: 0;
}

.notification-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.notification-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(37%) sepia(63%) saturate(2413%) hue-rotate(0deg) brightness(94%) contrast(93%);
}

.notification-badge-header {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 0 4px;
}

.notification-badge-header span {
    color: white;
    font-size: 10px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    line-height: 1;
}

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
    display: inline-block;
}

.notification-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    width: 416px;
    max-height: 500px;
    overflow: hidden;
    z-index: 10000;
}

.notification-dropdown.active .notification-popup {
    display: block;
}

.notification-popup-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
}

.notification-popup-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.notification-popup-badge {
    background: #dc2626;
    border-radius: 10px;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.notification-popup-badge span {
    color: white;
    font-size: 11px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    background: white;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon-wrapper {
    width: 36px;
    height: 36px;
    background: #fef3e7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #212121;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-description {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #666666;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #999999;
}

.notification-indicator {
    width: 8px;
    height: 8px;
    background-color: #e15a11;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-item.read .notification-indicator {
    display: none;
}

.notification-popup-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    background: #f9fafb;
}

.notification-btn-primary {
    flex: 1;
    padding: 10px 16px;
    background: #e15a11;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-btn-primary:hover {
    background: #c94e0e;
}

.notification-btn-secondary {
    flex: 1;
    padding: 10px 16px;
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* When Mark all as read is hidden, make Show all button full width */
#markAllReadBtn[style*="display: none"] ~ .notification-btn-secondary,
#markAllReadBtn[style*="display:none"] ~ .notification-btn-secondary {
    flex: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Overlay for Centered Notification Popup */
.notification-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.notification-modal-overlay.active {
    display: flex;
}

.notification-dropdown.modal-mode .notification-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    z-index: 100000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* User Profile Button */


.user-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(37%) sepia(63%) saturate(2413%) hue-rotate(0deg) brightness(94%) contrast(93%);
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
    display: inline-block;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 240px;
    overflow: hidden;
    z-index: 10000;
}

#userProfileDropdown.active .user-profile-menu {
    display: block;
}

.user-profile-dropdown.active .user-profile-menu {
    display: block;
}

.user-profile-header {
    padding: 16px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.user-profile-avatar {
    width: 40px;
    height: 40px;
    background: #fef3e7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e15a11;
}

.user-profile-avatar-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(37%) sepia(63%) saturate(2413%) hue-rotate(0deg) brightness(94%) contrast(93%);
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.user-profile-name {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-email {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #666666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    transition: background 0.15s ease;
    background: white;
}

.user-profile-option:hover {
    background: #f3f4f6;
}

.user-profile-option svg {
    flex-shrink: 0;
    color: #6b7280;
}

.user-profile-option.logout-option {
    border-top: 1px solid #e5e7eb;
}

.user-profile-option.logout-option:hover {
    background: #fef2f2;
    color: #dc2626;
}

.user-profile-option.logout-option:hover svg {
    color: #dc2626;
}

/* Header Responsive Styles */
@media (max-width: 768px) {
    .top-header {
        left: 0;
        padding: 0 16px;
        height: 60px;
    }
    
    /* Reset desktop padding for mobile */
    body.sidebar-collapsed .top-header {
        padding-left: 16px;
    }

    .header-left-content {
        gap: 10px;
    }
    
    .header-sidebar-toggle {
        width: 34px;
        height: 34px;
    }

    .header-sidebar-toggle svg {
        width: 16px;
        height: 16px;
    }

    .header-page-info {
        padding: 0;
    }

    .header-page-title {
        font-size: 14px !important;
    }

    .header-right-content {
        gap: 8px;
    }

    .notification-btn,
    .user-btn {
        width: 34px;
        height: 34px;
    }

    .notification-icon,
    .user-icon {
        width: 15px;
        height: 15px;
    }

    .header-language-button {
        min-width: 70px;
        height: 34px;
        padding: 6px 10px;
    }

    .header-language-icon {
        width: 15px;
        height: 15px;
    }
    
    .dfa-help-button {
        height: 34px !important;
        padding: 6px 10px !important;
    }

    .header-language-text {
        font-size: 12px;
    }

    /* Notifications dropdown: fixed to viewport on mobile so it is always fully visible */
    .notification-dropdown:not(.modal-mode) .notification-popup {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 72px;
        width: auto;
        max-width: none;
        transform: none;
        z-index: 10001;
    }

    .header-language-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: calc(100vw - 32px);
    }

    /* Profile dropdown: align right so it opens left and stays fully visible on mobile */
    .user-profile-menu {
        left: auto;
        right: 0;
        transform: none;
        max-width: min(280px, calc(100vw - 32px));
    }

    .notification-popup::before {
        left: auto;
        right: 24px;
        transform: rotate(45deg);
    }

    .header-language-menu::before {
        left: 50%;
        right: auto;
        transform: translateX(-50%) rotate(45deg);
    }

    .header-divider {
        display: none;
    }

    /* Allow profile dropdown to extend below header without clipping */
    .top-header {
        overflow: visible;
    }

    .header-right-content {
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .header-page-info {
        padding: 0;
    }

    .header-page-title {
        font-size: 14px !important;
    }

    .notification-btn,
    .user-btn {
        width: 32px;
        height: 34px;
    }

    .header-language-button {
        min-width: 60px;
        height: 34px;
        padding: 4px 8px;
    }

    .header-language-text {
        font-size: 11px;
    }
    
    .header-sidebar-toggle {
        width: 30px;
        height: 30px;
    }

    .header-sidebar-toggle svg {
        width: 15px;
        height: 15px;
    }
}

/* ==========================================
   EMAIL TEMPLATES & EMAIL LOGS PAGES
   ========================================== */

/* Shared styles for Email Templates and Email Logs pages */
body.email-templates-page .main-content,
body.email-logs-page .main-content {
    background-color: #f9fafc;
}

body.email-templates-page .content-inner,
body.email-logs-page .content-inner {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

/* Search Bar Section */
body.email-templates-page .search-bar-section,
body.email-logs-page .search-bar-section {
    background: transparent;
    border-bottom: none;
    padding: 11px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.header-page-title {
    font-family: 'Segoe UI', sans-serif;
    color: #6b7280;
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.2px;
}

body.email-logs-page .search-bar-section {
    justify-content: flex-start;
}

body.email-templates-page .search-form,
body.email-logs-page .search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 500px;
    position: relative;
}

body.email-templates-page .search-form .search-icon,
body.email-logs-page .search-form .search-icon,
body.email-templates-page .search-form img.search-icon,
body.email-logs-page .search-form img.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    z-index: 1;
    pointer-events: none;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(94%) contrast(87%);
    height: 16px;
    z-index: 1;
    pointer-events: none;
    flex-shrink: 0;
}

body.email-templates-page .search-input,
body.email-logs-page .search-input {
    flex: 1;
    height: 32px;
    padding: 0 12px 0 36px;
    border-radius: 12px;
    font-size: 14px;
    color: #333333;
    background: #ffffff;
}

body.email-templates-page .search-input::placeholder,
body.email-logs-page .search-input::placeholder {
    color: #999999;
}

body.email-templates-page .search-input:focus,
body.email-logs-page .search-input:focus {
    outline: none;
    border-color: #e15a11;
}




/* Table Styles */
body.email-templates-page .table-wrapper,
body.email-logs-page .table-wrapper {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Horizontal scroll for email logs table container */
body.email-logs-page .data-table-container {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
}

body.email-logs-page .data-table-container .table-container {
    min-width: 0;
    overflow: visible;
    width: 100%;
    position: relative;
}

/* Ensure table fills container width but can expand if needed */
body.email-logs-page .data-table-container .table-container .email-logs-table {
    width: 100%;
    min-width: 800px;
    max-width: none; /* Allow table to expand beyond container if needed */
}

body.email-templates-page .table-wrapper > table,
body.email-logs-page .table-wrapper > table {
    width: 100%;
    margin: 0;
    min-width: 600px;
}

body.email-templates-page .email-templates-table,
body.email-logs-page .email-logs-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    table-layout: fixed;
    background: white;
}

/* Use auto layout to allow content-based sizing with min-widths, but respect percentages when possible */
body.email-logs-page .email-logs-table {
    table-layout: auto;
    width: 100%;
    min-width: 800px;
    max-width: none; /* Allow expansion beyond 100% if content requires */
}

/* Ensure table cells expand to fill available space when there's extra room */
body.email-logs-page .email-logs-table tbody tr td {
    max-width: none;
}

body.email-templates-page .email-templates-table thead,
body.email-logs-page .email-logs-table thead {
    background: #f9fafb;
}

body.email-templates-page .email-templates-table thead th,
body.email-logs-page .email-logs-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
    height: auto;
    line-height: 1.4;
    white-space: nowrap;
}

/* Allow header cells to wrap if needed for email logs */
body.email-logs-page .email-logs-table thead th {
    white-space: normal;
    word-wrap: break-word;
}

body.email-templates-page .email-templates-table thead th:first-child,
body.email-templates-page .email-templates-table tbody td:first-child {
    padding-left: 16px;
    padding-right: 8px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

/* Email logs first column - flexible width */
body.email-logs-page .email-logs-table thead th:first-child,
body.email-logs-page .email-logs-table tbody td:first-child {
    padding-left: 16px;
    padding-right: 8px;
    min-width: 60px;
    width: auto;
}

body.email-templates-page .email-templates-table thead th:last-child,
body.email-templates-page .email-templates-table tbody td:last-child,
body.email-logs-page .email-logs-table thead th:last-child,
body.email-logs-page .email-logs-table tbody td:last-child {
    padding-right: 16px;
}

body.email-templates-page .email-templates-table thead th:last-child,
body.email-logs-page .email-logs-table thead th:last-child {
    text-align: right;
}

body.email-templates-page .email-templates-table tbody tr,
body.email-logs-page .email-logs-table tbody tr {
    margin: 0;
    padding: 0;
    height: auto;
}

body.email-templates-page .email-templates-table tbody tr td,
body.email-logs-page .email-logs-table tbody tr td {
    padding: 12px 12px;
    font-size: 12px;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    height: auto;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure email logs table cells handle overflow properly */
body.email-logs-page .email-logs-table tbody tr td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

body.email-templates-page .email-templates-table tbody tr:hover,
body.email-logs-page .email-logs-table tbody tr:hover {
    background: #f9fafb;
}

body.email-templates-page .email-templates-table tbody td:last-child,
body.email-logs-page .email-logs-table tbody td:last-child {
    text-align: right;
}

/* Status Badges */
body.email-templates-page .status-badge,
body.email-logs-page .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

body.email-templates-page .status-badge.active {
    background: #d4edda;
    color: #155724;
}

body.email-templates-page .status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

body.email-logs-page .status-badge.sent {
    background: #d4edda;
    color: #155724;
}

body.email-logs-page .status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

body.email-logs-page .status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons for Email Templates */
body.email-templates-page .action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

body.email-templates-page .action-icon {
    width: 13px;
    height: 13px;
    cursor: pointer;
    color: #e15a11;
}

body.email-templates-page .action-icon:hover {
    opacity: 0.7;
}

body.email-templates-page .action-divider {
    width: 1px;
    height: 19px;
    background: #ddd;
}

body.email-templates-page .template-key-cell,
body.email-logs-page .template-key-cell {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 13px;
}

/* Email Logs Specific Styles */
body.email-logs-page .filter-group {
    display: flex;
    gap: 12px;
}

body.email-logs-page .filter-select {
    height: 32px;
    padding: 0 28px 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    background: white url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394979E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 10px 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

body.email-logs-page .refresh-button {
    height: 32px;
    padding: 0 16px;
    background: #e15a11;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

body.email-logs-page .refresh-button:hover {
    background: #e64a19;
}

body.email-logs-page .email-cell {
    color: #007bff;
    font-size: 13px;
    min-width: 180px;
    white-space: nowrap;
}

body.email-logs-page .date-cell {
    font-size: 13px;
    color: #666666;
    white-space: nowrap;
}

/* Column width distribution for email logs table - using min-widths for auto layout */
body.email-logs-page .email-logs-table th:nth-child(2),
body.email-logs-page .email-logs-table td:nth-child(2) {
    min-width: 100px;
    width: auto;
}

/* Ensure recipient email column has minimum width - flexible */
body.email-logs-page .email-logs-table th:nth-child(3),
body.email-logs-page .email-logs-table td:nth-child(3) {
    min-width: 150px;
    width: auto;
}

/* Ensure subject column has minimum width - flexible */
body.email-logs-page .email-logs-table th:nth-child(4),
body.email-logs-page .email-logs-table td:nth-child(4) {
    min-width: 120px;
    width: auto;
}

/* Status column */
body.email-logs-page .email-logs-table th:nth-child(5),
body.email-logs-page .email-logs-table td:nth-child(5) {
    min-width: 80px;
    width: auto;
}

/* Sent At column */
body.email-logs-page .email-logs-table th:nth-child(6),
body.email-logs-page .email-logs-table td:nth-child(6) {
    min-width: 120px;
    width: auto;
}

/* Created At column */
body.email-logs-page .email-logs-table th:nth-child(7),
body.email-logs-page .email-logs-table td:nth-child(7) {
    min-width: 120px;
    width: auto;
}

body.email-logs-page .auto-refresh-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999999;
    margin-left: 16px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

body.email-logs-page .auto-refresh-indicator.active {
    color: #28a745;
}

body.email-logs-page .refresh-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    background: #999999;
    flex-shrink: 0;
    display: inline-block;
}

body.email-logs-page .refresh-dot.active {
    background: #28a745;
    animation: emailLogsPulse 2s infinite;
}

@keyframes emailLogsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}


/* Delete Modal for Email Templates */
body.email-templates-page .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

body.email-templates-page .modal-overlay.active {
    display: flex;
}

body.email-templates-page .modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.email-templates-page .modal-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

body.email-templates-page .modal-header {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0;
    flex: 1;
}

body.email-templates-page .modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 28px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1;
    font-weight: 300;
    margin-left: 16px;
}

body.email-templates-page .modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

body.email-templates-page .modal-body {
    font-size: 14px;
    color: #666666;
    margin-bottom: 24px;
    line-height: 1.6;
}

body.email-templates-page .modal-body .template-name {
    margin-top: 12px;
    font-weight: 600;
    color: #333;
}

body.email-templates-page .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

body.email-templates-page .modal-button {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

body.email-templates-page .modal-button.cancel {
    background: #f5f5f5;
    color: #333333;
}

body.email-templates-page .modal-button.cancel:hover {
    background: #e0e0e0;
}

body.email-templates-page .modal-button.delete {
    background: #dc3545;
    color: white;
}

body.email-templates-page .modal-button.delete:hover {
    background: #c82333;
}

/* Empty/Loading State */
body.email-templates-page .empty-state,
body.email-logs-page .empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ============================================
   DIRECTORY PAGE MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* Page Header */
    .directory-page-header {
        margin-bottom: 16px;
        gap: 12px;
    }
    
    .directory-header-left {
        gap: 10px;
    }
    
    .directory-icon-box {
        width: 28px;
        height: 28px;
    }
    
    .directory-icon {
        width: 16px;
        height: 12px;
    }
    
    .directory-title {
        font-size: 14px;
    }
    
    .directory-subtitle {
        font-size: 12px;
    }
    
    /* Export button */
    .directory-page-header > a {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }
    
    .directory-page-header > a svg {
        width: 12px !important;
        height: 13px !important;
    }
    
    /* Category Cards */
    .grid.grid-cols-1.md\:grid-cols-3 {
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    
    .grid.grid-cols-1.md\:grid-cols-3 > div {
        padding: 12px !important;
    }
    
    /* Category card text */
    .text-xs.text-gray-500.mb-1 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    .text-lg.sm\:text-xl.font-semibold.text-orange-500 {
        font-size: 14px !important;
    }
    
    /* Category card icons */
    .w-12.h-12.sm\:w-10.sm\:h-10.bg-orange-50 {
        width: 36px !important;
        height: 36px !important;
    }
    
    .w-7.h-7.sm\:w-6.sm\:h-6.category-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Filters Container */
    .directory-filters-container {
        margin-top: 20px !important; /* Separation between tiles and search bar on mobile */
        padding-top: 20px !important; /* Space above the border line on mobile */
        border-top: 1px solid #e0e0e0 !important; /* Light grey separation line between tiles and filters */
        margin-bottom: 16px !important;
        gap: 12px !important;
    }
    
    .directory-filters-right {
        width: 100%;
        gap: 12px !important;
    }
    
    /* Search Bar */
    .directory-filters-container input[type="text"] {
        width: 100% !important;
        height: 36px !important;
        font-size: 13px !important;
        padding-left: 32px !important;
    }
    
    .directory-filters-container svg.absolute {
        width: 14px !important;
        height: 14px !important;
        left: 10px !important;
    }
    
    /* Custom Dropdowns */
    .directory-filters-container .custom-dropdown {
        width: 100% !important;
    }
    
    .directory-filters-container .custom-dropdown-button {
        height: 36px !important;
        font-size: 13px !important;
        padding: 0 12px !important;
    }
    
    /* Add Focal Point Button */
    .directory-filters-container a[href*="add_focal_point"] {
        width: 100% !important;
        height: 36px !important;
        font-size: 13px !important;
        padding: 0 16px !important;
    }
    
    .directory-filters-container a[href*="add_focal_point"] svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Results Display Count */
    .focal-points-display-count {
        font-size: 11px !important;
        margin-bottom: 12px !important;
    }
    
    /* Results Grid */
    .directory-results-grid {
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    
    /* Contact Cards */
    .directory-results-grid > div {
        padding: 12px !important;
    }
    
    /* Card Avatar */
    .directory-results-grid img.rounded-full {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 8px !important;
    }
    
    /* Card Name */
    .directory-results-grid h3 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    
    /* Card Job Title */
    .directory-results-grid p.text-xs.text-gray-500 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    /* Sector Badge */
    .directory-results-grid span.bg-orange-50 {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    /* Card Details */
    .directory-results-grid .space-y-3.sm\:space-y-4 {
        gap: 8px !important;
    }
    
    .directory-results-grid .space-y-3.sm\:space-y-4 > div {
        margin-bottom: 8px !important;
    }
    
    .directory-results-grid svg.w-3\.5.h-3\.5 {
        width: 14px !important;
        height: 14px !important;
    }
    
    .directory-results-grid span.text-xs.text-gray-600 {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }
    
    /* Card Footer Date */
    .directory-results-grid p.text-\[10px\] {
        font-size: 9px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    
    /* Contact Button */
    .directory-results-grid a[href^="mailto:"] {
        height: 36px !important;
        font-size: 11px !important;
        padding: 0 12px !important;
    }
    
    .directory-results-grid a[href^="mailto:"] svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Edit/Delete Action Buttons */
    .directory-results-grid .absolute.top-2 {
        top: 8px !important;
        right: 8px !important;
        gap: 6px !important;
    }
    
    .directory-results-grid .absolute.top-2 > a {
        width: 24px !important;
        height: 24px !important;
    }
    
    .directory-results-grid .absolute.top-2 > a svg {
        width: 12px !important;
        height: 12px !important;
    }
    
    /* Pagination */
    #directoryPagination {
        gap: 6px !important;
        margin-top: 12px !important;
        padding: 0 8px !important;
    }
    
    #directoryPagination button,
    #directoryPagination span {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    
    #directoryPagination svg {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 480px) {
    /* Further mobile optimizations */
    .directory-page-header {
        margin-bottom: 12px;
    }
    
    .directory-title {
        font-size: 13px;
    }
    
    .directory-subtitle {
        font-size: 11px;
    }
    
    /* Category Cards - Stack vertically */
    .grid.grid-cols-1.md\:grid-cols-3 {
        gap: 10px !important;
    }
    
    /* Filters - Full width stack */
    .directory-filters-container {
        gap: 10px !important;
    }
    
    /* Results Grid - Single column */
    .directory-results-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* Contact Cards - Smaller padding */
    .directory-results-grid > div {
        padding: 10px !important;
    }
    
    /* Pagination - Smaller buttons */
    #directoryPagination button,
    #directoryPagination span {
        width: 26px !important;
        height: 26px !important;
        font-size: 10px !important;
    }
}

body.email-templates-page .error-state,
body.email-logs-page .error-state {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

body.email-templates-page .delete-form-inline {
    display: inline;
}

/* Mobile Responsive for Email Templates & Logs */
@media (max-width: 768px) {
    body.email-templates-page .search-bar-section,
    body.email-logs-page .search-bar-section {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 10px;
    }

    body.email-templates-page .search-form,
    body.email-logs-page .search-form {
        width: 100%;
        max-width: none;
        order: 1;
    }

    body.email-logs-page .filter-group {
        width: 100%;
        order: 2;
    }

    body.email-logs-page .filter-select {
        flex: 1;
    }

    body.email-templates-page .export-btn,
    body.email-logs-page .export-btn {
        order: 3;
    }

    body.email-templates-page .btn-add {
        order: 4;
        flex: 1;
        justify-content: center;
    }

    body.email-logs-page .refresh-button {
        order: 4;
    }

    body.email-logs-page .auto-refresh-indicator {
        order: 5;
        margin-left: 0;
    }


    body.email-templates-page .email-templates-table,
    body.email-logs-page .email-logs-table {
        min-width: 700px;
    }

    body.email-templates-page .table-footer,
    body.email-logs-page .table-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 12px 16px;
    }

    body.email-templates-page .records-per-page,
    body.email-logs-page .records-per-page {
        justify-content: space-between;
        width: 100%;
    }

    body.email-templates-page .pagination,
    body.email-logs-page .pagination {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    body.email-templates-page .pagination-button,
    body.email-logs-page .pagination-button {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

/* ============================================
   DFA HELP ADMIN PAGE STYLES
   ============================================ */

/* Override main-content styles for Help Admin page */
body.dfa-help-admin-page .main-content {
    padding: 0 !important;
}

body.dfa-help-admin-page .main-content .inner-main-container {
    padding: 0 !important;
}

/* DFA Help Admin Layout */
body.dfa-help-admin-page .dfa-help-admin {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

body.dfa-help-admin-page .dfa-admin-content {
    display: flex;
    flex: 1;
    gap: 0;
}

body.dfa-help-admin-page .dfa-admin-left-panel {
    flex: 0 0 350px;
    background: white;
    padding: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-left: 1px solid #d9d9d9;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.dfa-help-admin-page .dfa-admin-left-header {
    padding: 1rem;
    border-bottom: 1px solid #d9d9d9;
    background: #f8f9fa;
}

body.dfa-help-admin-page .dfa-admin-left-header h3 {
    margin: 0 0 0.75rem 0;
    font-size: 14px;
    color: #e15a11;
    font-weight: 600;
}

body.dfa-help-admin-page .adaptation-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body.dfa-help-admin-page .adaptation-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 13px;
}

/* Styles for native select (fallback) */
body.dfa-help-admin-page select.adaptation-dropdown {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

body.dfa-help-admin-page select.adaptation-dropdown:focus {
    outline: none;
    border-color: #e15a11;
}

/* Custom dropdown wrapper - ensure it takes full width */
body.dfa-help-admin-page .adaptation-selector .custom-dropdown.adaptation-dropdown {
    width: 100%;
}

body.dfa-help-admin-page .dfa-admin-tree-container {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
}

body.dfa-help-admin-page .tree-view {
    margin-top: 0;
}

body.dfa-help-admin-page .tree-item {
    margin-bottom: 0.25rem;
}

body.dfa-help-admin-page .tree-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 6px 8px;
    background-color: white;
    font-size: 13px;
    color: #374151;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

body.dfa-help-admin-page .tree-node:hover {
    background-color: #f5f5f5;
}

body.dfa-help-admin-page .tree-node.selected {
    background-color: #ffeadb;
    border-left: 4px solid #e15a11;
    color: #e15a11;
    font-weight: 600;
}

body.dfa-help-admin-page .tree-node-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

body.dfa-help-admin-page .tree-expand-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e15a11;
    font-size: 10px;
    transition: transform 0.2s;
}

body.dfa-help-admin-page .tree-expand-icon.expanded {
    transform: rotate(90deg);
}

body.dfa-help-admin-page .tree-label {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dfa-help-admin-page .tree-delete-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

body.dfa-help-admin-page .tree-node:hover .tree-delete-icon {
    opacity: 1;
}

body.dfa-help-admin-page .tree-delete-icon:hover {
    color: #dc2626;
}

body.dfa-help-admin-page .tree-children {
    margin-left: 1rem;
}

body.dfa-help-admin-page .tree-input-container {
    margin-top: 8px;
}

body.dfa-help-admin-page .tree-add-child-wrapper {
    display: flex;
    gap: 6px;
    align-items: center;
}

body.dfa-help-admin-page .tree-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: inherit;
}

body.dfa-help-admin-page .tree-add-child-wrapper .tree-input {
    flex: 1;
}

body.dfa-help-admin-page .tree-add-child-btn {
    padding: 5px 10px;
    font-size: 11px;
    white-space: nowrap;
}

body.dfa-help-admin-page .tree-input::placeholder {
    color: #9ca3af;
    font-style: normal;
}

body.dfa-help-admin-page .tree-input:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.2);
}

body.dfa-help-admin-page .tree-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

body.dfa-help-admin-page .tree-add-btn {
    padding: 6px 12px;
    background: #e15a11;
    color: white;
    border: 1px solid #e15a11;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

body.dfa-help-admin-page .tree-add-btn:hover {
    background: #c94e0e;
    border-color: #c94e0e;
}

body.dfa-help-admin-page .dfa-admin-body-panel {
    flex: 1;
    background: #f7faff;
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
}

body.dfa-help-admin-page .dfa-admin-placeholder {
    margin-top: 4rem;
    text-align: center;
    color: #6c757d;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.dfa-help-admin-page .dfa-admin-placeholder h3 {
    font-size: 16px;
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    display: block;
    width: 100%;
}

body.dfa-help-admin-page .dfa-admin-placeholder p {
    margin: 0;
    font-size: 13px;
    display: block;
    width: 100%;
}

body.dfa-help-admin-page .dfa-admin-placeholder-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    display: block;
}

body.dfa-help-admin-page .dfa-admin-form-container {
    max-width: 1000px;
}

body.dfa-help-admin-page .dfa-admin-form-title {
    border-bottom: 1px solid #d9d9d9;
    padding: 1rem;
    margin: 0;
    background-color: white;
    font-size: 14px;
    color: #e15a11;
    font-weight: 600;
}

body.dfa-help-admin-page .dfa-admin-form-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #d9d9d9;
    padding: 0 1rem;
    background-color: white;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

body.dfa-help-admin-page .dfa-admin-tab {
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    border: none;
    background: none;
    cursor: pointer;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

body.dfa-help-admin-page .dfa-admin-tab:hover {
    color: #2c3e50;
}

body.dfa-help-admin-page .dfa-admin-tab.active {
    color: #e15a11;
    border-bottom-color: #e15a11;
    font-weight: 700;
}

body.dfa-help-admin-page .dfa-admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: white;
    margin: 0 1rem 1rem 1rem;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
}

body.dfa-help-admin-page .dfa-admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.dfa-help-admin-page .dfa-admin-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

body.dfa-help-admin-page .dfa-admin-form-group label .required {
    color: #dc2626;
    margin-left: 2px;
}

body.dfa-help-admin-page .dfa-admin-form-input {
    padding: 8px 10px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    font-size: 13px;
}

body.dfa-help-admin-page .dfa-admin-form-input:focus {
    outline: none;
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.1);
}

body.dfa-help-admin-page .dfa-admin-html-editor {
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: white;
    overflow: hidden;
}

body.dfa-help-admin-page .dfa-admin-html-editor:focus-within {
    border-color: #e15a11;
    box-shadow: 0 0 0 2px rgba(225, 90, 17, 0.1);
}

body.dfa-help-admin-page .dfa-admin-editor-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #d7d7d7;
    padding: 6px 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

body.dfa-help-admin-page .dfa-admin-toolbar-btn {
    padding: 4px 8px;
    border: 1px solid #d7d7d7;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

body.dfa-help-admin-page .dfa-admin-toolbar-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

body.dfa-help-admin-page .dfa-admin-editor-content {
    padding: 10px;
    min-height: 100px;
    background: white;
    outline: none;
    line-height: 1.5;
    font-size: 13px;
}

body.dfa-help-admin-page .dfa-admin-editor-content:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
}

body.dfa-help-admin-page .dfa-admin-form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

body.dfa-help-admin-page .dfa-admin-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #e15a11;
    color: white;
    border: 1px solid #e15a11;
}

body.dfa-help-admin-page .dfa-admin-btn:hover {
    background: #c94e0e;
    border-color: #c94e0e;
}

body.dfa-help-admin-page .dfa-admin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.dfa-help-admin-page .dfa-admin-api-key {
    flex: 1;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    color: #374151;
}

body.dfa-help-admin-page .dfa-admin-api-key strong {
    color: #111827;
    margin-right: 6px;
}

body.dfa-help-admin-page .dfa-admin-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

body.dfa-help-admin-page .dfa-admin-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #e15a11;
    border-radius: 50%;
    animation: dfa-admin-spin 0.8s linear infinite;
}

@keyframes dfa-admin-spin {
    to {
        transform: rotate(360deg);
    }
}

body.dfa-help-admin-page .dfa-admin-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid #fecaca;
    font-size: 13px;
}

body.dfa-help-admin-page .dfa-admin-success {
    background: #f0fdf4;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
    font-size: 13px;
}

body.dfa-help-admin-page #message-container {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

body.dfa-help-admin-page #loading-overlay {
    display: none;
}

body.dfa-help-admin-page #form-content {
    display: none;
}

/* DFA Help Admin Delete Modal */
body.dfa-help-admin-page .dfa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.dfa-help-admin-page .dfa-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.dfa-help-admin-page .dfa-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.2s ease;
    overflow: hidden;
}

body.dfa-help-admin-page .dfa-modal-overlay.active .dfa-modal {
    transform: scale(1) translateY(0);
}

body.dfa-help-admin-page .dfa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

body.dfa-help-admin-page .dfa-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}

body.dfa-help-admin-page .dfa-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

body.dfa-help-admin-page .dfa-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

body.dfa-help-admin-page .dfa-modal-body {
    padding: 20px 24px;
}

body.dfa-help-admin-page .dfa-modal-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

body.dfa-help-admin-page .dfa-modal-body p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

body.dfa-help-admin-page .dfa-modal-body #delete-key-name {
    font-weight: 600;
    color: #111827;
}

body.dfa-help-admin-page .dfa-modal-warning {
    color: #dc2626 !important;
    font-size: 13px !important;
    margin-top: 12px !important;
}

body.dfa-help-admin-page .dfa-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

body.dfa-help-admin-page .dfa-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

body.dfa-help-admin-page .dfa-modal-btn:active {
    transform: scale(0.98);
}

body.dfa-help-admin-page .dfa-modal-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

body.dfa-help-admin-page .dfa-modal-btn-cancel:hover {
    background: #e5e7eb;
}

body.dfa-help-admin-page .dfa-modal-btn-delete {
    background: #dc2626;
    color: #ffffff;
}

body.dfa-help-admin-page .dfa-modal-btn-delete:hover {
    background: #b91c1c;
}

/* DFA Help Admin Responsive Styles */
@media (max-width: 1024px) {
    body.dfa-help-admin-page .dfa-admin-content {
        flex-direction: column;
    }

    body.dfa-help-admin-page .dfa-admin-left-panel {
        flex: none;
        max-height: 300px;
    }

    body.dfa-help-admin-page .dfa-admin-body-panel {
        max-height: none;
    }
}

/* Email Template Edit Page Styles */
body.email-template-edit-page .main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 66px);
    overflow: hidden;
    background-color: #f9fafc;
    transition: all 0.3s ease;
}

body.email-template-edit-page.sidebar-collapsed .main-wrapper {
    margin-left: 0;
}

body.email-template-edit-page .content-wrapper {
    flex: 1;
    overflow-y: auto;
    background: #f9fafc;
}

body.email-template-edit-page .content-inner {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 22px;
    max-width: 1200px;
    margin: 0 auto;
}

body.email-template-edit-page .form-header {
    margin-bottom: 32px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 16px;
}

body.email-template-edit-page .form-title {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

body.email-template-edit-page .form-subtitle {
    font-size: 14px;
    color: #666666;
}

body.email-template-edit-page .template-key-display {
    display: inline-block;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    margin-top: 8px;
}

body.email-template-edit-page .form-section {
    margin-bottom: 32px;
}

body.email-template-edit-page .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #ff5722;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.email-template-edit-page .language-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #e3f2fd;
    color: #1976d2;
}

body.email-template-edit-page .form-group {
    margin-bottom: 20px;
}

body.email-template-edit-page .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
}

body.email-template-edit-page .required {
    color: #dc3545;
}

body.email-template-edit-page .form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body.email-template-edit-page .form-input:focus {
    outline: none;
    border-color: #ff5722;
}

body.email-template-edit-page .form-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

body.email-template-edit-page .form-textarea:focus {
    outline: none;
    border-color: #ff5722;
}

body.email-template-edit-page .form-help {
    font-size: 12px;
    color: #999999;
    margin-top: 4px;
}

body.email-template-edit-page .help-box {
    background: #f8f9fa;
    border-left: 4px solid #ff5722;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

body.email-template-edit-page .help-box-title {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

body.email-template-edit-page .help-box-content {
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
}

body.email-template-edit-page .help-box code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

body.email-template-edit-page .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.email-template-edit-page .checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

body.email-template-edit-page .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
    margin-top: 32px;
}

body.email-template-edit-page .btn {
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

body.email-template-edit-page .btn-cancel {
    background: #f5f5f5;
    color: #333333;
}

body.email-template-edit-page .btn-cancel:hover {
    background: #e0e0e0;
}

body.email-template-edit-page .btn-submit {
    background: #ff5722;
    color: white;
}

body.email-template-edit-page .btn-submit:hover {
    background: #e64a19;
}

/* Home Page Styles - same as dashboard: no scroll, footer fixed at bottom */
body.home-page {
    overflow: hidden;
    height: 100vh;
}

body.home-page .main-content-wrapper {
    height: calc(100vh - 66px);
}

body.home-page .main-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 52px;
}

body.home-page .main-content::-webkit-scrollbar {
    display: none;
}

/* Home page: keep footer in flow at bottom of wrapper (avoids fixed positioning issues) */
body.home-page .main-content-wrapper .page-footer {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    z-index: 1;
    display: block;
    flex-shrink: 0;
}

body.home-page .main-content-wrapper .page-footer .page-footer__copyright {
    background-color: #FFF7F2;
    border-top: 1px solid #FFE2D1;
}


body.home-page .table-inner-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.home-page .table-inner-scroll::-webkit-scrollbar {
    display: none;
}

body.home-page .tabs-container .tab-button {
    padding: 8px 32px !important;
    font-size: 16px;
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.home-page .tabs-container .tab-button {
        padding: 8px 24px !important;
        font-size: 15px;
        min-height: 40px !important;
        height: 40px !important;
        max-height: 40px !important;
    }
}

body.home-page .welcome-icon {
    width: 56px !important;
    height: 56px !important;
    padding: 12px;
}

body.home-page .welcome-icon img.nav-icon {
    width: 24px !important;
    height: 24px !important;
}

@media (max-width: 768px) {
    body.home-page .welcome-icon {
        width: 48px !important;
        height: 48px !important;
        padding: 10px;
    }
    
    body.home-page .welcome-icon img.nav-icon {
        width: 22px !important;
        height: 22px !important;
    }
}

/* Master Data Add Page Styles */
body.master-data-add-page select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394979E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

body.master-data-add-page .required::after {
    content: ' *';
    color: #e15a11;
}

body.master-data-add-page .master-data-help-text {
    color: #6b7280 !important;
}

body.master-data-add-page input::placeholder,
body.master-data-add-page textarea::placeholder {
    color: #9ca3af;
}

body.master-data-add-page .info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

body.master-data-add-page .info-icon {
    width: 18px;
    height: 18px;
    color: #e15a11;
    cursor: help;
    flex-shrink: 0;
}

body.master-data-add-page .info-icon-wrapper .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    max-width: 280px;
    min-width: 200px;
    z-index: 10000;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
}

body.master-data-add-page .info-icon-wrapper .tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 10px;
    border: 6px solid transparent;
    border-bottom-color: #333;
}

body.master-data-add-page .info-icon-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Master data add – tooltip mobile responsive */
@media (max-width: 640px) {
    body.master-data-add-page .info-icon-wrapper .tooltip {
        max-width: min(280px, calc(100vw - 32px));
        left: 50%;
        transform: translateX(-50%);
    }
    body.master-data-add-page .info-icon-wrapper .tooltip::before {
        left: 50%;
        margin-left: -6px;
    }
}

/* My Account Page Styles */

body.my-account-page .profile-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

body.my-account-page .profile-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    border-radius: 10px 10px 0 0;
}

body.my-account-page .profile-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

body.my-account-page .profile-card-body {
    padding: 24px;
    border-radius: 0 0 10px 10px;
}

body.my-account-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

body.my-account-page .form-row.single {
    grid-template-columns: 1fr;
}

body.my-account-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.my-account-page .form-label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
}

body.my-account-page .form-label .required {
    color: #e15a11;
    margin-left: 2px;
}

body.my-account-page .password-input-wrapper {
    position: relative;
}

body.my-account-page .password-input-wrapper input {
    padding-right: 40px;
}

body.my-account-page .password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.my-account-page .password-toggle-icon svg {
    width: 13px;
    height: 13px;
}

body.my-account-page .password-toggle-icon:hover {
    color: #666;
}

body.my-account-page .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    body.my-account-page .form-row {
        grid-template-columns: 1fr;
    }
}

/* Notifications Page Styles */
body.notifications-page .main-content {
    background-color: rgb(255 255 255) !important;
    position: relative;
    z-index: 1;
}

body.notifications-page {
    background-color: rgb(255 255 255) !important;
}

body.notifications-page .main-content > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    body.notifications-page .table-container {
        overflow-x: auto;
    }
    
    body.notifications-page .notifications-table {
        min-width: 600px;
    }
}

/* Placeholder Page Styles */
body.placeholder-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.placeholder-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

body.placeholder-page.sidebar-collapsed .top-header {
    left: 0;
}

body.placeholder-page .header-left {
    position: absolute;
    left: 55px;
    top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 162px;
    transition: all 0.3s ease;
}

body.placeholder-page.sidebar-collapsed .header-left {
    left: 20px;
}

body.placeholder-page .logo-text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #e15a11;
    white-space: nowrap;
}

body.placeholder-page .collapse-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

body.placeholder-page.sidebar-collapsed .collapse-icon {
    transform: rotate(180deg);
}

body.placeholder-page .header-right {
    position: absolute;
    left: calc(16.25%);
    right: 20px;
    top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

body.placeholder-page.sidebar-collapsed .header-right {
    left: 200px;
}

body.placeholder-page .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 229px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 2px 0px 6px 0px rgba(0, 0, 0, 0.06);
    z-index: 50;
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-top: 66px;
}

body.placeholder-page .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    min-height: 51px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    text-decoration: none;
}

body.placeholder-page .nav-item:hover {
    background-color: #f9f9f9;
}

body.placeholder-page .nav-item.active {
    background-color: #f3f4f5;
    border-left-color: #e15a11;
}

body.placeholder-page .nav-text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #7f8c8d;
    white-space: nowrap;
}

body.placeholder-page .nav-item.active .nav-text {
    color: #e15a11;
}

body.placeholder-page .nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

body.placeholder-page .nav-icon-small {
    width: 15px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
}

body.placeholder-page .nav-icon-medium {
    width: 16.667px;
    height: 16.667px;
    object-fit: contain;
    flex-shrink: 0;
}

body.placeholder-page .nav-icon-reports {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

body.placeholder-page .nav-divider {
    width: 100%;
    height: 1px;
}

body.placeholder-page .nav-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    width: 100%;
    min-height: 51px;
    border-left: 3px solid transparent;
    cursor: pointer;
}

body.placeholder-page .dropdown-arrow {
    width: 11px;
    height: 6.792px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

body.placeholder-page .dropdown-arrow.open {
    transform: rotate(180deg);
}

body.placeholder-page .nav-dropdown-container {
    width: 100%;
}

body.placeholder-page .submenu {
    max-height: 0;
    overflow: hidden;
    background-color: #f5f5f5;
    transition: max-height 0.3s ease-out;
    width: 100%;
}

body.placeholder-page .submenu.open {
    max-height: 200px;
    transition: max-height 0.3s ease-in;
}

body.placeholder-page .submenu-item {
    display: block;
    padding: 10px 20px 10px 50px;
    font-size: 14px;
    color: #999999;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

body.placeholder-page .submenu-item:hover {
    color: #e15a11;
}

body.placeholder-page .submenu-item.active {
    color: #e15a11;
}

body.placeholder-page .main-content {
    position: fixed;
    left: 240px;
    right: 0;
    top: 66px;
    bottom: 0;
    background-color: #f8f9fa;
    padding: 28px;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.placeholder-page.sidebar-collapsed .main-content {
    left: 0;
}

body.placeholder-page .placeholder-content {
    text-align: center;
    max-width: 600px;
}

body.placeholder-page .placeholder-icon {
    font-size: 120px;
    color: #e15a11;
    margin-bottom: 30px;
}

body.placeholder-page .placeholder-title {
    font-size: 36px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

body.placeholder-page .placeholder-description {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    body.placeholder-page .sidebar {
        transform: translateX(-242px);
    }

    body.placeholder-page.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.placeholder-page .main-content {
        left: 0;
        padding: 20px;
    }

    body.placeholder-page .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

body.placeholder-page .mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #e15a11;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(225, 90, 17, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease;
}

/* Rate Limited Page Styles */
body.rate-limited-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.rate-limited-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

body.rate-limited-page .container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
}

body.rate-limited-page .icon {
    font-size: 64px;
    color: #e74c3c;
    margin-bottom: 20px;
}

body.rate-limited-page h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

body.rate-limited-page p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

body.rate-limited-page .countdown {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 25px;
}

body.rate-limited-page .countdown-number {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
}

body.rate-limited-page .countdown-label {
    font-size: 14px;
    color: #666;
}

body.rate-limited-page .btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff802d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
}

body.rate-limited-page .btn:hover {
    background-color: #e15a11;
}

body.rate-limited-page .security-notice {
    margin-top: 25px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
}

/* Reset Password Page Styles - Matching Login Page Theme */
body.reset-password-page {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0;
    overflow: hidden;
}

body.reset-password-page .container {
    background: #e15a11;
    position: relative;
    width: 920px;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Wave Background Pattern */
body.reset-password-page .wave-pattern {
    position: absolute;
    left: -7.44%;
    top: -22.5%;
    right: -5.3%;
    bottom: -56.66%;
    pointer-events: none;
    opacity: 0.3;
}

/* Left Side Content */
body.reset-password-page .left-content {
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 346px;
}

body.reset-password-page .logo-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

body.reset-password-page .logo-icon {
    background-color: rgba(255, 255, 255, 0.32);
    width: 57px;
    height: 57px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    flex-shrink: 0;
}

body.reset-password-page .logo-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

body.reset-password-page .logo-text {
    color: white;
    width: 223px;
    line-height: normal;
}

body.reset-password-page .logo-text h1 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 16px !important;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

body.reset-password-page .logo-text p {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 12px;
    margin: 0;
    line-height: normal;
}

/* Feature Boxes (same as login screen) */
body.reset-password-page .features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.reset-password-page .feature-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

body.reset-password-page .feature-icon {
    background-color: rgba(255, 255, 255, 0.32);
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px;
    flex-shrink: 0;
}

body.reset-password-page .feature-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

body.reset-password-page .feature-text {
    color: white;
    width: 288px;
    line-height: normal;
}

body.reset-password-page .feature-text h3 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 16px !important;
    margin: 0;
    line-height: normal;
}

body.reset-password-page .feature-text p {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400 !important;
    font-size: 12px;
    margin: 0;
    line-height: normal;
}

body.reset-password-page .feature-text.first-feature p {
    font-weight: 400 !important;
}

/* Reset Password Card */
body.reset-password-page .reset-card {
    position: absolute;
    left: 438px;
    top: 43px;
    width: 439px;
    min-height: 515px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
}

body.reset-password-page .reset-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    position: relative;
    width: 100%;
    margin-bottom: 48px;
    white-space: nowrap;
}

body.reset-password-page .reset-header h2 {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 28px !important;
    color: #e15a11;
    letter-spacing: 0.56px;
    margin: 0;
    line-height: normal;
}

body.reset-password-page .reset-header p {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px !important;
    color: #666666;
    margin: 0;
    line-height: normal;
}

/* Form */
body.reset-password-page .reset-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.reset-password-page .form-group {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

body.reset-password-page .password-wrapper {
    position: relative;
    width: 100%;
}

body.reset-password-page .input-field {
    width: 100%;
    height: 34px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 0 46px 0 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

body.reset-password-page .input-field::placeholder {
    color: #929292;
    font-weight: 500;
}

body.reset-password-page .input-field:focus {
    border-color: #e15a11;
}

body.reset-password-page .input-field.error {
    border-color: #dc2626;
}

body.reset-password-page .toggle-password-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #929292;
}

body.reset-password-page .error-message {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

body.reset-password-page .error-message.active {
    display: block;
}

body.reset-password-page .password-requirements {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 11px !important;
    color: #666666;
    margin-top: -8px;
}

body.reset-password-page .reset-button {
    position: relative;
    width: 100%;
    height: 34px;
    margin-top: 8px;
    background-color: #e15a11;
    opacity: 0.5;
    border: none;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
    cursor: not-allowed;
    transition: opacity 0.3s, background-color 0.3s;
}

body.reset-password-page .reset-button span {
    line-height: 34px;
}

body.reset-password-page .reset-button.active {
    opacity: 1;
    cursor: pointer;
}

body.reset-password-page .reset-button.active:hover {
    background-color: #c94e0e;
}

body.reset-password-page .back-to-login {
    text-align: center;
    margin-top: 20px;
}

body.reset-password-page .back-link {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #e15a11;
    text-decoration: none;
    line-height: 24px;
    white-space: nowrap;
}

body.reset-password-page .back-link:hover {
    text-decoration: underline;
}

/* Modal Overlay - Reset Password specific */
body.reset-password-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

body.reset-password-page .modal-overlay.active {
    display: flex;
}

body.reset-password-page .success-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.25);
    width: 450px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    align-items: center;
}

body.reset-password-page .success-icon {
    width: 60px;
    height: 60px;
    background-color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin-bottom: 10px;
}

body.reset-password-page .modal-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #e15a11;
    margin: 0;
    text-align: center;
    line-height: normal;
}

body.reset-password-page .modal-message {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #666666;
    margin: 0;
    text-align: center;
    line-height: normal;
}

body.reset-password-page .modal-button {
    width: 100%;
    height: 34px;
    background-color: #e15a11;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
    margin-top: 10px;
    transition: background-color 0.3s;
}

body.reset-password-page .modal-button:hover {
    background-color: #c94e0e;
}

body.reset-password-page .expired-message {
    display: none;
    text-align: center;
    padding: 20px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 20px;
}

body.reset-password-page .expired-message.active {
    display: block;
}

body.reset-password-page .expired-title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #dc2626;
    margin-bottom: 8px;
}

body.reset-password-page .expired-text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #991b1b;
    line-height: normal;
}

/* Reset password title/subtitle – same responsive font sizing as login (all languages) */
@media (max-width: 768px) {
    body.reset-password-page .reset-header h2 {
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    body.reset-password-page .reset-header h2 {
        font-size: 22px !important;
    }
    body.reset-password-page .reset-header p {
        font-size: 11px !important;
    }
}

/* ============================================
   RESET PASSWORD PAGE – MOBILE RESPONSIVE
   ============================================ */

/* Large tablets and below (960px) */
@media (max-width: 960px) {
    body.reset-password-page {
        padding: 20px;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
    }

    body.reset-password-page .container {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    body.reset-password-page .wave-pattern {
        display: none;
    }

    body.reset-password-page .left-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        padding: 30px 20px;
        gap: 20px;
    }

    body.reset-password-page .logo-section {
        justify-content: center;
    }

    body.reset-password-page .logo-text {
        width: auto;
        text-align: center;
    }

    body.reset-password-page .features {
        gap: 16px;
    }

    body.reset-password-page .feature-item {
        justify-content: center;
    }

    body.reset-password-page .feature-text {
        width: auto;
        text-align: center;
    }

    body.reset-password-page .reset-card {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: 0;
        border-radius: 0 0 16px 16px;
        padding: 30px 20px;
    }

    body.reset-password-page .reset-header {
        margin-bottom: 32px;
    }

    body.reset-password-page .reset-form {
        gap: 14px;
    }

    body.reset-password-page .form-group {
        width: 100%;
    }
}

/* Tablet and below (768px) */
@media (max-width: 768px) {
    body.reset-password-page {
        padding: 20px;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
    }

    body.reset-password-page .container {
        width: 100%;
        max-width: 600px;
        height: auto;
        min-height: auto;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    body.reset-password-page .wave-pattern {
        display: none;
    }

    body.reset-password-page .left-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        padding: 30px 20px;
        gap: 20px;
    }

    body.reset-password-page .logo-section {
        justify-content: center;
    }

    body.reset-password-page .logo-text {
        width: auto;
        text-align: center;
    }

    body.reset-password-page .features {
        gap: 16px;
    }

    body.reset-password-page .feature-item {
        justify-content: center;
    }

    body.reset-password-page .feature-text {
        width: auto;
        text-align: center;
    }

    body.reset-password-page .reset-card {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: 0;
        border-radius: 0 0 16px 16px;
        padding: 30px 20px;
    }

    body.reset-password-page .reset-header {
        margin-bottom: 28px;
    }

    body.reset-password-page .reset-form {
        padding: 0;
        gap: 14px;
    }

    body.reset-password-page .form-group {
        width: 100%;
    }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
    body.reset-password-page {
        padding: 16px;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
    }

    body.reset-password-page .container {
        border-radius: 12px;
        max-width: 100%;
        width: 100%;
        min-height: auto;
    }

    body.reset-password-page .left-content {
        padding: 20px 16px;
        gap: 16px;
        display: none;
    }

    body.reset-password-page .reset-card {
        padding: 24px 16px;
        border-radius: 0 0 12px 12px;
    }

    body.reset-password-page .reset-header {
        margin-bottom: 24px;
    }

    body.reset-password-page .reset-form {
        gap: 12px;
    }

    body.reset-password-page .input-field {
        height: 44px;
        font-size: 16px;
        padding: 14px 16px;
    }

    body.reset-password-page .reset-button {
        height: 48px;
        font-size: 16px;
        min-height: 48px;
    }

    body.reset-password-page .password-requirements {
        font-size: 11px;
    }

    body.reset-password-page .back-link {
        font-size: 14px;
    }

    body.reset-password-page .success-modal,
    body.reset-password-page .modal-overlay .success-modal {
        width: 90%;
        max-width: 340px;
        padding: 24px 20px;
    }

    body.reset-password-page .modal-title {
        font-size: 20px;
    }

    body.reset-password-page .modal-message {
        font-size: 14px;
    }
}

/* Small mobile (360px and below) */
@media (max-width: 360px) {
    body.reset-password-page {
        padding: 12px;
    }

    body.reset-password-page .reset-card {
        padding: 20px 12px;
    }

    body.reset-password-page .reset-header {
        margin-bottom: 20px;
    }
}

/* Custom Modal Component Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.show {
    opacity: 1;
}

.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.custom-modal-container {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.custom-modal.show .custom-modal-container {
    transform: scale(1);
}

.custom-modal-content {
    padding: 0;
}

.custom-modal-header {
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.custom-modal-title {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.custom-modal-body {
    padding: 16px 24px;
}

.custom-modal-message {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.custom-modal-warning-box {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.custom-modal-warning-message {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
}

.custom-modal-footer {
    padding: 12px 24px 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-modal-btn {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.custom-modal-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.custom-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-modal-btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.custom-modal-btn-cancel:hover:not(:disabled) {
    background-color: #e5e7eb;
}

.custom-modal-btn-confirm {
    background-color: #e15a11;
    color: white;
}

.custom-modal-btn-confirm:hover:not(:disabled) {
    background-color: #c94c0e;
}

.custom-modal-btn-confirm:focus {
    box-shadow: 0 0 0 3px rgba(225, 90, 17, 0.2);
}

.custom-modal-btn-danger {
    background-color: #dc2626;
    color: white;
}

.custom-modal-btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
}

.custom-modal-btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.custom-modal-btn-success {
    background-color: #10b981;
    color: white;
}

.custom-modal-btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.custom-modal-btn-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

@media (max-width: 640px) {
    .custom-modal-container {
        width: 95%;
        margin: 16px;
    }
    
    .custom-modal-header {
        padding: 14px 20px 10px 20px;
    }
    
    .custom-modal-title {
        font-size: 16px;
    }
    
    .custom-modal-body {
        padding: 14px 20px;
    }
    
    .custom-modal-message {
        font-size: 14px;
    }
    
    .custom-modal-warning-box {
        margin-top: 12px;
        padding: 10px 14px;
    }
    
    .custom-modal-warning-message {
        font-size: 13px;
    }
    
    .custom-modal-footer {
        padding: 10px 20px 14px 20px;
        flex-direction: column-reverse;
    }
    
    .custom-modal-btn {
        width: 100%;
    }
}

/* Toast Notification Component Styles */
.toast-container-custom {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast-item {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.toast-item.toast-success {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.toast-item.toast-error {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.toast-item.toast-warning {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.toast-item.toast-info {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
}

.toast-item.toast-debug {
    border-left-color: #8b5cf6;
    background-color: #faf5ff;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.toast-success .toast-icon {
    background-color: #10b981;
    color: white;
}

.toast-error .toast-icon {
    background-color: #ef4444;
    color: white;
}

.toast-warning .toast-icon {
    background-color: #f59e0b;
    color: white;
}

.toast-info .toast-icon {
    background-color: #3b82f6;
    color: white;
}

.toast-debug .toast-icon {
    background-color: #8b5cf6;
    color: white;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-message {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.toast-success .toast-message {
    color: #065f46;
}

.toast-error .toast-message {
    color: #991b1b;
}

.toast-warning .toast-message {
    color: #92400e;
}

.toast-info .toast-message {
    color: #1e40af;
}

.toast-debug .toast-message {
    color: #6b21a8;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: inherit;
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: currentColor;
    opacity: 0.3;
    animation: shrink linear;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast-item.removing {
    animation: slideOut 0.3s ease-in forwards;
}

@media (max-width: 640px) {
    .toast-container-custom {
        right: 10px;
        left: 10px;
        top: 70px;
        max-width: none;
    }

    .toast-item {
        min-width: auto;
        width: 100%;
    }
}

/* Language Switcher Component Styles */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}

.language-switcher-dropdown {
    position: relative;
    display: inline-block;
}

.language-switcher-button {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.language-switcher-button:hover {
    background-color: #f9f9f9;
    border-color: #ff7623;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.language-switcher-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.language-switcher-arrow {
    margin-left: auto;
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.language-switcher-dropdown.active .language-switcher-arrow {
    transform: rotate(180deg);
}

.language-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 150px;
    overflow: hidden;
    z-index: 10000;
}

.language-switcher-dropdown.active .language-switcher-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-switcher-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333333;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.language-switcher-option:hover {
    background-color: #f5f5f5;
}

.language-switcher-option.active {
    background-color: #fff3ed;
    color: #ff7623;
    font-weight: 600;
}

.language-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }

    .language-switcher-button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 100px;
    }
}

/* ==========================================================================
   Base Public Template Styles (for public/unauthenticated pages)
   ========================================================================== */

/* Hide content until translations are loaded to prevent flickering */
body:not(.i18n-ready) {
    visibility: hidden;
    opacity: 0;
}

body.i18n-ready {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease-in;
}

/* ==========================================================================
   Permission Item Styles (used in add_user.html and edit_user.html)
   ========================================================================== */

.permission-item {
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
    min-height: 40px;
    height: auto;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
}

.permission-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

/* Base body styles for public pages */
body.public-page {
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
}

/* Public page - unauthenticated state */
body.public-page:not(.authenticated) {
    display: flex;
    align-items: center;
}

/* Public page - authenticated state */
body.public-page.authenticated {
    background: #f8f9fa;
    padding-top: 70px;
}

/* Reset password page specific body styling */
body.reset-password-page {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth card styles */
.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-body {
    padding: 40px;
}

/* Form control focus styles for public pages */
.public-page .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button primary styles for public pages */
.public-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    transition: transform 0.2s;
}

.public-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Dashboard card styles (if used in public pages) */
.dashboard-card {
    background: white;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

body.dashboard {
    background: #f8f9fa;
}

/* Navbar custom styles */
.navbar-custom {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Alert styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* ==========================================================================
   Notifications Page Styles
   ========================================================================== */
body.notifications-page .main-content {
    background-color: white;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.notifications-page .main-content {
        padding: 14px;
    }
}