/* ==========================================================================
   HH Group Agriculture Management System — Premium Admin Theme
   Primary: #118C4F | Secondary: #0F6E42
   ========================================================================== */

:root {
    --hh-primary: #118C4F;
    --hh-primary-rgb: 17, 140, 79;
    --hh-secondary: #0F6E42;
    --hh-secondary-rgb: 15, 110, 66;
    --hh-primary-light: #16a85e;
    --hh-primary-dark: #0c6b3c;
    --hh-accent: #e8f7ef;
    --hh-accent-soft: #f0faf4;
    --hh-sidebar-bg: #0b1f16;
    --hh-sidebar-bg-2: #0f2a1d;
    --hh-sidebar-hover: rgba(17, 140, 79, 0.18);
    --hh-sidebar-active: rgba(17, 140, 79, 0.28);
    --hh-sidebar-text: #a8c4b5;
    --hh-sidebar-text-active: #ffffff;
    --hh-sidebar-width: 272px;
    --hh-sidebar-collapsed: 78px;
    --hh-navbar-height: 64px;
    --hh-body-bg: #f3f6f4;
    --hh-card-bg: #ffffff;
    --hh-border: #e2ebe6;
    --hh-text: #1a2e24;
    --hh-text-muted: #6b7f74;
    --hh-danger: #dc3545;
    --hh-warning: #f0ad4e;
    --hh-info: #17a2b8;
    --hh-success: #118C4F;
    --hh-radius: 14px;
    --hh-radius-sm: 10px;
    --hh-shadow: 0 4px 20px rgba(11, 31, 22, 0.06);
    --hh-shadow-lg: 0 12px 40px rgba(11, 31, 22, 0.1);
    --hh-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --hh-font: "Segoe UI", "Nunito Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--hh-font);
    background: var(--hh-body-bg);
    color: var(--hh-text);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--hh-primary);
    text-decoration: none;
    transition: color var(--hh-transition);
}

a:hover {
    color: var(--hh-secondary);
}

/* --------------------------------------------------------------------------
   Guest / Login
   -------------------------------------------------------------------------- */
.guest-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(17, 140, 79, 0.25), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(15, 110, 66, 0.35), transparent 45%),
        linear-gradient(145deg, #0b1f16 0%, #0f2a1d 40%, #118C4F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.guest-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.015) 40px,
            rgba(255, 255, 255, 0.015) 41px
        );
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    padding: 2.5rem 2.25rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.55s ease both;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
}

.login-logo img {
    max-height: 72px;
    width: auto;
    margin-bottom: 0.85rem;
    filter: drop-shadow(0 4px 8px rgba(17, 140, 79, 0.2));
}

.login-logo h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hh-secondary);
    margin: 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-logo p {
    margin: 0.35rem 0 0;
    color: var(--hh-text-muted);
    font-size: 0.875rem;
}

.login-card .form-control {
    border-radius: 10px;
    border: 1.5px solid var(--hh-border);
    padding: 0.7rem 1rem;
    transition: border-color var(--hh-transition), box-shadow var(--hh-transition);
}

.login-card .form-control:focus {
    border-color: var(--hh-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--hh-primary-rgb), 0.18);
}

.login-card .input-group-text {
    background: var(--hh-accent);
    border: 1.5px solid var(--hh-border);
    border-right: 0;
    color: var(--hh-primary);
    border-radius: 10px 0 0 10px;
}

.login-card .input-group .form-control {
    border-left: 0;
    border-radius: 0 10px 10px 0;
}

.btn-hh-primary {
    background: linear-gradient(135deg, var(--hh-primary) 0%, var(--hh-secondary) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.7rem 1.25rem;
    transition: transform var(--hh-transition), box-shadow var(--hh-transition), filter var(--hh-transition);
    box-shadow: 0 6px 18px rgba(var(--hh-primary-rgb), 0.35);
}

.btn-hh-primary:hover,
.btn-hh-primary:focus {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(var(--hh-primary-rgb), 0.45);
}

.btn-hh-primary:disabled {
    opacity: 0.75;
    transform: none;
}

.btn-hh-outline,
.btn-outline-hh,
.btn-hh,
.btn-hh-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.25rem;
    line-height: 1.25;
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
}

.btn-hh-outline {
    border: 1.5px solid var(--hh-primary);
    color: var(--hh-primary);
    background: transparent;
}

.btn-hh-outline:hover {
    background: var(--hh-primary);
    color: #fff;
}

.btn-hh {
    background: linear-gradient(135deg, var(--hh-primary) 0%, var(--hh-secondary) 100%);
    border: none;
    color: #fff;
}

.btn-hh:hover,
.btn-hh:focus {
    color: #fff;
    filter: brightness(1.05);
}

.btn-outline-hh {
    border: 1.5px solid var(--hh-primary);
    color: var(--hh-primary);
    background: transparent;
}

.btn-outline-hh:hover {
    background: var(--hh-primary);
    color: #fff;
}

/* Splash / Loading */
.splash-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0b1f16, #118C4F);
    color: #fff;
}

.splash-screen img {
    max-height: 90px;
    margin-bottom: 1.5rem;
    animation: pulseSoft 1.6s ease-in-out infinite;
}

.splash-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.splash-screen p {
    margin-top: 1.25rem;
    opacity: 0.85;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   App Shell
   -------------------------------------------------------------------------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--hh-sidebar-width);
    background: linear-gradient(180deg, var(--hh-sidebar-bg) 0%, var(--hh-sidebar-bg-2) 100%);
    color: var(--hh-sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--hh-transition), transform var(--hh-transition);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
    height: var(--hh-navbar-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-brand img {
    height: 36px;
    width: auto;
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-brand small {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--hh-sidebar-text);
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(168, 196, 181, 0.55);
    padding: 0.85rem 0.85rem 0.4rem;
    font-weight: 600;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--hh-sidebar-text);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background var(--hh-transition), color var(--hh-transition), transform var(--hh-transition);
}

.sidebar .nav-link i {
    font-size: 1.15rem;
    width: 1.35rem;
    text-align: center;
    opacity: 0.9;
}

.sidebar .nav-link:hover {
    background: var(--hh-sidebar-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--hh-sidebar-active);
    color: var(--hh-sidebar-text-active);
    box-shadow: inset 3px 0 0 var(--hh-primary);
}

.sidebar .nav-link.active i {
    color: var(--hh-primary-light);
}

.main-content {
    margin-left: var(--hh-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left var(--hh-transition);
}

.top-navbar {
    height: var(--hh-navbar-height);
    background: var(--hh-card-bg);
    border-bottom: 1px solid var(--hh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(11, 31, 22, 0.04);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand-mini {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand-mini img {
    height: 32px;
}

.btn-sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--hh-accent);
    color: var(--hh-primary);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--hh-transition);
}

.btn-sidebar-toggle:hover {
    background: rgba(var(--hh-primary-rgb), 0.2);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--hh-text-muted);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--hh-transition), color var(--hh-transition);
}

.nav-icon-btn:hover {
    background: var(--hh-accent);
    color: var(--hh-primary);
}

.nav-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--hh-danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--hh-text);
    transition: background var(--hh-transition);
}

.user-dropdown-toggle:hover {
    background: var(--hh-accent);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    text-align: left;
    line-height: 1.2;
}

.user-meta .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-meta .role {
    font-size: 0.75rem;
    color: var(--hh-text-muted);
}

.content-area {
    padding: 1.5rem 1.75rem;
    flex: 1;
}

.app-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--hh-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--hh-border);
    background: var(--hh-card-bg);
}

/* --------------------------------------------------------------------------
   Cards, Stats, Headers
   -------------------------------------------------------------------------- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.4s ease both;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--hh-text);
    letter-spacing: -0.02em;
}

.page-header .breadcrumb {
    margin: 0.35rem 0 0;
    background: transparent;
    padding: 0;
    font-size: 0.8rem;
}

.page-header .breadcrumb-item a {
    color: var(--hh-text-muted);
}

.page-header .breadcrumb-item.active {
    color: var(--hh-primary);
}

.hh-card {
    background: var(--hh-card-bg);
    border: 1px solid var(--hh-border);
    border-radius: var(--hh-radius);
    box-shadow: var(--hh-shadow);
    margin-bottom: 1.25rem;
    padding: 10px;
    overflow: hidden;
    transition: box-shadow var(--hh-transition), transform var(--hh-transition);
    animation: fadeUp 0.45s ease both;
}

/* Forms/tables placed directly in .hh-card (no header/body) — match Şirkətlər spacing */
.hh-card:not(:has(> .hh-card-header)):not(:has(> .hh-card-body)) {
    padding: 1.25rem 1.5rem;
}

.hh-card:hover {
    box-shadow: var(--hh-shadow-lg);
}

.hh-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #fff 0%, var(--hh-accent-soft) 100%);
}

.hh-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: var(--hh-text);
}

.hh-card-body {
    padding: 0;
}

/* Header present but body missing — pad the form/content after header */
.hh-card > .hh-card-header + form,
.hh-card > .hh-card-header + .table-responsive,
.hh-card > .hh-card-header + .row {
    padding: 1.25rem 1.5rem;
}

.stat-card {
    background: var(--hh-card-bg);
    border: 1px solid var(--hh-border);
    border-radius: var(--hh-radius);
    padding: 1.25rem;
    box-shadow: var(--hh-shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    transition: transform var(--hh-transition), box-shadow var(--hh-transition);
    animation: fadeUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(var(--hh-primary-rgb), 0.08), transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hh-shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: var(--hh-accent);
    color: var(--hh-primary);
}

.stat-icon.success { background: rgba(17, 140, 79, 0.12); color: var(--hh-success); }
.stat-icon.warning { background: rgba(240, 173, 78, 0.15); color: #d68910; }
.stat-icon.danger { background: rgba(220, 53, 69, 0.12); color: var(--hh-danger); }
.stat-icon.info { background: rgba(23, 162, 184, 0.12); color: var(--hh-info); }
.stat-icon.primary { background: rgba(17, 140, 79, 0.12); color: var(--hh-primary); }

.stat-content .stat-label {
    font-size: 0.8rem;
    color: var(--hh-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-content .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--hh-text);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-content .stat-meta {
    font-size: 0.75rem;
    color: var(--hh-text-muted);
    margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Tables & Forms
   -------------------------------------------------------------------------- */
.table-hh {
    margin-bottom: 0;
}

.table-hh thead th {
    background: var(--hh-accent-soft);
    color: var(--hh-secondary);
    font-weight: 650;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--hh-border);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table-hh tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--hh-border);
    font-size: 0.9rem;
}

.table-hh tbody tr {
    transition: background var(--hh-transition);
}

.table-hh tbody tr:hover {
    background: var(--hh-accent-soft);
}

/* Fixed-width wrapping table (no horizontal growth/scroll) */
.hh-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.table-hh-fixed {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.table-hh-fixed col.col-id { width: 3.5%; }
.table-hh-fixed col.col-code { width: 9%; }
.table-hh-fixed col.col-name { width: 20%; }
.table-hh-fixed col.col-tax { width: 11%; }
.table-hh-fixed col.col-company { width: 14%; }
.table-hh-fixed col.col-branch { width: 14%; }
.table-hh-fixed col.col-email { width: 17%; }
.table-hh-fixed col.col-phone { width: 11%; }
.table-hh-fixed col.col-status { width: 9%; }
.table-hh-fixed col.col-actions { width: 9.75rem; }

.table-hh-emp col.col-name { width: 18%; }
.table-hh-emp col.col-code { width: 10%; }
.table-hh-emp col.col-company { width: 12%; }
.table-hh-emp col.col-branch { width: 12%; }
.table-hh-emp col.col-department { width: 12%; }
.table-hh-emp col.col-position { width: 12%; }
.table-hh-emp col.col-status { width: 9%; }

.table-hh-positions col.col-id { width: 4%; }
.table-hh-positions col.col-name { width: auto; }
.table-hh-positions col.col-actions { width: 9.75rem; }

/* Employee form — 4 card blocks */
#employeeForm .employee-form-block {
    padding: 0;
    margin-bottom: 1rem;
    animation: none;
}

#employeeForm .employee-form-block:hover {
    transform: none;
    box-shadow: var(--hh-shadow);
}

#employeeForm .employee-form-block .hh-card-header {
    padding: 0.95rem 1.2rem;
}

#employeeForm .employee-form-block .hh-card-header h5 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--hh-secondary);
}

#employeeForm .employee-form-block .hh-card-body {
    padding: 1.15rem 1.2rem 1.25rem;
}

#employeeForm .employee-form-block .form-control,
#employeeForm .employee-form-block .form-select {
    background: #f5f7f6;
    border-color: #e4ebe7;
    border-radius: 12px;
    min-height: 2.55rem;
}

#employeeForm .employee-form-block .form-control:focus,
#employeeForm .employee-form-block .form-select:focus {
    background: #fff;
    border-color: rgba(var(--hh-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.2rem rgba(var(--hh-primary-rgb), 0.12);
}

#employeeForm .employee-form-block .form-label {
    font-size: 0.86rem;
    color: #4d5f56;
    font-weight: 600;
}

.employee-photo-panel {
    border: 1px solid var(--hh-border);
    border-radius: 16px;
    background: #fff;
    padding: 1rem 1rem 0.9rem;
    box-shadow: 0 1px 2px rgba(11, 31, 22, 0.03);
}

.employee-photo-panel__head {
    padding-bottom: 0.75rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--hh-border);
}

.employee-photo-panel__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hh-text);
    margin: 0 0 0.28rem;
    line-height: 1.25;
}

.employee-photo-panel__desc {
    margin: 0;
    font-size: 0.78rem;
    color: var(--hh-text-muted);
    line-height: 1.4;
}

.employee-photo-panel__foot {
    margin: 0.75rem 0 0;
    font-size: 0.76rem;
    color: var(--hh-text-muted);
    text-align: center;
    line-height: 1.4;
}

.employee-photo-panel[data-has-photo="1"] .hh-photo-frame-34 {
    border-style: solid;
    border-color: rgba(17, 140, 79, 0.35);
    background: #0f1a14;
}

.hh-photo-stage {
    display: flex;
    justify-content: center;
    margin-bottom: 0.95rem;
}

.hh-photo-frame-34 {
    position: relative;
    width: 168px;
    height: 224px;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    border: 1.5px dashed #cfd8d3;
    background: linear-gradient(180deg, #fbfcfc 0%, #f3f6f4 100%);
    overflow: hidden;
    box-sizing: border-box;
    flex: none;
}

.hh-photo-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hh-photo-media img,
.hh-photo-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.hh-photo-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0.6rem 0.5rem 2.15rem;
    color: #6b7f74;
    z-index: 1;
    text-align: center;
    box-sizing: border-box;
}

.hh-photo-empty__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background: #fff;
    border: 1px solid #e4ebe7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hh-photo-empty__icon i {
    font-size: 1.25rem;
    line-height: 1;
    color: #9aaba2;
}

.hh-photo-empty__title {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #4d5f56;
}

.hh-photo-empty__sub {
    font-size: 0.76rem;
    color: #9aaba2;
}

.hh-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 0.5rem 0.4rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    background: linear-gradient(180deg, rgba(90, 105, 98, 0.08) 0%, rgba(70, 85, 78, 0.55) 100%);
    pointer-events: none;
}

.hh-photo-actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.hh-photo-main-btn,
.hh-photo-select-btn {
    flex: 1 1 auto;
    width: 100%;
    min-height: 2.6rem;
    font-weight: 650;
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.hh-photo-clear-btn {
    flex: 0 0 auto;
    min-width: 6.25rem;
    min-height: 2.6rem;
    border-radius: 14px !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.hh-photo-clear-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#employeeForm .employee-contact-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

#employeeForm .employee-contact-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
}

#employeeForm .employee-contact-label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hh-text, #1a2e24);
    line-height: 1.2;
}

#employeeForm .employee-contact-row__spacer {
    visibility: hidden;
}

#employeeForm .employee-contact-input-group {
    flex-wrap: nowrap;
}

#employeeForm .employee-contact-input-group .form-control {
    min-height: 2.15rem;
    font-size: 0.875rem;
}

#employeeForm .employee-contact-input-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.05rem;
    min-height: 2.15rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.8rem;
    line-height: 1;
}

#employeeForm .employee-contact-input-group .btn i {
    font-size: 0.85rem;
}

@media (max-width: 575.98px) {
    #employeeForm .employee-contact-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    #employeeForm .employee-contact-row__spacer {
        display: none;
    }
}

#employeeForm .hh-password-group {
    flex-wrap: nowrap;
}

#employeeForm .hh-password-group .form-control {
    border-right: 0 !important;
    background: #f5f7f6;
    border-color: #e4ebe7;
    border-radius: 12px 0 0 12px !important;
    min-height: 2.55rem;
}

#employeeForm .hh-password-group .hh-password-eye-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 0.9rem !important;
    background: #f5f7f6 !important;
    border: 1px solid #e4ebe7 !important;
    border-left: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none !important;
    color: var(--hh-text-muted) !important;
    line-height: 1;
    min-height: 2.55rem;
}

#employeeForm .hh-password-group .hh-password-eye-btn:hover,
#employeeForm .hh-password-group .hh-password-eye-btn:focus {
    color: var(--hh-primary) !important;
    background: #f5f7f6 !important;
    box-shadow: none !important;
}

#employeeForm .hh-password-group .form-control:focus {
    background: #fff;
    border-color: rgba(var(--hh-primary-rgb), 0.45);
    box-shadow: none;
}

#employeeForm .hh-password-group .form-control:focus + .hh-password-eye-btn {
    background: #fff !important;
    border-color: rgba(var(--hh-primary-rgb), 0.45) !important;
}

#employeeForm .hh-password-group .hh-password-eye-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

.hh-emp-detail-photo {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--hh-border);
    box-shadow: var(--hh-shadow);
}

.hh-form-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--hh-text);
    margin: 0 0 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(25, 90, 55, 0.12);
}

.table-hh-dept col.col-name { width: 22%; }
.table-hh-dept col.col-company { width: 18%; }
.table-hh-dept col.col-branch { width: 18%; }
.table-hh-dept col.col-status { width: 10%; }

.table-hh-roles col.col-name { width: 22%; }
.table-hh-roles col.col-perms { width: 42%; }
.table-hh-roles col.col-updated { width: 14%; }

.table-hh-fixed thead th,
.table-hh-fixed tbody td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 0; /* forces fixed layout cells to respect col widths */
}

.table-hh-fixed thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
}

.table-hh-fixed tbody td {
    vertical-align: top;
    line-height: 1.35;
}

.table-hh-fixed .cell-id,
.table-hh-fixed .cell-status {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.table-hh-fixed thead th:last-child,
.table-hh-fixed .cell-actions {
    width: 9.75rem;
    min-width: 9.75rem;
    max-width: none;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    vertical-align: middle;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.table-hh-fixed .cell-actions .action-btns {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: auto;
    min-width: max-content;
}

.table-hh-fixed .cell-actions .btn-action,
.table-hh-fixed .cell-actions .btn-action i {
    flex: 0 0 auto;
}

@media (max-width: 991.98px) {
    .table-hh-fixed thead th,
    .table-hh-fixed tbody td {
        padding: 0.7rem 0.55rem;
        font-size: 0.82rem;
    }

    .table-hh-fixed col.col-id { width: 5%; }
    .table-hh-fixed col.col-code { width: 12%; }
    .table-hh-fixed col.col-name { width: 26%; }
    .table-hh-fixed col.col-tax { width: 0%; }
    .table-hh-fixed col.col-email { width: 22%; }
    .table-hh-fixed col.col-phone { width: 0%; }
    .table-hh-fixed col.col-status { width: 12%; }
    .table-hh-fixed col.col-actions { width: 9.75rem; }

    .table-hh-fixed .hh-hide-md {
        display: none !important;
    }

    .table-hh-dept col.col-name { width: 40%; }
    .table-hh-dept col.col-status { width: 18%; }

    .table-hh-roles col.col-name { width: 30%; }
    .table-hh-roles col.col-perms { width: 50%; }
    .table-hh-roles col.col-updated { width: 0%; }
}

@media (max-width: 575.98px) {
    .table-hh-fixed col.col-code { width: 0%; }
    .table-hh-fixed col.col-email { width: 0%; }
    .table-hh-fixed col.col-name { width: 42%; }
    .table-hh-fixed col.col-status { width: 18%; }
    .table-hh-fixed col.col-actions { width: 9.75rem; }

    .table-hh-fixed thead th:last-child,
    .table-hh-fixed .cell-actions {
        width: 9.75rem;
        min-width: 9.75rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .table-hh-fixed .hh-hide-sm {
        display: none !important;
    }

    .table-hh-dept col.col-name { width: 48%; }
    .table-hh-dept col.col-status { width: 20%; }
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--hh-text);
    margin-bottom: 0.4rem;
}

.hh-field-info {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hh-text-muted);
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    transition: color var(--hh-transition);
}

.hh-field-info:hover,
.hh-field-info:focus {
    color: var(--hh-primary);
    outline: none;
}

.hh-field-info i {
    font-size: 0.95rem;
}

.hh-detail-item {
    background: var(--hh-accent-soft);
    border: 1px solid var(--hh-border);
    border-radius: var(--hh-radius-sm);
    padding: 0.85rem 1rem;
    height: 100%;
}

.hh-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hh-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.hh-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hh-text);
    word-break: break-word;
}

.hh-view-modal .modal-header {
    border-bottom: 1px solid var(--hh-border);
    background: linear-gradient(180deg, #fff 0%, var(--hh-accent-soft) 100%);
}

.hh-view-modal .modal-title {
    font-weight: 700;
    color: var(--hh-text);
}

.hh-view-modal .modal-footer {
    border-top: 1px solid var(--hh-border);
}

.hh-view-modal .modal-body {
    padding: 1.25rem 1.5rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon i {
    margin: 0 !important;
    font-size: 0.95rem;
    line-height: 1;
}

.form-control,
.form-select {
    border-radius: var(--hh-radius-sm);
    border: 1.5px solid var(--hh-border);
    padding: 0.6rem 0.9rem;
    transition: border-color var(--hh-transition), box-shadow var(--hh-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--hh-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--hh-primary-rgb), 0.15);
}

.required::after {
    content: " *";
    color: var(--hh-danger);
}

.invalid-feedback,
.text-danger.small {
    font-size: 0.8rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status.active,
.badge-status.success {
    background: rgba(17, 140, 79, 0.12);
    color: var(--hh-primary);
}

.badge-status.inactive,
.badge-status.danger {
    background: rgba(220, 53, 69, 0.12);
    color: var(--hh-danger);
}

.badge-status.terminated {
    background: rgba(108, 117, 125, 0.14);
    color: #5c6770;
}

.badge-status.warning {
    background: rgba(240, 173, 78, 0.18);
    color: #b7791f;
}

.action-btns {
    display: flex;
    gap: 0.35rem;
}

.btn-action {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hh-border);
    background: #fff;
    color: var(--hh-text-muted);
    transition: all var(--hh-transition);
}

.btn-action:hover {
    color: #fff;
}

.btn-action.edit:hover { background: var(--hh-primary); border-color: var(--hh-primary); }
.btn-action.delete:hover { background: var(--hh-danger); border-color: var(--hh-danger); }
.btn-action.view:hover { background: var(--hh-info); border-color: var(--hh-info); }

/* Select2 & DataTables tweaks */
.select2-container--bootstrap-5 .select2-selection,
.select2-container--default .select2-selection--single {
    border-radius: var(--hh-radius-sm) !important;
    border-color: var(--hh-border) !important;
    min-height: 42px !important;
    padding: 0.3rem 0.5rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--hh-primary) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1.5px solid var(--hh-border);
    padding: 0.35rem 0.65rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--hh-primary) !important;
    border-color: var(--hh-primary) !important;
    color: #fff !important;
    border-radius: 8px;
}

.chart-container {
    position: relative;
    height: 280px;
}

.alert-hh {
    border: none;
    border-radius: var(--hh-radius-sm);
    border-left: 4px solid;
    box-shadow: var(--hh-shadow);
}

.alert-hh.alert-success { border-left-color: var(--hh-success); background: rgba(17, 140, 79, 0.08); }
.alert-hh.alert-danger { border-left-color: var(--hh-danger); background: rgba(220, 53, 69, 0.08); }
.alert-hh.alert-warning { border-left-color: var(--hh-warning); background: rgba(240, 173, 78, 0.12); }
.alert-hh.alert-info { border-left-color: var(--hh-info); background: rgba(23, 162, 184, 0.08); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 22, 0.5);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

body.sidebar-collapsed .sidebar {
    width: var(--hh-sidebar-collapsed);
}

body.sidebar-collapsed .sidebar-brand span,
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .sidebar .nav-link span {
    display: none;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--hh-sidebar-collapsed);
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

/* Farmer layout */
.farmer-layout {
    min-height: 100vh;
    background: var(--hh-body-bg);
}

.farmer-topbar {
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-secondary));
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.farmer-topbar img {
    height: 40px;
}

.farmer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.88; }
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .navbar-brand-mini {
        display: flex;
    }

    body.sidebar-collapsed .sidebar {
        width: var(--hh-sidebar-width);
    }

    body.sidebar-collapsed .sidebar-brand span,
    body.sidebar-collapsed .nav-section-label,
    body.sidebar-collapsed .sidebar .nav-link span {
        display: initial;
    }

    body.sidebar-collapsed .sidebar .nav-link {
        justify-content: flex-start;
        padding: 0.65rem 0.85rem;
    }
}

@media (max-width: 575.98px) {
 .content-area {
 padding: 1rem 1.15rem;
 }

 .hh-card:not(:has(> .hh-card-header)):not(:has(> .hh-card-body)) {
  padding: 1rem 1.15rem;
 }

 .hh-card-body {
  padding: 0;
 }

    .login-card {
        padding: 1.75rem 1.25rem;
    }

    .user-meta {
        display: none;
    }

    .stat-content .stat-value {
        font-size: 1.35rem;
    }
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.hh-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding-top: 0.35rem;
}

.hh-pagination-meta {
    font-weight: 500;
    line-height: 1.3;
}

.hh-pagination-links {
    margin-left: auto;
}

.hh-pager-list {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
}

.hh-pagination .page-item {
    margin: 0;
    display: inline-flex;
}

.hh-pagination .page-link,
.hh-pager-mobile .page-link {
    border: 1px solid var(--hh-border);
    color: var(--hh-secondary);
    background: #fff;
    border-radius: 8px !important;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.55rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1 !important;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: none;
    transition: background var(--hh-transition), color var(--hh-transition), border-color var(--hh-transition), box-shadow var(--hh-transition);
}

.hh-pagination .page-link i {
    font-size: 0.85rem;
    line-height: 1;
    margin: 0;
    display: block;
}

.hh-pagination .page-link-ellipsis {
    min-width: 2rem;
    border-color: transparent;
    background: transparent;
    color: var(--hh-text-muted);
}

.hh-pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.hh-pager-mobile a.page-link:hover {
    background: var(--hh-accent-soft);
    border-color: rgba(var(--hh-primary-rgb), 0.35);
    color: var(--hh-primary);
}

.hh-pagination .page-item.active .page-link {
    background: var(--hh-primary);
    border-color: var(--hh-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--hh-primary-rgb), 0.28);
}

.hh-pagination .page-item.disabled .page-link,
.hh-pager-mobile .page-link.disabled {
    background: #f7faf8;
    color: var(--hh-text-muted);
    opacity: 0.75;
    pointer-events: none;
}

.hh-pager-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.hh-pager-mobile .page-link {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 42%;
    height: 2.4rem;
    padding: 0 0.75rem !important;
    white-space: nowrap;
}

.hh-pager-mobile-status {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--hh-secondary);
    text-align: center;
    min-width: 3.5rem;
}

@media (min-width: 576px) {
    .hh-pager-list {
        display: inline-flex;
    }

    .hh-pager-mobile {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .hh-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .hh-pagination-links {
        margin-left: 0;
        width: 100%;
    }
}

/* Compatibility aliases */
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
