/* --- CSS Variables for consistent theming --- */
:root {
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 70px;
    --header-height: 70px;
    --footer-height: 60px;

    /* === PALET WARNA BIRU BARU (MODEN & PROFESIONAL) === */
    --primary-color: #2563EB;      
    --secondary-color: #06B6D4;    
    --success-color: #16A34A;      
    --danger-color: #DC2626;       
    --warning-color: #F59E0B;      
    --info-color: #06B6D4;         
    --sidebar-bg: #1E293B;         

    /* --- Warna Teks & Latar (Dikekalkan) --- */
    --content-bg: #f8f9fc;
    --text-light: #f1f5f9;
    --text-dark: #334155;
    --text-muted: #64748b;
    --card-bg: #ffffff;

    /* --- Lain-lain (Dikekalkan) --- */
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.08);
    --border-radius: 10px;
    --transition-speed: 0.3s;
}

/* --- Global & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--content-bg);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ===============================================
--- MAIN LAYOUT: FIXED SIDEBAR, HEADER, FOOTER ---
=============================================== */

/* Page wrapper untuk handle sidebar collapse */
.page-wrapper {
    min-height: 100vh;
    position: relative;
}

/* Sidebar: Tetap di kiri, tinggi penuh */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-speed) ease;
    overflow-y: auto;
}

/* Header: Tetap di atas, bermula selepas sidebar */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    transition: left var(--transition-speed) ease;
}

/* Footer: Tetap di bawah, bermula selepas sidebar */
.footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--footer-height);
    background-color: var(--card-bg);
    border-top: 1px solid #e2e8f0;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 25px;
    transition: left var(--transition-speed) ease;
}

/* Content Area: Kawasan utama yang boleh scroll - FIXED */
.content-area {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    margin-bottom: var(--footer-height);
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow-y: auto;
    padding: 25px;
    background-color: var(--content-bg);
    transition: margin-left var(--transition-speed) ease;
    position: relative;
}

/* ===============================================
--- COLLAPSED SIDEBAR STYLES ---
=============================================== */

.page-wrapper.sidebar-collapsed .sidebar {
    width: var(--sidebar-width-collapsed);
}

.page-wrapper.sidebar-collapsed .header,
.page-wrapper.sidebar-collapsed .footer {
    left: var(--sidebar-width-collapsed);
}

.page-wrapper.sidebar-collapsed .content-area {
    margin-left: var(--sidebar-width-collapsed);
}

/* --- Sidebar Content --- */
.sidebar-header {
    padding: 15px 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.sidebar-header .logo-icon {
    height: 60px;
    width: auto;
    transition: transform var(--transition-speed) ease;
}

.sidebar-header .logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
    color: var(--text-light);
}

.sidebar-nav {
    flex-grow: 1;
    padding-top: 20px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 13px 25px;
    margin: 2px 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    white-space: nowrap;
    border-radius: 8px;
    position: relative;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* Active link indicator */
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 4px;
    background-color: var(--secondary-color);
    border-radius: 0 4px 4px 0;
}

/* Section Title Styling */
.nav-section-title {
    padding: 25px 25px 10px 25px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

/* Sidebar Footer Styling */
.sidebar-footer {
    padding: 5px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    padding: 13px 15px;
    color: #cbd5e1;
    border-radius: 8px;
    transition: background-color var(--transition-speed);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-size: 0.95rem;
}

.sidebar-logout:hover {
    background-color: #ef4444;
    color: white;
}

.sidebar-nav a i,
.sidebar-logout i {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a .nav-text {
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
    white-space: nowrap;
}

/* Hide text when sidebar collapsed */
.page-wrapper.sidebar-collapsed .sidebar-header .logo-text,
.page-wrapper.sidebar-collapsed .sidebar-nav .nav-text,
.page-wrapper.sidebar-collapsed .nav-section-title {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

/* --- Header Content --- */
.header .menu-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.header .menu-toggle:hover {
    background-color: #f1f5f9;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

/* --- Content Page Layout --- */
.page-header {
    margin-bottom: 25px;
    padding: 0;
    border-bottom: none;
    background: transparent;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Ensure consistent spacing with content area */
.content-area .page-header {
    margin-bottom: 25px;
    padding-bottom: 0;
}

/* Override any conflicting page title styles */
.page-header h1,
.dashboard-header h1,
.dashboard-box h1,
.approvals-container h1,
.page-wrapper h1,
main h1,
.content-area h1 {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: var(--text-dark) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

/* Ensure all page headers have consistent spacing */
.page-header,
.dashboard-header {
    margin-bottom: 25px !important;
    padding: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
}

/* --- Dashboard Content & Cards --- */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.dashboard-box {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: fit-content;
}

.dashboard-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.box-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.box-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.box-icon.purple { background-color: #f3e8ff; color: #9333ea; }
.box-icon.orange { background-color: #fff4e6; color: #f97316; }
.box-icon.teal { background-color: #dcfce7; color: #10b981; }
.box-icon.green { background-color: #dcfce7; color: #16a34a; }
.box-icon.blue { background-color: #e0f2fe; color: #0284c7; }

.box-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.box-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.box-content {
    padding: 20px;
    flex-grow: 1;
    overflow: hidden;
}

/* Announcement List Styles */
.announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px; 
}

.announcement-list-item {
    background-color: #f8fafc; /* Latar belakang yang sedikit berbeza */
    border-radius: 8px; /* Sudut melengkung */
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--secondary-color); /* Aksen warna di sebelah kiri */
    transition: background-color 0.2s ease;
}

.announcement-list-item:hover {
    background-color: #f1f5f9; /* Warna latar apabila dihover */
}

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

.announcement-content {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.announcement-content {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.announcement-footer {
    display: flex;
    justify-content: flex-end; /* Letak di sebelah kanan */
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Box List Styles */
.box-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.box-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.box-list-item:hover {
    background-color: #f8fafc; /* Latar belakang lembut semasa hover */
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.item-icon.event {
    background-color: #e0f2fe; /* Biru lembut */
    color: #0284c7; /* Biru gelap */
}

.item-main {
    font-weight: 500;
    color: var(--text-dark);
}

.item-icon.birthday {
    background-color: #fef3c7; /* Kuning lembut */
    color: #92400e; /* Kuning gelap */
}

.item-content {
    flex-grow: 1;
}

.item-main {
    font-weight: 600; /* Lebih tebal */
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Stats Grid */
.stats-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-card {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Completeness */
.profile-completeness-section {
    margin-bottom: 20px;
}

.completeness-header h4 {
    margin-bottom: 5px;
    color: var(--text-dark);
}

.completeness-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.progress-bar-container {
    margin-bottom: 15px;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-bar-label span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar-label span:last-child {
    color: var(--text-muted);
}

.progress-bar-outer {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.missing-items-container {
    background-color: #fff4e6;
    border: 1px solid #fed7aa;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 15px;
}

.missing-items-container p {
    margin-bottom: 10px;
    color: #92400e;
    font-size: 0.9rem;
}

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

.missing-items-list li {
    padding: 5px 0;
    color: #92400e;
    font-size: 0.85rem;
    position: relative;
    padding-left: 15px;
}

.missing-items-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ea580c;
}

.missing-items-container-complete {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.missing-items-container-complete p {
    margin: 0;
    color: #166534;
    font-weight: 500;
}

/* Box Actions */
.box-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

/* Personal Birthday Alert */
.personal-birthday-alert {
    background: linear-gradient(135deg, #4979ff, #4979ff);
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* --- Form Styling --- */
.styled-form {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-grid-2,
.form-grid-3 {
    display: grid;
    gap: 15px;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* --- Table Styling --- */
.staff-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.staff-table th,
.staff-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.staff-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-dark);
}

.staff-table tr:last-child td {
    border-bottom: none;
}

.staff-table tr:hover {
    background-color: #f8fafc;
}

/* --- Button Styling --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    transition: all var(--transition-speed);
    font-weight: 500;
    border: none;
    cursor: pointer;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #15803d;
    color: white;
}

.btn-outline-success {
    border: 1px solid var(--success-color);
    color: var(--success-color);
    background-color: transparent;
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
    color: white;
}

.btn-outline-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #0ba5d9;
    color: white;
}

/* --- Filter & Pagination --- */
.filter-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form input,
.filter-form select {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.pagination a {
    padding: 8px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: var(--text-dark);
    transition: all var(--transition-speed);
    text-decoration: none;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background-color: #dcfce7;
    color: #166534;
}

.badge-inactive {
    background-color: #fef2f2;
    color: #991b1b;
}

.badge-event {
    background-color: #e0f2fe;
    color: #075985;
}

.badge-birthday {
    background-color: #fef3c7;
    color: #92400e;
}

/* --- Message Styling --- */
.success-message {
    background-color: #dcfce7;
    color: #166534;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #16a34a;
}

.error-message {
    background-color: #fef2f2;
    color: #991b1b;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

/* --- Profile Specific Styles --- */
.profile-view-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-picture-main {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-tab-nav {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.profile-tab-link {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

.profile-tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-tab-link:hover {
    color: var(--primary-color);
}

.profile-tab-contents {
    padding: 25px;
}

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

.profile-tab-content.active {
    display: block;
}

.detail-section-box {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.details-list dt {
    font-weight: 600;
    margin-top: 15px;
    color: var(--text-dark);
}

.details-list dd {
    margin-left: 0;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* --- Training Cards --- */
.training-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.training-card {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.training-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.training-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.training-cert-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.training-cert-link:hover {
    text-decoration: underline;
}

.training-cert-link-disabled {
    display: inline-block;
    margin-top: 10px;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Staff Directory --- */
.quick-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-btn:hover:not(.active) {
    background-color: #e2e8f0;
}

.staff-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.directory-staff-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.directory-staff-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.directory-staff-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid #e2e8f0;
}

.directory-staff-card h3 {
    margin-bottom: 5px;
    color: var(--text-dark);
}

.directory-staff-card .position {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.directory-staff-card .department {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-details-btn {
    padding: 10px;
    background-color: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dark);
}

.view-details-btn:hover {
    background-color: #e2e8f0;
    color: var(--text-dark);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
}

#modalTitle {
    color: white;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
}

#modal-body {
    padding: 25px;
}

.loading-text {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* --- Portal Management --- */
.portal-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.portal-widget {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

/* --- Chart Container --- */
.chart-container {
    height: 250px;
    position: relative;
}

/* --- Responsive Design --- */
@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }

    .sidebar:hover {
        width: var(--sidebar-width);
    }

    .sidebar:hover .sidebar-header .logo-text,
    .sidebar:hover .sidebar-nav .nav-text,
    .sidebar:hover .nav-section-title {
        opacity: 1;
        width: auto;
        pointer-events: auto;
    }

    .sidebar-header .logo-text,
    .sidebar-nav .nav-text,
    .nav-section-title {
        opacity: 0;
        pointer-events: none;
        width: 0;
        overflow: hidden;
    }

    .header {
        left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
    }
    
    .content-area {
        margin-left: var(--sidebar-width-collapsed);
    }
}

@media (min-width: 992px) {
    .page-wrapper.sidebar-collapsed .sidebar {
        width: var(--sidebar-width-collapsed);
    }

    .page-wrapper.sidebar-collapsed .sidebar-header .logo-text,
    .page-wrapper.sidebar-collapsed .sidebar-nav .nav-text,
    .page-wrapper.sidebar-collapsed .nav-section-title {
        opacity: 0;
        pointer-events: none;
        width: 0;
        overflow: hidden;
    }

    .page-wrapper.sidebar-collapsed .header {
        left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
    }
    
    .page-wrapper.sidebar-collapsed .content-area {
        margin-left: var(--sidebar-width-collapsed);
    }
}

@media (max-width: 768px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .staff-directory-grid {
        grid-template-columns: 1fr;
    }
    
    .training-container {
        grid-template-columns: 1fr;
    }
    
    .portal-management-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-2x2 {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form input,
    .filter-form select {
        width: 100%;
    }
    
    .header {
        padding: 0 15px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .box-actions {
        flex-direction: column;
    }
}

/* Additional Mobile Optimization */
@media (max-width: 576px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        width: var(--sidebar-width);
        transform: translateX(0);
    }
    
    .header {
        left: 0;
        width: 100%;
    }
    
    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    .footer {
        left: 0;
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* --- Additional Safety Styles for Overlap Prevention --- */

/* Ensure no horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* Safe area for all content sections */
.dashboard-grid-layout,
.staff-directory-grid, 
.training-container,
.portal-management-grid,
.styled-form,
.staff-table,
.filter-container {
    position: relative;
    z-index: 1;
}

/* Print styles */
@media print {
    .sidebar,
    .header,
    .footer {
        display: none;
    }
    
    .content-area {
        margin: 0;
        height: auto;
        overflow: visible;
        padding: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        --card-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-speed: 0.1s;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }



/*all training.php*/

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.table-stats {
    display: flex;
    gap: 10px;
}

.proof-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.proof-link:hover {
    text-decoration: underline;
}

.text-muted {
    color: var(--text-muted);
}

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

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.tip-item i {
    font-size: 1.1em;
    flex-shrink: 0;
}

.tip-item span {
    color: #4a5568;
    font-size: 0.95em;
}

/* Custom Modal Styling */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.custom-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.custom-modal-header .box-icon {
    margin: 0;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.custom-modal-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #718096;
}

.custom-modal-close {
    margin-left: auto;
    font-size: 1.5rem;
    cursor: pointer;
    color: #a0aec0;
    padding: 4px;
    line-height: 1;
}

.custom-modal-close:hover {
    color: #718096;
}

.custom-modal-body {
    padding: 24px;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Upload Certificate Button Styling */
.upload-cert-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.upload-cert-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Improved styling for no records found section */
.no-records-found {
    padding: 2rem 1rem;
}

.no-records-found h4 {
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.no-records-found p {
    margin-bottom: 1.5rem;
    color: #6c757d;
}

.no-records-found .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Styling for Training History Table */
.table-container {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 10px;
}

.training-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.training-history-table th {
    background-color: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.training-history-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    color: #4a5568;
}

.training-history-table tbody tr:last-child td {
    border-bottom: none;
}

.training-history-table tbody tr:hover {
    background-color: #f8fafc;
}

.training-title {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.training-provider {
    font-size: 0.85rem;
    color: #718096;
}

.training-history-table td:last-child {
    text-align: center;
    white-space: nowrap;
    width: 1%;
}




/*edit staff.php*/


.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* mnanageportal.php */


.portal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
}

.portal-stats {
    display: flex;
    gap: 15px;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.compact-table .btn-sm {
    padding: 5px 8px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .portal-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .portal-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .portal-management-grid {
        grid-template-columns: 1fr;
    }
}

/* profile.php */

/* Navigation Buttons Styles - Sama seperti rujukan */
.nav-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.nav-button {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.nav-button.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.nav-button-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
    color: white; 
    flex-shrink: 0;
}

.nav-button:nth-child(1) .nav-button-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.nav-button:nth-child(2) .nav-button-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.nav-button:nth-child(3) .nav-button-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.nav-button:nth-child(4) .nav-button-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.nav-button:nth-child(5) .nav-button-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.nav-button-content {
    flex: 1;
}

.nav-button-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.nav-button-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-button-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-button:hover .nav-button-arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

.nav-button-icon i,
.box-icon i {
    color: white;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.details-table th,
.details-table td {
    
    border: 1px solid #e2e8f0; 
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.details-table th {
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
    
    background-color: #f8fafc; 
}
.details-table td {
    color: var(--text-muted);
}


/* Content Sections */
.content-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.content-section:target {
    animation: highlightSection 2s ease;
}

@keyframes highlightSection {
    0% { background-color: transparent; }
    50% { background-color: rgba(59, 130, 246, 0.05); }
    100% { background-color: transparent; }
}

/* Profile Header Card */
.profile-header-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-info-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.profile-picture-main {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
}

.profile-details h2 {
    margin: 0 0 8px 0;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.profile-position {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.profile-contact {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Dashboard Box Styles - Sama seperti rujukan */
.dashboard-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.box-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 1px solid #e2e8f0;
}

.box-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
    color: white; /* ✅ IKON PUTIH - SAMA SEPERTI NAV BUTTON */
}

.box-icon.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.box-icon.orange { background: linear-gradient(135deg, #f39c12, #e67e22); }
.box-icon.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.box-icon.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.box-icon.pink { background: linear-gradient(135deg, #e91e63, #c2185b); }
.box-icon.teal { background: linear-gradient(135deg, #009688, #00796b); }

.box-title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.box-subtitle {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.box-content {
    padding: 25px;
}

.edit-box-content {
    padding: 20px;
}

/* Personal Details Grid - Design Baru Seragam dengan Family */
.personal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.personal-detail-card {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.personal-detail_card h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.personal-details-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.personal-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.personal-detail-item.full-width {
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.detail-value {
    color: var(--text-muted);
    flex: 1;
    text-align: right;
}

.personal-detail-item.full-width .detail-value {
    text-align: left;
}

/* Family Details Design - Seragam dengan Personal */
.family-section {
    margin-bottom: 25px;
}

.family-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.parents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.family-card {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.family-card h5 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.family-details-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.family-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Children, Education, Experience Containers */
.children-container, .education-container, .experience-container, .spouses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 17px;
}

.education-card, .experience-card {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.education-card h5, .experience-card h5 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.education-details, .experience-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.education-detail-item, .experience-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Form Styles - Sama seperti rujukan */
.styled-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #15803d;
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: white;
}

.btn-info {
    background: #0ea5e9;
    color: white;
}

.btn-info:hover {
    background: #0284c7;
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-outline-secondary:hover {
    background: #6b7280;
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Certificate and Document Lists */
.certificate-list-container, .document-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.certificate-item, .document-item {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.cert-name, .doc-name {
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.cert-name:hover, .doc-name:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.doc-filename {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 10px;
}

/* Profile Picture Container */
.profile-picture-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--border-radius);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-form small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Parents Form Grid */
.parents-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.parent-form-section {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
}

.parent-form-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* Children, Education, Experience List Containers */
.children-list-container, .education-list-container, .experience-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.child-item, .education-item, .experience-item {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.child-info, .education-info, .experience-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.child-info strong, .education-info strong, .experience-info strong {
    color: var(--text-dark);
    font-size: 1rem;
}

.child-info span, .education-info span, .experience-info span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Documents Grid */
.documents-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.document-section {
    margin-bottom: 25px;
}

.document-section h4 {
    margin: 0 0 15px 10px;
    color: var(--text-dark);
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.document-upload-section {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
}

.document-upload-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.current-file {
    margin-bottom: 15px;
}

/* No Records Found */
.no-records-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-records-found i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.no-records-found h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Info Message */
.info-message {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    color: #1565c0;
}

.info-message i {
    margin-right: 8px;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

.not-provided {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-buttons-container {
        grid-template-columns: 1fr;
    }
    
    .profile-header-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info-main {
        flex-direction: column;
        text-align: center;
    }
    
    .personal-details-grid,
    .parents-grid,
    .form-grid-2,
    .form-grid-3,
    .parents-form-grid,
    .documents-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .children-container,
    .education-container,
    .experience-container {
        grid-template-columns: 1fr;
    }
    
    .certificate-item,
    .document-item,
    .child-item,
    .education-item,
    .experience-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .certificate-item .btn,
    .document-item .btn,
    .child-item .btn,
    .education-item .btn,
    .experience-item .btn {
        align-self: flex-end;
    }
    
    .personal-detail-item,
    .family-detail-item,
    .education-detail-item,
    .experience-detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-value {
        text-align: left;
    }
}

/*staffdirector.php*/


.staff-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-badge {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    text-align: center;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-card-header {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.staff-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.staff-status {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-inactive {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.staff-card-body {
    text-align: center;
    margin-bottom: 15px;
}

.staff-card-body h3 {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.staff-card-body p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.staff-card-body .position,
.staff-card-body .department,
.staff-card-body .email,
.staff-card-body .join-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-buttons .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 6px 10px;
}

.no-staff-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-staff-found i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.no-staff-found h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.directory-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .staff-stats {
        flex-direction: column;
    }
    
    .stat-badge {
        min-width: auto;
    }
    
    .directory-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .staff-directory-grid {
        grid-template-columns: 1fr;
    }
}


/*training approval.php */

.approvals-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-header h3 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.pending-count {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.applicant-info {
    min-width: 200px;
}

.applicant-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.applicant-details {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.training-info {
    min-width: 250px;
}

.training-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.training-details {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.cost-badge {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.justification {
    max-width: 300px;
}

.justification-text {
    color: var(--text-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.875rem;
}

.approval-actions {
    min-width: 280px;
}

.approval-form {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.remarks-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.remarks-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.no-applications {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.no-applications i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.no-applications h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.no-applications p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.approvals-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.approvals-stats {
    display: flex;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .table-container {
        font-size: 0.875rem;
    }
    
    .approval-actions {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .approvals-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .table-header {
        padding: 1rem;
    }
    
    .staff-table th,
    .staff-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .approval-actions {
        min-width: 200px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .approval-form {
        padding: 10px;
    }
    
    .remarks-input {
        min-height: 60px;
        font-size: 0.8rem;
    }
    
    .approvals-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .justification {
        max-width: 200px;
    }
    
    .training-info {
        min-width: 200px;
    }
    
    .applicant-info {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .table-header h3 {
        font-size: 1.1rem;
    }
    
    .staff-table {
        font-size: 0.75rem;
    }
    
    .approval-form {
        margin-bottom: 10px;
        padding: 8px;
    }
}

/* manage portal.php*/


.portal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
}

.portal-stats {
    display: flex;
    gap: 15px;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.compact-table .btn-sm {
    padding: 5px 8px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .portal-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .portal-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .portal-management-grid {
        grid-template-columns: 1fr;
    }
}


/* dashboard.php*/


/* ================================================== */
/* === SUSUNAN GRID DASHBOARD UTAMA === */
/* ================================================== */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 lajur sama lebar */
    gap: 20px; /* Jarak antara semua kotak */
}

.dashboard-box {
    display: flex;
    flex-direction: column;
    height: 100%; /* Memastikan kotak mengisi ruang grid */
    background-color: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius, 8px);
    box-shadow: var(--shadow-sm);
}

.box-content {
    flex-grow: 1; /* Memastikan kandungan membesar untuk mengisi ruang */
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
    margin: auto; /* Letak di tengah-tengah */
}

/* ================================================== */
/* === STATISTIK (UNTUK ADMIN) === */
/* ================================================== */
.stats-grid-1-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    justify-content: space-around;
}

.stat-card-main {
    padding: 15px;
    background-color: var(--content-bg, #f8f9fa);
    border-radius: var(--border-radius, 8px);
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: inherit;
}

.stat-card-main.interactive {
    position: relative;
    transition: background-color 0.2s ease;
}
.stat-card-main.interactive:hover {
    background-color: #e9ecef;
}

.notification-badge-alt {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger-color, #e74c3c);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

/* ================= */
/* === KALENDAR  === */
/* ================= */

#trainingCalendar {
    flex-grow: 1;
    min-height: 400px;
}

/* ===== Toolbar ===== */
.fc-header-toolbar {
    margin-bottom: 1.5rem !important;
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark, #333);
}

/* ===== Buttons ===== */
.fc-button {
    background-color: var(--content-bg, #f8f9fa) !important;
    color: var(--text-secondary, #555) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
}

.fc-button:hover {
    background-color: #007bff !important;
}

.fc-button-primary:not(:disabled).fc-button-active,
.fc-button-primary:not(:disabled):active,
.fc-today-button {
    background-color: var(--primary-color, #007bff) !important;
    border-color: var(--primary-color, #007bff) !important;
    color: #fff !important;
}

/* ===== Grid & Header ===== */
.fc-daygrid-day,
.fc-col-header-cell {
    border-color: var(--border-color, #e2e8f0);
}

.fc-col-header-cell {
    background-color: var(--content-bg, #f8f9fa);
    color: var(--text-dark, #333);
    font-weight: 600;
}

.fc .fc-daygrid-day-number {
    padding: 8px;
    font-weight: 500;
}

/* ===== Today Highlight ===== */
.fc .fc-day-today {
    background-color: rgba(0, 123, 255, 0.07) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background-color: var(--primary-color, #007bff);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 4px;
}

/* ================================================== */
/* ✅ EVENT STYLE - TUKAR BIRU → PUTIH SEPENUHNYA */
/* ================================================== */

.fc-event,
.fc-event-start,
.fc-event-end,
.fc-event-past,
.fc-list-event {
    background-color: #7bbbff !important;
    border: 1px solid #007bff !important;
    color: #1f2933 !important;
    padding: 6px 10px !important;
    font-size: 0.8rem;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Hover Effect */
.fc-event:hover,
.fc-list-event:hover {
    background-color: #007bff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Dot Event */
.fc-daygrid-event-dot {
    border-color: var(--primary-color, #007bff) !important;
}

/* Text dalam event */
.fc-event-title,
.fc-event-time {
    color: #1f2933 !important;
    font-weight: 500;
}

/* List View Row */
/* =============================== */
/* ✅ LIST VIEW SAMAKAN DENGAN WEEK */
/* =============================== */

.fc-list-item,
.fc-list-event {
    background-color: #7bbbff !important;
    border: 1px solid #007bff !important;
    color: #1f2933 !important;
    padding: 6px 10px !important;
    font-size: 0.8rem;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* ✅ Hover sama seperti week */
.fc-list-item:hover td,
.fc-list-event:hover {
    background-color: #007bff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    color: #ffffff !important;
}

/* ✅ Buang stripe biru default */
.fc-list-event-graphic {
    display: none !important;
}

/* ✅ Pastikan teks dalam list ikut warna yang sama */
.fc-list-event-title,
.fc-list-event-time {
    color: #1f2933 !important;
    font-weight: 500;
}

.fc-list-item:hover .fc-list-event-title,
.fc-list-item:hover .fc-list-event-time {
    color: #ffffff !important;
}


.fc-theme-standard .fc-list-event:hover td,
.fc-theme-standard .fc-list-item:hover td,
.fc-list-event:hover td {
    background-color: #007bff !important;   /* ✅ Biru gelap */
    color: #000000 !important;
}


/* ================================================== */
/* === END GAYA KALENDAR === */
/* ================================================== */

/* edit staff.php */


.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* staff directory.php*/

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content.large-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    position: relative;
    background: linear-gradient(135deg, #1E293B 0%, #1E293B 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    transform: scale(1.1); 
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Navigation Tabs */
.nav-tabs {
    background: #f8f9fa;
    padding: 0 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 5px;
}

.nav-tabs .nav-item {
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    border: none;
    padding: 12px 20px;
    color: #6c757d;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    border: none;
}

.nav-tabs .nav-link.active {
    background: white;
    color: #495057;
    border-bottom: 3px solid #667eea;
}

.nav-tabs .nav-link:hover {
    color: #495057;
    background: rgba(255, 255, 255, 0.7);
}

.tab-content {
    padding: 25px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane.show {
    display: block;
}

/* Profile Header */
.profile-header-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-info-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-picture-main {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-details h2 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.profile-position {
    color: #5a6c7d;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.profile-contact {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

/* Dashboard Box */
.dashboard-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.box-header {
    background: #f8f9fa;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e9ecef;
}

.box-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.box-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.box-icon.orange { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.box-icon.green { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.box-icon.purple { background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%); }
.box-icon.teal { background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%); }

.box-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.box-subtitle {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.box-content {
    padding: 25px;
}

/* Personal Details Grid */
.personal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.personal-detail-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.personal-detail-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

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

.details-table th,
.details-table td {
    padding: 8px 0;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.details-table th {
    color: #5a6c7d;
    font-weight: 500;
    width: 40%;
    font-size: 0.9rem;
}

.details-table td {
    color: #2c3e50;
    font-weight: 400;
}

/* Family Sections */
.family-section {
    margin-bottom: 25px;
}

.family-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.parents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.family-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #f093fb;
}

.family-card h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.children-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Education & Experience Cards */
.education-container,
.experience-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.education-card,
.experience-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4facfe;
}

.education-card h5,
.experience-card h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

/* Training History Styles */
.training-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.training-table th,
.training-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.training-table th {
    background: #f8f9fa;
    color: #5a6c7d;
    font-weight: 600;
    font-size: 0.9rem;
}

.training-table tr:hover {
    background: #f8f9fa;
}

.training-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

/* Documents Grid */
.documents-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.document-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.certificate-list-container,
.document-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 15px;
}

.certificate-item,
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #a8c0ff;
}

.cert-name,
.doc-name {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-name:hover,
.doc-name:hover {
    color: #2980b9;
}

.doc-filename {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* No Records Found */
.no-records-found {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-records-found i {
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-records-found h4 {
    margin: 0 0 10px 0;
    color: #5a6c7d;
}

/* Loading Text */
.loading-text {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content.large-modal {
        width: 95%;
        margin: 20px;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .parents-grid,
    .documents-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .profile-header-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .profile-info-main {
        flex-direction: column;
        text-align: center;
    }
    
    .personal-details-grid {
        grid-template-columns: 1fr;
    }
    
    .training-table {
        display: block;
        overflow-x: auto;
    }
}

/* training.php */


/* Navigation Buttons Styles */
.nav-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.nav-button {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.nav-button.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.nav-button-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.nav-button:nth-child(1) .nav-button-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.nav-button:nth-child(2) .nav-button-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.nav-button:nth-child(3) .nav-button-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.nav-button-content {
    flex: 1;
}

.nav-button-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.nav-button-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-button-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-button:hover .nav-button-arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.content-section:target {
    animation: highlightSection 2s ease;
}

@keyframes highlightSection {
    0% { background-color: transparent; }
    50% { background-color: rgba(59, 130, 246, 0.05); }
    100% { background-color: transparent; }
}

/* Custom Modal Styles */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.custom-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1E2838 0%, #1E2838 50%);
    color: white;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
}
.custom-modal-header p {
    color: #ffffff;
}

.custom-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.custom-modal-close:hover {
    color: #e2e8f0;
}

.custom-modal-body {
    padding: 25px;
}

.custom-modal-body p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Existing Styles */
.training-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.training-card {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.training-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.training-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.training-delete-btn:hover {
    background: #bb2d3b;
    color: white;
}

.training-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.1rem;
    padding-right: 40px;
}

.training-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.training-meta i {
    width: 16px;
    color: var(--primary-color);
}

.training-summary {
    margin: 15px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.training-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.training-cert-link-disabled {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.no-training-found, .no-records-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-training-found i, .no-records-found i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.no-training-found h3, .no-records-found h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    color: white;
}

.info-box-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-box-header h4 {
    margin: 0;
    color: white;
}

.info-box-content {
    padding: 20px;
}

.info-box-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box-content li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.info-box-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #bbf7d0;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.application-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.application-card {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 15px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.badge {
    padding: 0.5em 0.75em;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
}

.card-details {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.detail-item {
    margin-bottom: 5px;
}

.admin-notes {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f3f5;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .nav-buttons-container {
        grid-template-columns: 1fr;
    }
    
    .training-container {
        grid-template-columns: 1fr;
    }
    
    .form-grid-3,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .stats-grid-2x2 {
        grid-template-columns: 1fr 1fr;
    }
    
    .custom-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .custom-modal-actions {
        flex-direction: column;
    }
}

/* header.php */


        /* Styling untuk header profesional */
        .professional-header {
            background: linear-gradient(135deg, #1E2838 0%, #1E2838 50%);
            color: white;
            padding: 0 20px;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }
        
        .header-left {
            display: flex;
            align-items: center;
        }
        
        .logo {
            display: flex;
            align-items: center;
            margin-right: 30px;
        }
        
        .logo i {
            font-size: 24px;
            margin-right: 10px;
        }
        
        .logo-text {
            font-size: 20px;
            font-weight: 600;
        }
        
        .header-right {
            display: flex;
            align-items: center;
        }
        
        .user-profile {
            display: flex;
            align-items: center;
            cursor: pointer;
            padding: 8px 15px;
            border-radius: 30px;
            transition: background-color 0.3s;
            position: relative;
        }
        
        .user-profile:hover {
            background-color: rgba(255,255,255,0.1);
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            border: 2px solid rgba(255,255,255,0.3);
            object-fit: cover;
            background-color: #3498db;
        }
        
        .user-info {
            display: flex;
            flex-direction: column;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 14px;
        }
        
        .user-role {
            font-size: 12px;
            opacity: 0.8;
        }
        
        /* Menu dropdown untuk profil */
        .profile-dropdown {
            position: absolute;
            top: 65px;
            right: 0;
            background: white;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            width: 200px;
            display: none;
            z-index: 1001;
            overflow: hidden;
        }
        
        .profile-dropdown.active {
            display: block;
        }
        
        .dropdown-item {
            padding: 12px 15px;
            color: #333;
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: background-color 0.2s;
        }
        
        .dropdown-item i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .dropdown-item:hover {
            background-color: #f5f5f5;
        }
        
        .dropdown-divider {
            height: 1px;
            background-color: #eee;
            margin: 5px 0;
        }
        
        /* Penyesuaian untuk sidebar dan kandungan utama */
        .main-container {
            margin-top: 70px;
        }


        /*profile.php*/

        /* ===== UPDATE BORDER LEFT UNTUK SEMUA CARD ===== */

/* Personal Detail Card */
.personal-detail-card {
    border-left: 4px solid #0099CC;
}

/* Family Card */
.family-card {
    border-left: 4px solid #0099CC;
}

/* Education Card */
.education-card {
    border-left: 4px solid #0099CC;
}

/* Experience Card */
.experience-card {
    border-left: 4px solid #0099CC;
}

/* Document Section */
.document-section {
    border-left: 4px solid #0099CC;
}

/* Certificate Items */
.certificate-item {
    border-left: 3px solid #0099CC;
}

/* Document Items */
.document-item {
    border-left: 3px solid #0099CC;
}

/* Child Items (Edit Mode) */
.child-item {
    border-left: 4px solid #0099CC;
}

/* Education Items (Edit Mode) */
.education-item {
    border-left: 4px solid #0099CC;
}

/* Experience Items (Edit Mode) */
.experience-item {
    border-left: 4px solid #0099CC;
}

/* Document Upload Section */
.document-upload-section {
    border-left: 4px solid #0099CC;
}

/* Parent Form Section */
.parent-form-section {
    border-left: 4px solid #0099CC;
}

/* Profile Picture Container */
.profile-picture-container {
    border-left: 4px solid #0099CC;
}

/* Style untuk Modal (tambah sini supaya x kacau fail CSS utama) */

    .input-group {
        display: flex;
        align-items: center;
    }
    .input-group .form-control {
        flex-grow: 1;
    }
    .input-group .btn {
        margin-left: 10px;
        flex-shrink: 0;
    }
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        display: none;
        justify-content: center;
        align-items: center;
    }
    .modal-content {
        background-color: #fff;
        padding: 30px;
        border-radius: 8px;
        width: 90%;
        max-width: 500px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    .modal-header h3 {
        margin: 0;
    }
    .modal-close {
        border: none;
        background: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
    .modal-body ul {
        list-style: none;
        padding: 0;
        max-height: 200px;
        overflow-y: auto;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 5px;
        margin-bottom: 15px;
    }
    .modal-body li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 5px;
    }
    .modal-body li:nth-child(odd) {
        background-color: #f9f9f9;
    }
    .delete-item-btn {
        background: none;
        border: none;
        color: #dc3545;
        cursor: pointer;
    }
    .modal-footer {
        border-top: 1px solid #dee2e6;
        padding-top: 15px;
        margin-top: 15px;
    }
    .modal-footer .input-group {
        width: 100%;
    }


/* ================================================================== */
/* --- STYLE BARU UNTUK PERSONAL BIRTHDAY ALERT --- */
/* ================================================================== */
.personal-birthday-alert {
    background: linear-gradient(135deg, #4da0ff 0%, #87cefa 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(77, 160, 255, 0.3);
    border: none;
    color: white;
    text-align: center;
    max-width: 100%;
}

.birthday-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.birthday-main-text {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.birthday-sub-text {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.birthday-date {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 8px;
}

/* ✅ KOD BARU: STYLE UNTUK SENARAI ITEM HILANG */
.missing-items-section {
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.missing-items-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.missing-items-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}

.missing-items-list li {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 6px;
    padding-left: 15px;
    position: relative;
}

.missing-items-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ef4444; /* Merah */
}

.profile-complete-message {
    text-align: center;
    color: #10b981; /* Hijau */
    font-weight: 500;
    margin: 5px 0;
    font-size: 0.9rem;
}

.profile-complete-message i {
    margin-right: 8px;
}

/* Responsive untuk senarai */
@media (max-width: 500px) {
    .missing-items-list {
        columns: 1;
    }
}
/* ✅ TAMAT KOD BARU */

/* Responsive adjustments */
@media (max-width: 768px) {
    .birthday-main-text {
        font-size: 1.5rem;
    }
    
    .birthday-sub-text {
        font-size: 1rem;
    }
}

/* Jarakkan tulisan dalam details table */
.details-table th,
.details-table td {
    padding: 18px 20px !important;
}

/* training_management.php styles */

/* ================================
   GLOBAL LAYOUT ADJUSTMENT
================================ */
.page-wrapper {
    padding: 2rem;
    background: #f5f7fb;
}

/* ================================
   PAGE HEADER IMPROVEMENTS
================================ */


.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2933;
}

.page-header p.text-muted {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ================================
   GRID CARD SERAGAM
================================ */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    align-items: stretch;
}

/* KOD BARU: Menambah jarak di atas grid kad kursus */
.course-grid {
    margin-top: 2rem; /* Menolak kad ke bawah untuk mewujudkan ruang */
}

/* ================================
   COURSE CARD UTAMA
================================ */
.course-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e3e8ef;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.1);
}

/* ================================
   BODY CONTENT CARD
================================ */
.course-card .card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ================================
   TITLE & SUBTITLE
================================ */
.course-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2933;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.course-card .card-subtitle {
    font-size: 0.85rem;
    color: #7b8794 !important;
    margin-bottom: 1rem;
}

/* ================================
   DESCRIPTION (HEIGHT SERAGAM)
================================ */
.course-card .card-text {
    font-size: 0.9rem;
    color: #52606d;
    line-height: 1.6;
    min-height: 5em;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================================
   DETAIL LIST
================================ */
.course-card .list-unstyled {
    font-size: 0.85rem;
    color: #616e7c;
    margin-bottom: 1.5rem;
}

.course-card .list-unstyled li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.45rem;
}

.course-card .list-unstyled i {
    width: 18px;
    margin-right: 8px;
    color: #3b82f6;
}

/* ================================
   FOOTER BUTTON AREA
================================ */
.course-card .border-top {
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid #e5e7eb !important;
}

/* ================================
   BUTTON GROUP IN EDIT MODE
================================ */
.course-card .btn-group-edit {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.course-card .btn-group-edit .btn {
    flex: 1;
    min-width: 70px;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.course-card .btn-group-edit .btn i {
    font-size: 0.7rem;
}

/* ================================
   STATUS BADGE STYLING
================================ */
.badge-status {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   BADGE PROFESSIONAL
================================ */
.badge {
    font-size: 0.75rem;
    padding: 0.45rem 0.8rem;
    border-radius: 30px;
    font-weight: 600;
}

.badge-open { background: #22c55e; color: white; }
.badge-upcoming { background: #0ea5e9; color: white; }
.badge-closed { background: #6b7280; color: white; }

.badge-applied { background: #facc15; color: #111827; }
.badge-pending { background: #6366f1; color: white; }
.badge-approved { background: #10b981; color: white; }
.badge-rejected { background: #ef4444; color: white; }

/* ================================
   BUTTON CANTIK MODEN
================================ */
.course-card .btn {
    font-size: 0.82rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.course-card .btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    color: white;
}

.course-card .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: scale(1.05);
}

.course-card .btn-outline-primary {
    border: 1px solid #2563eb;
    color: #2563eb;
}

.course-card .btn-outline-primary:hover {
    background: #2563eb;
    color: white;
}

.course-card .btn-outline-info {
    border: 1px solid #0ea5e9;
    color: #0ea5e9;
}

.course-card .btn-outline-info:hover {
    background: #0ea5e9;
    color: white;
}

.course-card .btn-outline-danger {
    border: 1px solid #ef4444;
    color: #ef4444;
}

.course-card .btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

.course-card .btn-outline-secondary {
    border: 1px solid #6b7280;
    color: #6b7280;
}

.course-card .btn-outline-secondary:hover {
    background: #6b7280;
    color: white;
}

/* ================================
   EMPTY STATE
================================ */
.text-center.p-5.border.rounded.bg-light {
    border-radius: 16px;
    padding: 3rem !important;
    background: #ffffff !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

/* ================================
   RESPONSIVE ADJUSTMENTS
================================ */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1.2rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .page-header .flex-shrink-0 {
        margin-top: 1rem;
        width: 100%;
    }
    
    .page-header .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .course-card .card-body {
        padding: 1.4rem;
    }

    .course-card .card-title {
        font-size: 1.05rem;
    }

    .course-card .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .course-card .btn-group-edit {
        flex-wrap: wrap;
    }
    
    .course-card .btn-group-edit .btn {
        flex: 0 0 calc(50% - 0.25rem);
        font-size: 0.7rem;
    }

    .row {
        gap: 1.2rem;
    }
}

@media (max-width: 576px) {
    .course-card .btn-group-edit .btn {
        flex: 0 0 100%;
        margin-bottom: 0.3rem;
    }
}

.course-card .details-list i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: var(--primary-color);
}

.course-card .card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color, #e2e8f0);
    padding: 1rem; /* Ubah suai di sini */
    margin-top: auto; /* PENTING: Memastikan footer sentiasa di bawah */
    text-align: center;
}

/* ===== add_trainng.php==== */

.personal-birthday-alert {
    background: linear-gradient(135deg, #4979ff, #4979ff);
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* === GAYA BORANG YANG DIPERTINGKATKAN (DARI add_training.php) === */
.card .form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.card .form-control,
.card .form-select {
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #2d3748;
}

.card .form-control:focus,
.card .form-select:focus {
    border-color: var(--primary-color, #4299e1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.card textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.card .form-group, .card .mb-3 {
    margin-bottom: 1.5rem !important;
}

.card .form-actions, .card .mt-4 {
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
/* === TAMAT GAYA BORANG DIPERTINGKATKAN === */

/* --- Form Styling --- */
.styled-form {
    background-color: var(--card-bg);
}

/* Assign staff.php */

.card .form-actions, .card .mt-4 {
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
/* === TAMAT GAYA BORANG DIPERTINGKATKAN === */

/* === GAYA HALAMAN ASSIGN STAFF === */
.staff-selection-container {
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
    background-color: #f8fafc;
}

.staff-selection-search {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.staff-selection-search .form-control {
    width: 100%;
    padding-left: 2.5rem; /* Ruang untuk ikon */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1rem;
}

.staff-selection-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.staff-selection-list .form-check {
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.staff-selection-list .form-check:hover {
    background-color: #e9ecef;
}

.staff-selection-list .form-check-input {
    margin-top: 0.2rem;
    margin-right: 0.75rem;
}

.staff-selection-list .form-check-label {
    width: 100%;
    cursor: pointer;
}

.staff-selection-list .form-check-label .staff-name {
    font-weight: 500;
    color: #344767;
}

.staff-selection-list .form-check-label .staff-email {
    font-size: 0.85rem;
    color: #6c757d;
    display: block;
    margin-top: 2px;
}
/* === TAMAT GAYA ASSIGN STAFF === */

/* --- Form Styling --- */
.styled-form {
    background-color: var(--card-bg);
}

/* --- Table Styling --- */
.table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Ensures border-radius is respected by the table */
    width: 100%;
}

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

.styled-table thead tr {
    background-color: #f8fafc; /* Lighter grey header */
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.styled-table tbody tr {
    transition: background-color 0.2s ease;
}

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

.styled-table tbody tr:last-of-type td {
    border-bottom: none;
}

.styled-table .action-buttons {
    text-align: center;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* activity log styles */

.activity-log-entry {
    font-size: 13px;
    line-height: 1.5;
}

.activity-header {
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.actor {
    color: #1a73e8;
}

.target {
    color: #34a853;
}

.arrow {
    color: #666;
    margin: 0 6px;
}

.action-type {
    color: #5f6368;
    font-style: italic;
    margin-bottom: 8px;
}

.changes-list {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
}

.changes-list strong {
    color: #202124;
    display: block;
    margin-bottom: 8px;
}

.change-item {
    margin-bottom: 6px;
    padding-left: 8px;
    border-left: 2px solid #ddd;
}

.field {
    color: #5f6368;
    font-weight: bold;
}

.old-value {
    color: #d93025;
    background: #fce8e6;
    padding: 1px 4px;
    border-radius: 2px;
    margin: 0 2px;
}

.new-value {
    color: #137333;
    background: #e6f4ea;
    padding: 1px 4px;
    border-radius: 2px;
    margin: 0 2px;
}

.custom-message, .plain-text {
    color: #444;
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}


