/**
 * Personnel Page - Lucid Theme CSS
 * 
 * Adapted from the Lucid VueJS Admin Theme for WordPress
 * Supports Light/Dark mode and mobile responsive design
 */

/* ============================================
   CSS Variables & Theme Colors
   ============================================ */
:root {
    /* Core Theme - Cyan */
    --color-primary: #49c5b6;
    --color-accent: #5c8ed4;
    --color-success: #22af46;
    --color-warning: #f3ad06;
    --color-danger: #de4848;

    /* Light Mode */
    --bg-body: #f4f7f6;
    --bg-sidebar: #f8f8f8;
    --bg-card: #ffffff;
    --text-primary: #5A5A5A;
    --text-secondary: #777777;
    --text-heading: #444444;
    --border-color: #e8e8e8;
    --sidebar-width: 250px;

    /* Shadows */
    --shadow-card: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-dropdown: 0px 2px 20px 0px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Variables */
body.full-dark {
    --bg-body: #2b2b35;
    --bg-sidebar: #2b2b35;
    --bg-card: #30303a;
    --text-primary: #92929c;
    --text-secondary: #b0b0bb;
    --text-heading: #b0b0bb;
    --border-color: #3b3b46;
}

/* ============================================
   Font Imports
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ============================================
   Base Styles
   ============================================ */
* {
    box-sizing: border-box;
}

body.wm-personnel-lucid {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============================================
   Dashicons Font Override
   ============================================ */
.dashicons,
.dashicons-before:before {
    font-family: 'dashicons' !important;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    speak: never;
}

.dashicons {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 20px;
    vertical-align: top;
    text-align: center;
    transition: color 0.1s ease-in-out;
}

/* Wrapper */
#lucid-wrapper {
    min-height: 100vh;
    position: relative;
}

/* ============================================
   Fixed Top Navbar
   ============================================ */
.navbar-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    z-index: 99;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.navbar-fixed-top .container-fluid {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 15px;
}

/* Mobile toggle button */
.navbar-fixed-top .navbar-btn {
    display: none;
    padding: 0;
    margin-right: 15px;
}

.navbar-fixed-top .navbar-btn button {
    font-size: 20px;
    line-height: 1;
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    color: var(--text-heading);
    padding: 10px;
}

.navbar-fixed-top .navbar-btn button .dashicons {
    font-family: 'dashicons' !important;
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--text-heading);
}

/* Navbar logo/brand area */
.navbar-fixed-top .navbar-brand {
    padding: 10px 0;
    display: flex;
    align-items: center;
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding-left: 15px;
}

.navbar-fixed-top .navbar-brand img {
    height: 28px;
    width: auto;
    transition: filter 0.3s ease;
}

body.full-dark .navbar-fixed-top .navbar-brand img {
    filter: brightness(0) invert(1);
}

/* Navbar right section */
.navbar-fixed-top .navbar-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

/* Search form */
.navbar-fixed-top .navbar-search {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 400px;
}

.navbar-fixed-top .navbar-search .form-control {
    height: 40px;
    padding: 8px 15px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.navbar-fixed-top .navbar-search .form-control:focus {
    border-color: var(--color-primary);
}

.navbar-fixed-top .navbar-search .form-control::placeholder {
    color: var(--text-secondary);
}

.navbar-fixed-top .navbar-search .search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Navbar spacer (when search is hidden) */
.navbar-fixed-top .navbar-spacer {
    flex: 1;
}

/* Navbar nav icons */
.navbar-fixed-top .navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.navbar-fixed-top .navbar-nav>li {
    display: inline-block;
    position: relative;
}

.navbar-fixed-top .navbar-nav .icon-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    border-radius: 50%;
    transition: background 0.2s;
}

.navbar-fixed-top .navbar-nav .icon-menu:hover {
    background: rgba(73, 197, 182, 0.1);
    color: var(--color-primary);
}

.navbar-fixed-top .navbar-nav .icon-menu .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.navbar-fixed-top .navbar-nav .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
}

/* All navbar icon dashicons need explicit font-family */
.navbar-fixed-top .navbar-nav .icon-menu .dashicons {
    font-family: 'dashicons' !important;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Theme toggle button (lightbulb) */
.navbar-fixed-top .navbar-nav .theme-toggle-btn .dashicons {
    font-family: 'dashicons' !important;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: color 0.3s ease;
    color: var(--text-secondary);
}

.navbar-fixed-top .navbar-nav .theme-toggle-btn:hover .dashicons {
    color: var(--color-primary);
}

body.full-dark .navbar-fixed-top .navbar-nav .theme-toggle-btn .dashicons {
    color: var(--color-warning);
}

body.full-dark .navbar-fixed-top .navbar-nav .theme-toggle-btn:hover .dashicons {
    color: #fff;
}

/* User dropdown in navbar */
.navbar-fixed-top .user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.navbar-fixed-top .user-dropdown:hover {
    background: rgba(73, 197, 182, 0.1);
}

.navbar-fixed-top .user-dropdown img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.navbar-fixed-top .user-dropdown .user-name {
    font-size: 14px;
    color: var(--text-heading);
    font-weight: 500;
}

/* ============================================
   Left Sidebar (adjusted for navbar)
   ============================================ */
#left-sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 60px);
    position: fixed;
    left: 0;
    top: 60px;
    background-color: var(--bg-sidebar);
    z-index: 11;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.3s ease-in-out;
    border-right: 1px solid var(--border-color);
}

#left-sidebar::-webkit-scrollbar {
    width: 5px;
}

/* Logo/Brand Section */
.sidebar-brand {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand .brand-logo {
    height: 28px;
    width: auto;
    transition: filter 0.3s ease;
}

/* Dark Mode: Invert the logo to white */
body.full-dark .sidebar-brand .brand-logo {
    filter: brightness(0) invert(1);
}

/* User Account Section */
.user-account {
    margin: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.user-account .user-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    object-fit: cover;
}

.user-account .user-info {
    flex: 1;
}

.user-account .user-greeting {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}

.user-account .user-name {
    font-weight: 700;
    color: var(--text-heading);
    display: block;
    font-size: 14px;
}

/* Date Display */
.sidebar-date {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-date .date-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}

.sidebar-date .date-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-heading);
}

/* Sidebar Navigation Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-tabs li {
    flex: 1;
}

.sidebar-tabs li a {
    display: block;
    padding: 12px 10px;
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.sidebar-tabs li a:hover,
.sidebar-tabs li a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Sidebar Navigation Menu */
.sidebar-nav {
    padding: 10px 0;
}

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

.sidebar-nav .metismenu>li {
    padding-bottom: 5px;
}

.sidebar-nav .metismenu>li>a {
    display: flex;
    align-items: center;
    padding: 13px 15px;
    color: var(--text-heading);
    text-decoration: none;
    font-size: 15px;
    border-left: 5px solid transparent;
    transition: all 0.3s ease-out;
}

.sidebar-nav .metismenu>li>a i {
    margin-right: 20px;
    font-size: 17px;
    color: var(--color-primary);
}

.sidebar-nav .metismenu>li>a:hover,
.sidebar-nav .metismenu>li.active>a {
    background-color: rgba(73, 197, 182, 0.1);
    border-left-color: var(--color-primary);
}

.sidebar-nav .metismenu>li.active>a {
    font-weight: 700;
}

/* Dashicons in Navigation */
.sidebar-nav .metismenu>li>a .dashicons {
    margin-right: 15px;
    font-size: 18px;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

/* Sidebar Tab Icons */
.sidebar-tabs .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Settings Section at Bottom */
.sidebar-settings {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.sidebar-settings h6 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.theme-switch {
    display: flex;
    gap: 10px;
}

.theme-switch .theme-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.theme-switch .theme-option .theme-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    position: relative;
    border: 2px solid var(--border-color);
}

.theme-switch .theme-option .theme-circle.light {
    background: #ffffff;
}

.theme-switch .theme-option .theme-circle.dark {
    background: #17191c;
}

.theme-switch .theme-option.active .theme-circle::before {
    content: '✓';
    position: absolute;
    font-size: 12px;
    top: 2px;
    left: 5px;
}

.theme-switch .theme-option.active .theme-circle.light::before {
    color: #17191c;
}

.theme-switch .theme-option.active .theme-circle.dark::before {
    color: #ffffff;
}

/* ============================================
   Main Content Area (adjusted for navbar)
   ============================================ */
#main-content {
    width: calc(100% - var(--sidebar-width));
    float: right;
    position: relative;
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 60px);
    transition: all 0.3s ease-in-out;
}

/* Page Header */
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-heading);
    margin: 0 0 8px 0;
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-header .breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-header .breadcrumb li::before {
    content: '/';
    color: var(--text-secondary);
}

.page-header .breadcrumb li:first-child::before {
    content: none;
}

.page-header .breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.page-header .breadcrumb a:hover {
    color: var(--color-primary);
}

/* ============================================
   Card Component
   ============================================ */
.card {
    background: var(--bg-card);
    border: 0;
    margin-bottom: 30px;
    border-radius: 0.55rem;
    position: relative;
    width: 100%;
    box-shadow: var(--shadow-card);
    display: inline-block;
    transition: 0.5s;
}

.card .card-header {
    padding: 20px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card .card-header h2,
.card .card-header h3,
.card .card-header .card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
}

.card .card-header h2 small {
    display: block;
    font-size: 13px;
    margin-top: 5px;
    color: var(--text-secondary);
    font-weight: 400;
}

.card .card-body {
    padding: 20px;
    color: var(--text-primary);
}

/* ============================================
   Profile Card
   ============================================ */
.profile-card {
    text-align: center;
    padding: 30px 20px;
}

.profile-card .profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--border-color);
    object-fit: cover;
}

.profile-card .profile-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 8px 0;
}

.profile-card .profile-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   Personnel Details
   ============================================ */
.personnel-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.personnel-details .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.personnel-details .detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.personnel-details .detail-value {
    font-size: 14px;
    color: var(--text-heading);
}

.personnel-details .detail-value.empty {
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   Lucid Tables - Hover Rows Style
   ============================================ */
.table-hover-rows {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 0.55rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-hover-rows thead {
    background: var(--bg-sidebar);
}

.table-hover-rows thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-heading);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover-rows thead th:last-child {
    text-align: right;
}

.table-hover-rows tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

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

.table-hover-rows tbody tr:hover {
    background: rgba(73, 197, 182, 0.08);
}

.table-hover-rows tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.table-hover-rows tbody td:last-child {
    text-align: right;
    font-weight: 600;
}

/* Paid row styling (green tint) */
.table-hover-rows tbody tr.row-paid {
    background: rgba(34, 175, 70, 0.08);
}

.table-hover-rows tbody tr.row-paid:hover {
    background: rgba(34, 175, 70, 0.15);
}

/* Unpaid row styling (yellow tint) */
.table-hover-rows tbody tr.row-unpaid {
    background: rgba(243, 173, 6, 0.08);
}

.table-hover-rows tbody tr.row-unpaid:hover {
    background: rgba(243, 173, 6, 0.15);
}

/* Current row styling (highlighted green) */
.table-hover-rows tbody tr.row-current {
    background: rgba(34, 175, 70, 0.12);
}

.table-hover-rows tbody tr.row-current:hover {
    background: rgba(34, 175, 70, 0.18);
}

/* Table badges */
.table-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 8px;
}

.table-badge.badge-success {
    background: var(--color-success);
    color: #fff;
}

.table-badge.badge-warning {
    background: var(--color-warning);
    color: #000;
}

.table-badge.badge-current {
    background: var(--color-primary);
    color: #fff;
}

/* Amount styling */
.table-hover-rows .amount-unpaid {
    color: var(--color-danger);
}

/* Dark mode table adjustments */
body.full-dark .table-hover-rows tbody tr:hover {
    background: rgba(73, 197, 182, 0.12);
}

body.full-dark .table-hover-rows tbody tr.row-paid {
    background: rgba(34, 175, 70, 0.12);
}

body.full-dark .table-hover-rows tbody tr.row-unpaid {
    background: rgba(243, 173, 6, 0.12);
}

body.full-dark .table-hover-rows tbody tr.row-current {
    background: rgba(34, 175, 70, 0.15);
}

/* Responsive table */
@media (max-width: 768px) {

    .table-hover-rows thead th,
    .table-hover-rows tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ============================================
   Layout Grid
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
}

.col-lg-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding: 0 15px;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 1200px) {

    /* Navbar responsive - show mobile toggle */
    .navbar-fixed-top .navbar-btn {
        display: block;
    }

    .navbar-fixed-top .navbar-brand {
        width: auto;
        padding-left: 0;
    }

    .navbar-fixed-top .navbar-search {
        display: none;
    }

    #left-sidebar {
        left: calc(-1 * var(--sidebar-width));
        box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.2);
        top: 60px;
    }

    #left-sidebar.offcanvas-active {
        left: 0;
    }

    #main-content {
        width: 100%;
        padding: 15px;
    }

    /* Mobile Menu Button - hide since we use navbar-btn now */
    .mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 992px) {

    .col-lg-4,
    .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .personnel-details {
        grid-template-columns: 1fr;
    }

    body.wm-personnel-lucid::before,
    body.wm-personnel-lucid::after,
    #lucid-wrapper::before,
    #lucid-wrapper::after {
        width: 2px;
        height: 2px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 20px;
    }

    .profile-card .profile-photo {
        width: 100px;
        height: 100px;
    }

    .profile-card .profile-name {
        font-size: 18px;
    }
}

/* Mobile Menu Button (hidden by default) */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
}

/* Close button for sidebar */
.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .sidebar-close {
        display: block;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-20 {
    margin-top: 20px !important;
}

/* ============================================
   Icon Font Fallback (Simple Line Icons style)
   ============================================ */
[class^="icon-"] {
    font-style: normal;
    font-weight: normal;
}

/* Using Unicode characters as icon fallbacks */
.icon-home::before {
    content: '🏠';
}

.icon-clock::before {
    content: '⏰';
}

.icon-wallet::before {
    content: '💳';
}

.icon-chart::before {
    content: '📊';
}