/* Start: base/_variables.css */
/* base/_variables.css */
:root {
    /* Colors */
    --primary-color: #49C1C7;
    --secondary-color: #3fa8e1;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border-light: #e2e8f0;
    --bg-light: #f8fafc;
    --background-white: rgba(255, 255, 255, 0.9);
    --gradient-color-1: rgba(73, 193, 199, 0.6);
    --gradient-color-2: rgba(73, 142, 199, 0.6);
    --gradient-color-3: rgba(199, 73, 175, 0.6);
    --card-color: rgba(226, 223, 223, 0.8);

    /* Fonts */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Breakpoints */
    --breakpoint-xs: 20rem;     /* 320px */
    --breakpoint-sm: 36rem;     /* 576px */
    --breakpoint-md: 48rem;     /* 768px */
    --breakpoint-lg: 62rem;     /* 992px */
    --breakpoint-xl: 75rem;     /* 1200px */
    
    /* Container Max Widths */
    --container-sm: 34rem;      /* 544px */
    --container-md: 45rem;      /* 720px */
    --container-lg: 60rem;      /* 960px */
    --container-xl: 71.25rem;   /* 1140px */

    /* Spacing Scale (8pt grid) */
    --space-1: 0.25rem;         /* 4px */
    --space-2: 0.5rem;          /* 8px */
    --space-3: 1rem;            /* 16px */
    --space-4: 1.5rem;          /* 24px */
    --space-5: 2rem;            /* 32px */
    --space-6: 3rem;            /* 48px */
    --space-7: 4rem;            /* 64px */
    --space-8: 6rem;            /* 96px */

    /* Typography - Fluid Sizes */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.25rem);

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Z-index Scale */
    --z-0: 0;
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
    --z-auto: auto;
}
/* End: base/_variables.css */

/* Start: base/_reset.css */
/* base/_reset.css */
/* Box sizing */
*, *::before, *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

/* Document */
html {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* Body */
body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
    position: relative;
    line-height: 1.6;
    background-image: url('../images/website_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: var(--z-below);
    pointer-events: none;
}

/* Reset margins */
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

/* Remove list styles */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Reset core body defaults */
main {
    display: block;
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button:focus {
    outline: none;
}

button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reset form elements */
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Make images responsive */
img, picture, video {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Remove text decoration */
a {
    color: inherit;
    text-decoration: none;
}

/* Table reset */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    body {
        -webkit-text-size-adjust: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    body::before {
        display: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    body {
        background: none !important;
        color: black !important;
    }

    body::before {
        display: none;
    }
}

/* Fix 100vh on mobile */
@supports (-webkit-touch-callout: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
}
/* End: base/_reset.css */

/* Start: base/_typography.css */
/* base/_typography.css */
/* Base Font Settings */
:root {
    --font-scale: 1;
    --base-font-size: calc(16px * var(--font-scale));
}

html {
    font-size: var(--base-font-size);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    font-size: 1rem;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
    width: 100%;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Header Title */
.header h1 {
    font-size: clamp(1.125rem, 2vw + 0.5rem, 1.5rem);
    font-weight: 500;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

/* Section Titles */
.bahagian-title {
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
    font-weight: 600;
    letter-spacing: 0.5px;
    width: 100%;
}

.seksyen-title {
    font-size: clamp(0.875rem, 1.2vw + 0.5rem, 1.125rem);
    font-weight: 500;
    width: 100%;
}

/* Paragraphs */
p {
    margin: 0 0 1rem;
    max-width: 70ch;
    width: 100%;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--secondary-color);
}

/* Lists */
ul, ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    width: 100%;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

/* Table Typography */
.results-table th {
    font-size: clamp(0.75rem, 1vw + 0.25rem, 0.875rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.results-table td {
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
}

/* Form Labels */
label {
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
    font-weight: 500;
}

/* Helper Text Classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* Line Height Classes */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.6; }
.leading-loose { line-height: 2; }

/* Font Weight Classes */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Responsive Text */
@media (max-width: 767px) {
    :root {
        --font-scale: 0.9;
    }

    .header h1 {
        font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
    }

    .bahagian-title {
        font-size: clamp(0.875rem, 1.2vw + 0.5rem, 1.125rem);
    }

    .seksyen-title {
        font-size: clamp(0.75rem, 1vw + 0.5rem, 1rem);
    }

    p {
        font-size: 0.9rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        text-shadow: none;
    }

    a {
        text-decoration: underline;
    }
}

/* Print Typography */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 18pt; }
    h4 { font-size: 16pt; }
    h5 { font-size: 14pt; }
    h6 { font-size: 12pt; }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* Text Truncation */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* End: base/_typography.css */

/* Start: base/_utilities.css */
/* base/_utilities.css */
/* Layout */
.full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.container-full {
    width: 100%;
    max-width: none;
}

.container-fluid {
    width: 100%;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-initial { flex: initial; }
.flex-none { flex: none; }
.flex-grow { flex-grow: 1; }
.flex-shrink { flex-shrink: 1; }
.flex-no-shrink { flex-shrink: 0; }

/* Flex Alignment */
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.items-baseline { align-items: baseline; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Spacing */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }

.p-0 { padding: 0; }
.px-sm { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-lg { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Width and Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }

/* Typography */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Colors */
.bg-white { background-color: white; }
.bg-transparent { background-color: transparent; }
.text-white { color: white; }
.text-primary { color: var(--primary-color); }

/* Borders */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }

/* Responsive Utilities */
@media (max-width: 640px) {
    .xs\:hidden { display: none; }
    .xs\:block { display: block; }
    .xs\:flex-col { flex-direction: column; }
    .xs\:w-full { width: 100%; }
    .xs\:text-sm { font-size: var(--text-sm); }
    .xs\:px-sm { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
}

@media (min-width: 641px) and (max-width: 768px) {
    .sm\:hidden { display: none; }
    .sm\:block { display: block; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .md\:hidden { display: none; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:px-lg { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
}

@media (min-width: 1025px) {
    .lg\:hidden { display: none; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:px-xl { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
}

/* Touch Target Sizes */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Scrolling */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.scrolling-touch { -webkit-overflow-scrolling: touch; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus-visible:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print */
@media print {
    .print\:hidden { display: none !important; }
    .print\:break-inside-avoid { break-inside: avoid; }
    .print\:break-after-avoid { break-after: avoid; }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .high-contrast\:border { border: 1px solid currentColor; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .reduce-motion\:transform-none { transform: none; }
    .reduce-motion\:transition-none { transition: none; }
}
/* End: base/_utilities.css */

/* Start: layouts/_containers.css */
/* layouts/_containers.css */
/* Base Layout */
html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main Layout */
.main-content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(
        to right,
        var(--gradient-color-1),
        var(--gradient-color-2),
        var(--gradient-color-3)
    );
    padding: var(--space-4) 0;
}

/* Container System */
.container-fluid {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Directory Container */
.directory-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) 0;
}

/* Directory Title */
.directory-title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-4);
    line-height: var(--leading-tight);
    width: 100%;
}

/* Search Section */
.search-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

/* Directory Form */
.directory-form {
    width: 100%;
    padding: var(--space-4);
    background: var(--card-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Form Grid System */
.form-grid {
    display: grid;
    gap: var(--space-4);
    width: 100%;
}

.form-row-four {
    display: grid;
    gap: var(--space-3);
    width: 100%;
}

/* Responsive Grid */
@media (min-width: 36rem) {
    .form-row-four {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 48rem) {
    .container-fluid {
        padding: 0 var(--space-6);
    }
    
    .form-row-four {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 62rem) {
    .form-row-four {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Zoom Handling */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px; /* Fixed max-width for very large screens */
    }
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-dark);
}

.form-group select,
.form-group input {
    width: 100%;
    padding: var(--space-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    transition: border-color 0.2s ease;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: var(--space-4);
}

/* Touch Device Optimizations */
@media (hover: none) {
    .form-group select,
    .form-group input {
        min-height: 2.75rem; /* Larger touch targets */
        font-size: var(--text-lg);
    }
}

/* Force Mobile Viewport */
@media screen and (max-width: 767px) {
    body {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-content {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container-fluid {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-container {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-title {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .search-section {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 1rem !important;
        margin: 0 !important;
    }

    .directory-form {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .form-grid,
    .form-row-four,
    .form-group {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .form-group select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Desktop and Tablet Styles */
@media (min-width: 768px) {
    .main-content {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .container-fluid {
        width: 90% !important;
        max-width: 90% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding-top: calc((100vh - var(--header-height) - var(--footer-height)) * 0.08);
        margin: 0 auto !important;
    }

    .directory-container {
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .search-section {
        padding: 0 2rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .directory-form {
        padding: var(--spacing-md) !important;
        background: var(--card-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    body {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-content {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container-fluid {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-container {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-title {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .search-section {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 1rem !important;
        margin: 0 !important;
    }

    .directory-form {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .form-grid,
    .form-row-four,
    .form-group {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .form-group select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    body {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-content {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 15% !important;
    }

    .container-fluid {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-container {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .directory-title {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .search-section {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .directory-form {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .form-grid,
    .form-row-four,
    .form-group {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .form-group select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Larger Desktop Styles */
@media (min-width: 1024px) {
    .directory-container {
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .directory-form {
        padding: var(--spacing-md) !important;
        margin: 0 auto !important;
        background: var(--card-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .directory-container {
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .directory-form {
        padding: 2rem !important;
        margin: 0 auto !important;
    }
}

/* Search Active State */
.directory-container.search-active {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: 0 !important;
}

/* Desktop Search Active */
@media (min-width: 768px) {
    .directory-container.search-active {
        flex-direction: row;
        gap: var(--spacing-lg);
        align-items: flex-start;
    }

    .directory-container.search-active .directory-form {
        width: 300px;
        flex-shrink: 0;
        position: sticky;
        top: var(--spacing-md);
        margin: 0;
    }

    .directory-container:not(.search-active) .directory-form {
        margin-top: 8vh;
    }
}

/* Mobile Search Active */
@media (max-width: 767px) {
    .directory-container.search-active {
        flex-direction: column;
    }

    .directory-container.search-active .directory-form {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--bg-light);
        margin-bottom: var(--spacing-sm);
        width: 100%;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .directory-container.search-active {
        height: auto;
        min-height: 100%;
    }

    .directory-container.search-active .directory-form {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--bg-light);
        margin-bottom: var(--spacing-md);
    }
}

/* Results Content */
.results-content {
    position: relative;
}
/* End: layouts/_containers.css */

/* Start: layouts/_sections.css */
/* Section Layouts */

/* Directory Title */
.directory-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    padding: var(--spacing-lg);
    border-left: 4px solid var(--primary-color);
    background: var(--card-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(5px);
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* End: layouts/_sections.css */

/* Start: components/_header.css */
/* components/_header.css */
body > header.header {
    width: 100%;
    background: linear-gradient(
        to right,
        var(--gradient-color-1),
        var(--gradient-color-2),
        var(--gradient-color-3)
    );
    padding: 2rem 10%;
    position: relative;
}

body > header.header > nav.header-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 10%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

body > header.header img.logo {
    width: 110%;
    max-width: 500px;
    height: auto;
}

body > header.header a.portal-link {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
}

body > header.header a.portal-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

body > header.header h1 {
    color: white;
    text-align: center;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
    padding: 0 60px;
}

/* Desktop Styles */
@media (min-width: 1024px) {
    body > header.header {
        padding: 2rem 10% !important;
    }
    
    body > header.header > nav.header-nav {
        right: 10% !important;
    }
}

/* Tablet and Mobile Styles */
@media screen and (max-width: 1023px) {
    body > header.header {
        padding: 1rem 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    body > header.header > nav.header-nav {
        position: static;
        transform: none;
        margin-top: 1rem;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        right: auto;
    }

    body > header.header img.logo {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }

    body > header.header h1 {
        font-size: 16px;
        padding: 0 20px;
        margin: 0.5rem 0;
    }

    body > header.header a.portal-link {
        margin: 0 auto;
        display: inline-block;
    }
}
/* End: components/_header.css */

/* Start: components/_footer.css */
/* Updated Footer Styles */
.footer {
    width: 100%;
    background: linear-gradient(
        to right,
        var(--gradient-color-1),
        var(--gradient-color-2),
        var(--gradient-color-3)
    );
    padding: 2rem 0;
    color: white;
    margin-top: auto;
    position: relative;
    z-index: var(--z-normal);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-transform: uppercase;
}

.footer-info {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.footer-info p {
    margin-bottom: 0.75rem;
}

.contact-info {
    margin-top: 1rem;
}

.contact-info p {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.contact-label {
    min-width: 45px;
    font-weight: 500;
}

.bottom-nav {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding: 1.5rem 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease;
}

.nav-link:last-child {
    border-right: none;
}

.nav-link:hover {
    color: white;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-section:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        padding: 0 1rem;
        text-align: center;
    }

    .footer-section:last-child {
        grid-column: span 1;
    }

    .contact-info p {
        justify-content: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        border-right: none;
        padding: 0.5rem 0;
    }
}
/* End: components/_footer.css */

/* Start: components/_buttons.css */
/* components/_buttons.css */
/* Base Button Styles */
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    padding: 0.875rem var(--spacing-lg);
    width: 100%;
    min-height: 44px;
}

/* Primary Button */
.search-btn {
    background: linear-gradient(135deg, var(--primary-color), #3fa8e1);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(73, 193, 199, 0.2);
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(73, 193, 199, 0.3);
    background: linear-gradient(135deg, #3fa8e1, var(--primary-color));
}

.search-btn:active {
    transform: translateY(0);
}

/* Secondary Button */
.reset-btn {
    background: var(--bg-light);
    color: var(--text-medium);
    border: 1px solid var(--border-light);
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.reset-btn:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.reset-btn:active {
    transform: translateY(1px);
}

/* Icon Button */
.icon-button {
    width: 44px;
    height: 44px;
    padding: var(--spacing-xs);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    background: transparent;
}

.icon-button:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Loading State */
.button-loading {
    position: relative;
    cursor: wait;
}

.button-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Button Sizes */
.button-sm {
    padding: 0.5rem var(--spacing-sm);
    font-size: var(--text-xs);
    min-height: 36px;
}

.button-lg {
    padding: 1rem var(--spacing-xl);
    font-size: var(--text-base);
    min-height: 52px;
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Disabled State */
button:disabled,
.button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .button,
    button {
        width: auto;
    }

    .button-group {
        flex-direction: row;
        justify-content: flex-end;
    }

    .search-btn {
        min-width: 120px;
    }

    .reset-btn {
        min-width: 100px;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .button,
    button {
        width: auto;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .button,
    button {
        padding: 0.75rem var(--spacing-md);
        font-size: 16px;
    }

    .button-group {
        margin-top: var(--spacing-md);
    }

    .icon-button {
        width: 40px;
        height: 40px;
    }
}

/* Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .search-btn {
        background: var(--primary-color);
        border: 2px solid currentColor;
    }

    .reset-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .button,
    button {
        transition: none;
    }

    .search-btn:hover {
        transform: none;
    }

    .button-loading::after {
        animation: none;
    }
}

/* Print */
@media print {
    .button-group {
        display: none;
    }
}
/* End: components/_buttons.css */

/* Start: components/_forms.css */
/* components/_forms.css */
/* Form Container */
.directory-form {
    background: var(--card-color);
    padding: 0.5rem var(--spacing-lg) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(5px);
    transition: var(--transition-slow);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Form Grid */
.form-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin: 0;
}

.form-row-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin: 0;
}

/* Form Row Four */
.form-row-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
    align-items: flex-start;
}

.form-row-four .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

.form-row-four .form-group label {
    display: inline-block;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    line-height: 1;
}

.form-row-four .form-group select {
    display: block;
    width: 100%;
    height: 45px;
    margin: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

.form-group[style*="display: none"] {
    display: none !important;
    grid-column: span 0;
}

.form-group:not([style*="display: none"]) {
    grid-column: span 1;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    line-height: 1.5;
    height: 1.5rem;
}

/* Base styles for all selects and inputs */
.form-group select,
.form-group input {
    display: block;
    width: 100%;
    height: 45px;
    margin: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Disabled state */
.form-group select:disabled {
    background-color: var(--input-disabled-bg, #f5f5f5);
    color: var(--text-disabled, #999);
    cursor: not-allowed;
    opacity: 0.8;
    border-color: var(--border-disabled, #ddd);
}

/* Hover state for enabled selects */
.form-group select:not(:disabled):hover {
    border-color: var(--border-hover, #999);
}

/* Focus state for enabled selects */
.form-group select:not(:disabled):focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Remove default arrow in IE */
.form-group select::-ms-expand {
    display: none;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Buttons */
.search-btn,
.reset-btn {
    padding: 0.4rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn {
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
}

.search-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.search-btn:disabled {
    background-color: #808080 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    color: #ffffff;
}

.reset-btn {
    background-color: var(--bg-light);
    color: var(--text-medium);
}

.reset-btn:hover {
    background-color: var(--border-light);
}

/* Search Active Form State */
.directory-container.search-active .directory-form {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0;
    background: var(--card-color);
    backdrop-filter: blur(10px);
}

/* Form Title */
.form-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--text-dark);
}

/* Labels */
label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
    font-weight: 500;
}

/* Select Inputs */
select, input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition-base);
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(73, 193, 199, 0.1);
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Icon-only Search Button */
.search-button {
    background: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.search-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background: var(--gray-400);
}

.search-button:hover:not(:disabled) {
    background: var(--primary-dark);
}

.search-button .fa-search {
    font-size: 1rem;
}

.search-button .fa-spin {
    color: white;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .form-row-four {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .form-group {
        width: auto;
    }

    .form-group select {
        width: auto;
        min-width: 350px;
    }
}

/* Tablet and Mobile Styles */
@media (max-width: 1023px) {
    .directory-container.search-active .directory-form {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: var(--spacing-md);
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .form-grid {
        padding: 0;
        margin: 0;
        width: 100%;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        min-height: auto;
        margin-bottom: 1rem;
    }
    
    .form-row-four {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .directory-form {
        padding: 0 !important;
    }
    
    .form-row-four {
        gap: 0.5rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .directory-form {
        border: 2px solid currentColor;
    }
}
/* End: components/_forms.css */

/* Start: components/_tables.css */
/* Table Container */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
    background: white;
}

/* Modern Table Wrapper */
.modern-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Modern Table Base */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Styles */
.modern-table-header {
    background-color: #f8fafc;
}

.modern-table th {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Column Specific Widths */
.modern-table .col-bil {
    width: 60px;
}

.modern-table .col-gambar {
    width: 100px;
}

.modern-table .col-nama {
    min-width: 200px;
}

.modern-table .col-jawatan {
    min-width: 180px;
}

.modern-table .col-samb {
    width: 100px;
}

.modern-table .col-emel {
    min-width: 200px;
}

/* Body Styles */
.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    vertical-align: middle;
}

/* Row Hover Effect */
.modern-table tbody tr:hover {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* Staff Image Styles */
.staff-image-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f1f5f9;
}

.staff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Staff Information Styles */
.staff-name {
    font-weight: 500;
    color: #1e293b;
}

.staff-position {
    color: #475569;
    margin-bottom: 0.25rem;
}

.staff-grade {
    font-size: 0.85rem;
    color: #64748b;
}

.staff-contact {
    font-family: monospace;
    font-size: 0.95rem;
    color: #475569;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
    display: inline-block;
}

.staff-email {
    font-size: 0.95rem;
}

.staff-email a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.staff-email a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-table-wrapper {
        margin: 1rem 0;
        border-radius: 8px;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.75rem;
    }

    .staff-image-wrapper {
        width: 48px;
        height: 48px;
    }

    .staff-name {
        font-size: 0.9rem;
    }

    .staff-position,
    .staff-grade {
        font-size: 0.85rem;
    }
}

/* Group Headers */
.bahagian-header,
.seksyen-header,
.unit-header {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.bahagian-header {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.seksyen-header {
    background: #f1f5f9;
    color: #1e293b;
    margin-left: 1rem;
}

.unit-header {
    background: #f8fafc;
    color: #475569;
    margin-left: 2rem;
    border: 1px solid #e2e8f0;
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-text {
    font-weight: 500;
    flex: 1;
}

.staff-count-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.seksyen-header .staff-count-badge {
    background: #e2e8f0;
    color: #475569;
}

.unit-header .staff-count-badge {
    background: #f1f5f9;
    color: #64748b;
}

/* Results Count */
.results-count {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f1f5f9;
    border-radius: 8px;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.search-box input {
    border: none;
    outline: none;
    padding: 0.5rem;
    width: 100%;
    font-size: 0.95rem;
}

.search-box .clear-button {
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}
/* End: components/_tables.css */

/* Start: components/_search.css */
/* components/_search.css */
/* Search Section Styles */
.search-section {
    width: 100%;
    padding: 0 var(--space-4);
}

.search-group {
    padding: 0 var(--space-4);
}

.search-group label {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-2);
    display: block;
}

.search-input-group {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
    width: 100%;
}

.search-input {
    flex: 1;
    width: 100%;
    padding: var(--space-3);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background-color: var(--bg-light);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(73, 193, 199, 0.2);
}

/* Search Button */
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    height: 100%;
}

.search-button:hover:not(:disabled) {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(73, 193, 199, 0.1);
}

.search-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Row */
.search-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

/* Remove the special treatment for second row */
/* .search-row:nth-child(2) .form-group {
    grid-column: 1 / -1;
} */

.search-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.search-form .form-group {
    margin: 0;
    width: 100%;
}

.search-form .form-group select,
.search-form .form-group input {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .search-form .form-group {
        width: 100%;
    }
}

/* Table Search Container */
.search-container {
    position: relative;
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    padding: 0 var(--space-4);
}

.table-search {
    width: 100%;
    padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background-color: var(--bg-light);
}

.search-clear {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    padding: var(--space-1);
    font-size: var(--text-lg);
    line-height: 1;
    border-radius: 50%;
}

.search-clear:hover {
    color: var(--text-dark);
    background-color: var(--border-light);
}

/* Results Header */
.results-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Results Count */
.results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
}

.count-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: clamp(1rem, 1.2vw + 0.25rem, 1.25rem);
}

/* Search Controls */
.search-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Loading State */
.search-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.search-loading::after {
    content: '';
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

/* Empty State */
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    margin: var(--spacing-md) 0;
}

/* Results Visibility */
.results-hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.results-visible {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    visibility: visible;
}

/* Results Wrapper */
.results-wrapper {
    transition: opacity 0.3s ease-in-out;
    margin-top: 2rem;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Department Group */
.department-group {
    margin-bottom: 2rem;
}

.department-group h3 {
    padding: 1rem;
    margin: 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

/* Results Table */
.results-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.results-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.results-table tr:hover {
    background-color: var(--bg-hover);
}

/* Loading Text */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Error Text */
.error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .search-container {
        min-width: 300px;
        max-width: 400px;
    }

    .results-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-lg);
    }

    .search-controls {
        flex-direction: row;
        width: auto;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .results-header {
        flex-direction: row;
        flex-wrap: wrap;
        padding: var(--spacing-md);
    }

    .search-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .search-input {
        font-size: var(--text-lg);
        padding: var(--space-4) var(--space-4) var(--space-4) var(--space-6);
    }

    .search-button {
        padding: var(--space-3);
        right: var(--space-2);
    }

    .results-header {
        padding: var(--spacing-sm);
    }

    .no-results {
        padding: var(--spacing-lg);
        margin: var(--spacing-sm) 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 48rem) {
    .search-section {
        padding: 0 var(--space-3);
    }

    .search-group {
        padding: 0 var(--space-3);
    }

    .search-input {
        font-size: var(--text-lg);
    }

    .form-row-full {
        padding: var(--space-2);
    }

    .search-button {
        padding: var(--space-3);
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .search-input {
        -webkit-appearance: none;
        font-size: var(--text-lg);
    }

    .search-button {
        min-width: 48px;
        min-height: 48px;
    }
}

/* Search Form Gradient */
.search-form-gradient {
    padding: var(--space-3);
    background: linear-gradient(to right, var(--gradient-color-1), var(--gradient-color-2), var(--gradient-color-3));
}

.search-form-gradient label {
    color: black;
    font-weight: 500;
}

/* Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .search-input {
        border: 2px solid currentColor;
    }

    .search-clear {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .search-input,
    .search-clear {
        transition: none;
    }

    .search-loading::after {
        animation: none;
    }
}

/* Search Results Styling */
.results-container {
    margin-top: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.results-count {
    font-size: 1.1rem;
    color: #666;
}

.count-number {
    font-weight: bold;
    color: #333;
}

.department-group {
    margin-bottom: 2rem;
}

.department-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.table-responsive {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.results-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.results-table tr:hover {
    background-color: #f8f9fa;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-message {
    color: #dc3545;
    padding: 0.75rem;
    margin: 1rem 0;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Loading State */
.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
/* End: components/_search.css */

/* Start: components/_directory-table.css */
/* 
 * Directory Table Styles
 * Consolidated from: directory-table.css, modern-table.css, new-table.css
 */

/* Table Container */
.directory-table-container,
.table-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table Styles */
.directory-table,
.custom-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override any inline styles */
table[style],
.directory-table[style],
.custom-table[style],
.directory-table[style*="width"],
.directory-table[style*="min-width"],
.directory-table[style*="max-width"],
.custom-table[style*="width"],
.custom-table[style*="min-width"],
.custom-table[style*="max-width"] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

/* Column Widths - Apply to both desktop and mobile */
.directory-table th,
.directory-table td,
.custom-table th,
.custom-table td {
    padding: 1rem !important;
    display: table-cell !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Gred column specific styles */
.directory-table td[data-column="gred"],
.custom-table td[data-column="gred"] {
    white-space: nowrap !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
}

/* Fixed column widths */
.directory-table th:first-child,
.directory-table td:first-child,
.custom-table th:first-child,
.custom-table td:first-child {
    width: 65px !important;
    min-width: 65px !important;
}

.directory-table th:nth-child(2),
.directory-table td:nth-child(2),
.custom-table th:nth-child(2),
.custom-table td:nth-child(2) {
    width: 100px !important;
    min-width: 100px !important;
}

.directory-table th:nth-child(3),
.directory-table td:nth-child(3),
.custom-table th:nth-child(3),
.custom-table td:nth-child(3) {
    width: 250px !important;
    min-width: 250px !important;
}

.directory-table th:nth-child(4),
.directory-table td:nth-child(4),
.custom-table th:nth-child(4),
.custom-table td:nth-child(4) {
    width: 200px !important;
    min-width: 200px !important;
    display: table-cell !important; /* Explicitly force Jawatan column */
}

.directory-table th:nth-child(5),
.directory-table td:nth-child(5),
.custom-table th:nth-child(5),
.custom-table td:nth-child(5) {
    width: 70px !important;
    min-width: 70px !important;
    text-align: center !important;
}

.directory-table th:nth-child(6),
.directory-table td:nth-child(6),
.custom-table th:nth-child(6),
.custom-table td:nth-child(6) {
    width: 100px !important;
    min-width: 100px !important;
    text-align: center !important;
}

.directory-table th:last-child,
.directory-table td:last-child,
.custom-table th:last-child,
.custom-table td:last-child {
    width: 300px !important;
    min-width: 300px !important;
    text-align: center !important;
}

/* Image column specific styles */
.directory-table td:nth-child(2),
.custom-table td:nth-child(2) {
    padding: 0.5rem !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Image styles */
.directory-table td:nth-child(2) img,
.custom-table td:nth-child(2) img {
    width: 100px !important;
    height: 100px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Default profile image styles */
.directory-table td:nth-child(2) .default-profile,
.custom-table td:nth-child(2) .default-profile {
    width: 85px !important;
    height: 100px !important;
    background-color: #f0f0f0 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

.directory-table td:nth-child(2) .default-profile i,
.custom-table td:nth-child(2) .default-profile i {
    font-size: 40px !important;
    color: #999 !important;
}

/* Header Styles */
.directory-table thead,
.custom-table thead {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.directory-table th,
.custom-table th {
    font-weight: 500;
    text-align: left;
    color: #495057;
}

/* Body Styles */
.directory-table tbody tr,
.custom-table tbody tr {
    transition: all 0.2s ease;
}

.directory-table tbody tr:hover,
.custom-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.directory-table td,
.custom-table td {
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

/* Email link styles */
.directory-table td:last-child a,
.custom-table td:last-child a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
}

.directory-table td:last-child a:hover,
.custom-table td:last-child a:hover {
    text-decoration: underline !important;
}

/* Staff Image Styles */
.staff-image-wrapper {
    width: 90px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #0066cc;
    margin: 0 auto;
}

.staff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-image-placeholder {
    width: 100%;
    height: 100%;
    background: #0066cc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Staff Information Styles */
.staff-name {
    color: #212529;
    font-weight: 500;
}

.staff-position {
    color: #495057;
}

.staff-contact {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.staff-email a {
    color: #2196F3;
    text-decoration: none;
}

.staff-email a:hover {
    text-decoration: underline;
}

/* Results Count */
.results-count {
    background: #f8f9fa;
    padding: 8px 16px;
    color: #495057;
    border-radius: 4px;
    margin-bottom: 16px;
    display: inline-block;
}

.results-count strong {
    color: #2196F3;
}

/* Search container styles */
.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    max-width: 300px;
    position: relative;
}

.table-search {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.table-search:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.search-clear:hover {
    color: #dc3545;
}

/* Results header layout */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Section Headers */
.main-header {
    padding: 16px;
    background: linear-gradient(90deg, #2196F3 0%, #4CAF50 100%);
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
}

.sub-header {
    padding: 16px;
    background: #2196F3;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .directory-table,
    .custom-table {
        display: table !important;
        width: 100% !important;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .directory-table thead,
    .custom-table thead {
        display: table-header-group !important;
    }

    .directory-table tbody,
    .custom-table tbody {
        display: table-row-group !important;
    }

    .directory-table tr,
    .custom-table tr {
        display: table-row !important;
    }

    .directory-table th,
    .directory-table td,
    .custom-table th,
    .custom-table td {
        display: table-cell !important;
    }

    /* Ensure Jawatan column is visible */
    .directory-table th:nth-child(4),
    .directory-table td:nth-child(4),
    .custom-table th:nth-child(4),
    .custom-table td:nth-child(4) {
        display: table-cell !important;
        width: 200px !important;
        min-width: 200px !important;
    }

    /* Keep image size consistent */
    .staff-image-wrapper {
        width: 90px !important;
        height: 120px !important;
    }
}

/* Make table scrollable on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* End: components/_directory-table.css */

/* Start: components/_sticky-headers.css */
/* Sticky Headers Styles */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #fff;
}

.directory-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

.directory-table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

/* Ensure proper stacking context */
.directory-table {
    position: relative;
    z-index: 1;
}

/* End: components/_sticky-headers.css */

/* Start: components/_results.css */
.directory-container .results-wrapper {
    padding: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-top: 2rem !important;
}

.grouped-results {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure table containers take full width */
.grouped-results > div {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Override any inline styles */
div[style],
.results-wrapper[style],
.grouped-results[style],
.grouped-results > div[style] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.directory-container .results-wrapper.results-hidden {
    display: none !important;
}

.directory-container .results-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
}

.directory-container .results-count {
    font-size: 16px !important;
    color: #666 !important;
}

.directory-container .count-number {
    font-weight: bold !important;
    color: #2196F3 !important;
}

.directory-container .search-container {
    position: relative !important;
    max-width: 300px !important;
}

.directory-container .table-search {
    width: 100% !important;
    padding: 8px 32px 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.directory-container .search-clear {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    color: #999 !important;
    cursor: pointer !important;
    font-size: 18px !important;
    padding: 0 !important;
}

.directory-container .department-section {
    margin-bottom: 2rem !important;
}

/* Department header (Bahagian) */
.directory-container .department-header {
    margin: 0.5rem 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    background: rgba(73, 193, 199, 0.6) !important; /* #49C1C7 with 60% opacity */
    border-radius: 4px;
    color: #ffffff !important;
}

.directory-container .department-header i {
    margin-right: 10px;
    color: #ffffff !important;
}

.directory-container .department-header span {
    color: #ffffff !important;
    font-weight: 500;
}

/* Hover state for department header */
.directory-container .department-header:hover {
    background: rgba(73, 193, 199, 0.7) !important;
}

.directory-container .table-responsive {
    overflow-x: auto !important;
    background: white !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.directory-container .results-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.directory-container .results-table th {
    background-color: #f5f5f5 !important;
    padding: 12px 16px !important;
    text-align: left !important;
    font-weight: bold !important;
    color: #333 !important;
    border-bottom: 2px solid #ddd !important;
    white-space: nowrap !important;
}

.directory-container .results-table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #eee !important;
    vertical-align: middle !important;
}

.directory-container .staff-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.directory-container .profile-image {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    flex-shrink: 0 !important;
}

.directory-container .profile-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .directory-container .results-header {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    .directory-container .search-container {
        max-width: none !important;
    }
    
    .directory-container .staff-info {
        min-width: 200px !important;
    }
}

.directory-container .staff-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    margin: 20px 0 !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.directory-container .staff-table th {
    background: #f8fafc !important;
    padding: 16px 24px !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase !important;
    font-size: 0.875rem !important;
    letter-spacing: 0.05em !important;
}

.directory-container .staff-table td {
    padding: 16px 24px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-size: 0.95rem !important;
}

.directory-container .group-header {
    transition: all 0.2s ease !important;
}

.directory-container .group-header:hover {
    background-color: #f8fafc !important;
}

.directory-container .group-header td {
    padding: 0 !important;
    border: none !important;
}

.directory-container .header-content {
    padding: 16px 24px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

.directory-container .header-content:hover {
    background-color: #f1f5f9 !important;
}

.directory-container .bahagian_header {
    margin: 0.5rem 0;
    padding-left: 32px;
}

.directory-container .bahagian_header .header-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(73, 142, 199, 0.6) !important;
    color: #ffffff !important;
    border-radius: 4px;
}

.directory-container .bahagian_header .header-content i {
    margin-right: 12px;
    color: #ffffff !important;
}

.directory-container .bahagian_header .header-content span {
    color: #ffffff !important;
    font-weight: 500;
}

.directory-container .bahagian_header .header-content:hover {
    background: rgba(73, 142, 199, 0.7) !important;
}

.directory-container .bahagian_header[data-type="unit"] {
    margin: 0.5rem 0;
    padding-left: 64px; /* More indentation for unit */
}

.directory-container .bahagian_header[data-type="unit"] .header-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(199, 73, 175, 0.6) !important; /* #C749AF with 60% opacity */
    color: #ffffff !important;
    border-radius: 4px;
}

.directory-container .bahagian_header[data-type="unit"] .header-content i {
    margin-right: 12px;
    color: #ffffff !important;
}

.directory-container .bahagian_header[data-type="unit"] .header-content span {
    color: #ffffff !important;
    font-weight: 500;
}

.directory-container .bahagian_header[data-type="unit"] .header-content:hover {
    background: rgba(199, 73, 175, 0.7) !important;
}

.directory-container .seksyen-header,
.directory-container .seksyen-header.group-header {
    background: rgba(73, 142, 199, 0.6) !important;
    background-color: rgba(73, 142, 199, 0.6) !important;
    padding-left: 64px;
}

.directory-container .seksyen-header .header-content {
    padding-left: 48px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    background: rgba(73, 142, 199, 0.6) !important;
}

.directory-container .seksyen-header:hover,
.directory-container .seksyen-header .header-content:hover {
    background: rgba(73, 142, 199, 0.7) !important;
}

.directory-container .seksyen-header i {
    margin-right: 12px !important;
    color: #ffffff !important;
    width: 20px !important;
    text-align: center !important;
}

.directory-container .unit-header {
    background-color: #ffffff !important;
}

.directory-container .unit-header .header-content {
    padding-left: 72px !important;
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
}

.directory-container .unit-header i {
    margin-right: 12px !important;
    color: #0ea5e9 !important;
    width: 20px !important;
    text-align: center !important;
}

.directory-container .staff-row td {
    padding: 16px 24px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: white !important;
    transition: all 0.2s ease !important;
}

.directory-container .staff-row:hover td {
    background-color: #f8fafc !important;
}

.directory-container .staff-badge {
    background: #e2e8f0 !important;
    color: #475569 !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    margin-left: 8px !important;
    font-weight: 500 !important;
    display: inline-block !important;
}

.directory-container .chevron-icon {
    margin-left: auto !important;
    transition: transform 0.3s ease !important;
}

.directory-container .collapsed .chevron-icon {
    transform: rotate(-90deg) !important;
}

.directory-container .search-container {
    position: relative !important;
    margin: 20px 0 !important;
    width: 100% !important;
}

.directory-container .search-input {
    width: 100% !important;
    padding: 12px 16px !important;
    padding-left: 40px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.directory-container .search-input:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.directory-container .search-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
}

.directory-container .no-results {
    text-align: center !important;
    padding: 48px 24px !important;
    color: #64748b !important;
    font-style: italic !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin: 20px 0 !important;
}

/* Hide collapsed rows */
.directory-container .collapsed + tr {
    display: none !important;
}

/* Ensure proper nesting visibility */
.directory-container .group-header.collapsed ~ tr:not(.group-header) {
    display: none !important;
}

/* Add some hover feedback */
.directory-container .header-content:active {
    background-color: #e2e8f0 !important;
}

/* Add some animation to row transitions */
.directory-container .staff-row,
.directory-container .group-header {
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.directory-container .staff-row:hover,
.directory-container .group-header:hover {
    transform: translateX(4px) !important;
}

.results-wrapper {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.results-header {
    padding: 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-size: 1.1em;
    color: #333;
}

.results-count i {
    margin-right: 8px;
    color: #2196F3;
}

.count-number {
    font-weight: bold;
    color: #2196F3;
}

.search-container {
    position: relative;
    margin: 20px 0;
}

.table-search {
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 300px;
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: none;
}

.search-clear:hover {
    color: #666;
}

.hierarchical-results {
    padding: 0;
}

.bahagian-container {
    margin-bottom: 30px;
}

.bahagian-header {
    margin-bottom: 15px;
}

.bahagian-title {
    font-size: 1.2em;
    color: #1976D2;
    margin: 0;
    padding: 10px 0;
    border-bottom: 2px solid #1976D2;
}

.bahagian-title i {
    margin-right: 8px;
}

.staff-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.staff-table th {
    background: #f8fafc;
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.staff-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.95rem;
}

.group-header {
    transition: all 0.2s ease;
}

.group-header:hover {
    background-color: #f8fafc !important;
}

.group-header td {
    padding: 0 !important;
}

.header-content {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.header-content:hover {
    background-color: #f1f5f9;
}

.bahagian-header {
    background-color: #f8fafc !important;
}

.bahagian-header .header-content {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 600;
}

.bahagian-header i {
    margin-right: 12px;
    color: #2563eb;
    width: 24px;
    text-align: center;
}

.seksyen-header {
    background-color: #ffffff !important;
}

.seksyen-header .header-content {
    padding-left: 48px;
    color: #334155;
    font-weight: 500;
    font-size: 1rem;
}

.seksyen-header i {
    margin-right: 12px;
    color: #7c3aed;
    width: 20px;
    text-align: center;
}

.unit-header {
    background-color: #ffffff !important;
}

.unit-header .header-content {
    padding-left: 72px;
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
}

.unit-header i {
    margin-right: 12px;
    color: #0ea5e9;
    width: 20px;
    text-align: center;
}

.staff-row td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    transition: all 0.2s ease;
}

.staff-row:hover td {
    background-color: #f8fafc;
}

.staff-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 500;
}

.chevron-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    font-style: italic;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hide collapsed rows */
.collapsed + tr {
    display: none;
}

/* Ensure proper nesting visibility */
.group-header.collapsed ~ tr:not(.group-header) {
    display: none;
}

/* Ensure staff rows are properly spaced */
.staff-row td:first-child {
    padding-left: 72px;
}

/* Add some hover feedback */
.header-content:active {
    background-color: #e2e8f0;
}

/* Improve search input */
.search-input::placeholder {
    color: #94a3b8;
}

/* Add some animation to row transitions */
.staff-row, .group-header {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.staff-row:hover, .group-header:hover {
    transform: translateX(4px);
}

.floating-error {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.floating-error .error-message {
    background-color: #f44336;
    color: white;
    padding: 12px 24px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive styles */
@media (max-width: 1024px) {
    .staff-table {
        display: block;
        overflow-x: auto;
    }

    .table-search {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 15px;
    }

    .staff-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Column widths */
.directory-container .results-table td[data-column="email"],
.directory-container .staff-table td[data-column="email"],
.directory-container table td[data-column="email"] {
    width: 200px !important;  
    min-width: 200px !important;
    max-width: 200px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.directory-container .results-table th[data-column="email"],
.directory-container .staff-table th[data-column="email"],
.directory-container table th[data-column="email"] {
    width: 200px !important;  
    min-width: 200px !important;
    max-width: 200px !important;
}

.directory-container .results-table td[data-column="gambar"],
.directory-container .staff-table td[data-column="gambar"],
.directory-container table td[data-column="gambar"] {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    padding: 8px !important;
    text-align: center !important;
}

.directory-container .results-table td[data-column="gambar"] img,
.directory-container .staff-table td[data-column="gambar"] img,
.directory-container table td[data-column="gambar"] img {
    width: 150px !important;
    height: 180px !important;
    object-fit: cover !important;
    object-position: top center !important;  /* This ensures top part is always visible */
    border-radius: 20px !important;  /* Increased from 4px to 8px for more roundness */
}

.directory-container .results-table th[data-column="gambar"],
.directory-container .staff-table th[data-column="gambar"],
.directory-container table th[data-column="gambar"] {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

/* Ensure table layout is fixed */
.directory-container .results-table,
.directory-container .staff-table,
.directory-container table {
    table-layout: fixed !important;
    width: auto !important;
    min-width: 100% !important;
}




/* End: components/_results.css */

/* Start: components/_staff-directory.css */
/* Table Container */
.table-responsive,
.table-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    margin: 1rem 0 !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    background: white !important;
    flex: 1;
    overflow: auto;
    min-height: 0; /* Important for Firefox */
}

/* Modern Table Styles */
table.modern-table,
table.directory-table,
table.custom-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    border-collapse: collapse !important;
    background: white !important;
    font-size: 0.95rem !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    table-layout: fixed !important;
}

/* Headers */
table.modern-table th {
    background-color: white !important;
    color: #666 !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 1rem !important;
    border-bottom: 2px solid #eee !important;
    font-size: 0.9rem !important;
}

/* Cells */
table.modern-table td {
    padding: 1rem !important;
    border-bottom: 1px solid #eee !important;
    color: #444 !important;
    vertical-align: middle !important;
    background: white !important;
}

/* Group Headers */
table.modern-table .group-header {
    background: transparent !important;
}

table.modern-table .header-cell {
    padding: 0 !important;
}

table.modern-table .header-content {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    cursor: pointer !important;
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
    border-radius: 8px !important;
    transition: background-color 0.2s ease !important;
}

/* Bahagian Header */
table.modern-table .bahagian-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
}

table.modern-table .bahagian-header .header-content {
    background: linear-gradient(135deg, #40B6E6, #0085CA) !important;
    color: white !important;
}

table.modern-table .bahagian-header .staff-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Seksyen Header */
table.modern-table .seksyen-header {
    position: sticky !important;
    top: 56px !important;
    z-index: 2 !important;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
    border: 1px solid #e2e8f0 !important;
    margin: 4px 0 !important;
}

table.modern-table .seksyen-header .header-content {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
}

table.modern-table .seksyen-header .staff-badge {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #1e293b !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-size: 0.9em !important;
    font-weight: 500 !important;
}

/* Unit Header */
table.modern-table .unit-header {
    position: relative !important;
    z-index: 1 !important;
}

table.modern-table .unit-header .header-content {
    background: #f8fafc !important;
    color: #475569 !important;
    padding-left: 3rem !important;
    border: 1px solid #e2e8f0 !important;
}

table.modern-table .unit-header .staff-badge {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

/* Text and Badge Styles */
table.modern-table .header-text {
    flex: 1 !important;
    font-weight: 500 !important;
}

table.modern-table .staff-badge {
    padding: 0.25rem 0.75rem !important;
    border-radius: 1rem !important;
    font-size: 0.85rem !important;
    background-color: #e9ecef !important;
    color: #6c757d !important;
}

table.modern-table .chevron-icon {
    margin-left: auto !important;
    color: currentColor !important;
    opacity: 0.7 !important;
    font-size: 0.85rem !important;
}

/* Staff Row Styles */
table.modern-table .staff-row td {
    background: white !important;
}

table.modern-table .staff-row:hover td {
    background-color: #f8fafc !important;
}

/* Profile Image */
.profile-image {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background-color: #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 1rem !important;
}

.profile-image img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Results Count */
.results-count {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    background-color: #f1f5f9 !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
}

/* Search Box */
.search-box {
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    margin-bottom: 1rem !important;
}

.search-box input {
    border: none !important;
    outline: none !important;
    padding: 0.5rem !important;
    width: 100% !important;
    font-size: 0.95rem !important;
}

.search-box .clear-button {
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    table.modern-table {
        font-size: 0.9rem !important;
    }
    
    table.modern-table th,
    table.modern-table td {
        padding: 0.75rem !important;
    }
    
    table.modern-table .header-content {
        gap: 0.5rem !important;
    }
    
    table.modern-table .staff-badge {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .profile-image {
        width: 32px !important;
        height: 32px !important;
    }
}

/* Results Header Container */
.results-header {
    background: white !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
}

/* Search Container */
.search-container {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

/* Table Search Input */
.table-search {
    padding: 0.5rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    min-width: 300px !important;
}

/* Results Count */
.results-count {
    font-size: 1rem !important;
    color: #374151 !important;
}

.count-number {
    color: #2563eb !important;
    font-weight: 600 !important;
}

/* Search result count */
.count-number {
    font-weight: 600;
    color: #0ea5e9;
}

.count-label {
    color: #64748b;
}

/* Search Box Styling */
.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

/* Results Section */
.results-wrapper {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    padding: 1.5rem !important;
}

/* Main container styles */
.main-content {
    padding: 20px;
    width: 100%;
    min-width: 1600px;
    background: transparent !important;
}

.container-fluid {
    width: 98%;
    max-width: 1800px;
    margin: 0 auto;
    min-width: 1600px;
    background: transparent !important;
}

.directory-container {
    background: transparent !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

/* Search Section - Transparent */
.search-section {
    margin-bottom: 15px !important;
    background: transparent !important;
    padding: 1.5rem !important;
    border: none !important;
    box-shadow: none !important;
}

.directory-form {
    width: 100%;
}

/* Form Grid Layout */
.form-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: flex-end !important;
    padding: 1rem !important;
}

.form-group {
    flex: 1 !important;
    min-width: 200px !important;
    margin: 0 !important;
}

.form-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: flex-end !important;
    margin-bottom: 0.5rem !important;
}

/* Form Controls - Keep these visible */
.form-group select {
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem !important;
}

.form-group select:disabled {
    background: #f3f4f6 !important;
}

.search-btn {
    background: #2563eb !important;
    color: white !important;
    border: none !important;
}

.search-btn:hover {
    background: #1d4ed8 !important;
}

.reset-btn {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.reset-btn:hover {
    background: #e5e7eb !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        width: 100%;
        padding: 0 10px;
    }

    .form-grid {
        flex-direction: column !important;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
    }

    .table-search {
        min-width: auto;
        width: 100%;
    }
}

.footer {
    margin-top: 20px;
    flex-shrink: 0;
}

/* Override any auto width settings */
.directory-table[style*="width: auto"],
.custom-table[style*="width: auto"] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
}

.button-container {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.button-container .btn {
    padding: 8px 16px;
    min-width: 100px; /* Optional: ensures consistent button width */
}

/* Optional: if you want to adjust the specific button styles */
.button-container .btn-primary {
    margin-left: auto; /* This will push the buttons to the right */
}

/* End: components/_staff-directory.css */

/* Start: components/_hierarchical-headers.css */
/* Table Styles */
.directory-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.directory-table th,
.directory-table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.directory-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
}

/* Hierarchical Headers */
.group-header {
    cursor: pointer;
    user-select: none;
}

.group-header td {
    padding: 0.5rem !important;
}

.group-header .header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-header i {
    transition: transform 0.2s ease;
}

.group-header.collapsed i {
    transform: rotate(-90deg);
}

/* Header Levels */
.group-header.level-1 {
    background-color: #004d99;
    color: white;
}

.group-header.level-2 {
    background-color: #0066cc;
    color: white;
}

.group-header.level-3 {
    background-color: #1a8cff;
    color: white;
}

.group-header.level-4 {
    background-color: #f0f7ff;
    color: #004d99;
}

/* Hidden rows */
.hidden {
    display: none;
}

/* Staff rows */
.staff-row td {
    background-color: #fff;
}

.staff-row:hover td {
    background-color: #f8f9fa;
}

/* Text alignment */
.text-center {
    text-align: center;
}

/* End: components/_hierarchical-headers.css */

/* Start: components/responsive-table-improvements.css */
/* File not found: /var/www/jkkp-direktori-website/assets/css/components/responsive-table-improvements.css */
/* End: components/responsive-table-improvements.css */

/* Start: components/cawangan-address.css */
/* Cawangan Address Container Styles */
.cawangan-address-container {
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f0f4f8;
    border-radius: 0.5rem;
    border-left: 4px solid #3182ce;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}

.cawangan-address-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.cawangan-address-content {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.3;
    white-space: pre-line;
}

/* Minimize spacing for address lines */
.cawangan-address-content br {
    display: block;
    content: "";
    margin-top: 0.1rem;
}

.cawangan-contact {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
}

.contact-item i {
    color: #3182ce;
    width: 16px;
    text-align: center;
}

@media (max-width: 640px) {
    .cawangan-contact {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation for showing/hiding */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cawangan-address-container.visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* End: components/cawangan-address.css */

/* Start: components/_custom-overrides.css */
/* Custom overrides for directory headers */
.directory-container .seksyen-header,
.directory-container .seksyen-header.group-header,
.directory-container .seksyen-header td,
.directory-container .seksyen-header tr {
    background: rgba(73, 142, 199, 0.6) !important;
}

.directory-container .seksyen-header .header-content {
    background: rgba(73, 142, 199, 0.6) !important;
    color: #ffffff !important;
}

.directory-container .seksyen-header i {
    color: #ffffff !important;
}

/* Override any hover states */
.directory-container .seksyen-header:hover,
.directory-container .seksyen-header .header-content:hover {
    background: rgba(73, 142, 199, 0.7) !important;
}

/* End: components/_custom-overrides.css */

/* Start: pages/_directory.css */
/* Main Container */
.directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.directory-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* Search Form Section */
.directory-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #49C1C7;
    box-shadow: 0 0 0 3px rgba(73, 193, 199, 0.1);
}

.form-group select:disabled {
    background-color: #f8fafc;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Search Button */
.search-btn {
    background: linear-gradient(135deg, #49C1C7, #3fa8e1);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(73, 193, 199, 0.2);
}

/* Reset Button */
.reset-btn {
    background: #f8fafc;
    color: #64748b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reset-btn:hover {
    background: #e2e8f0;
}

/* Results Section */
.results-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.results-wrapper.results-visible {
    opacity: 1;
    visibility: visible;
}

.results-hidden {
    display: none;
}

.results-content {
    padding: 1.5rem;
}

.department-group {
    margin-bottom: 2rem;
}

.department-group h3 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.results-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.results-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover {
    background: #f8fafc;
}

/* Search Container within Results */
.search-container {
    position: relative;
}

.table-search {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    font-size: 0.95rem;
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .directory-container {
        padding: 1rem;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
    }

    .table-search {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .results-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-wrapper {
    animation: fadeIn 0.3s ease;
}
/* End: pages/_directory.css */

<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/jkkp-direktori-website/assets/css/styles.php:62) in <b>/var/www/jkkp-direktori-website/assets/css/styles.php</b> on line <b>71</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/jkkp-direktori-website/assets/css/styles.php:62) in <b>/var/www/jkkp-direktori-website/assets/css/styles.php</b> on line <b>72</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/jkkp-direktori-website/assets/css/styles.php:62) in <b>/var/www/jkkp-direktori-website/assets/css/styles.php</b> on line <b>73</b><br />
