/* HRMS Enterprise Design System — Ariston Group */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --hrms-font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --hrms-bg: #f5f7fa;
    --hrms-surface: #ffffff;
    --hrms-sidebar-start: #1a2744;
    --hrms-sidebar-end: #0f1729;
    --hrms-ariston-blue: #1e4d8c;
    --hrms-ariston-blue-light: #2d6cb5;
    --hrms-ariston-red: #e30613;
    --hrms-success: #22c55e;
    --hrms-success-dark: #16a34a;
    --hrms-warning: #f59e0b;
    --hrms-danger: #ef4444;
    --hrms-text: #1e293b;
    --hrms-text-secondary: #64748b;
    --hrms-text-muted: #94a3b8;
    --hrms-border: #e2e8f0;
    --hrms-radius-sm: 8px;
    --hrms-radius: 14px;
    --hrms-radius-lg: 16px;
    --hrms-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --hrms-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --hrms-shadow-hover: 0 8px 28px rgba(15, 23, 42, 0.1);
    --hrms-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --hrms-sidebar-width: 272px;
    --hrms-topbar-height: 72px;
}

/* ── Base ── */
html {
    -webkit-font-smoothing: antialiased;
}

body,
body.app-body,
body.hrms-enterprise {
    font-family: var(--hrms-font);
    color: var(--hrms-text);
    background: var(--hrms-bg);
}

.hrms-hidden {
    display: none !important;
}

/* ── Cards & widgets ── */
.hrms-card {
    background: var(--hrms-surface);
    border-radius: var(--hrms-radius);
    box-shadow: var(--hrms-shadow);
    border: none;
    overflow: hidden;
    transition: box-shadow var(--hrms-transition), transform var(--hrms-transition);
}

.hrms-card:hover {
    box-shadow: var(--hrms-shadow-hover);
}

.hrms-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

.hrms-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--hrms-radius-sm);
    background: rgba(30, 77, 140, 0.1);
    color: var(--hrms-ariston-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.hrms-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--hrms-text);
}

.hrms-card__body {
    padding: 16px 24px 24px;
}

.hrms-card__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--hrms-text-muted);
}

.hrms-card__empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.35;
    display: block;
}

/* Profile status widget (green) */
.hrms-widget {
    display: block;
    text-decoration: none;
    border-radius: var(--hrms-radius-lg);
    padding: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform var(--hrms-transition), box-shadow var(--hrms-transition);
    box-shadow: var(--hrms-shadow);
}

.hrms-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--hrms-shadow-hover);
    text-decoration: none;
    color: #fff;
}

.hrms-widget--success {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
}

.hrms-widget__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 4px;
}

.hrms-widget__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

.hrms-widget__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--hrms-success-dark);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.hrms-widget__bg-icon {
    position: absolute;
    right: 16px;
    bottom: 8px;
    font-size: 80px;
    opacity: 0.15;
}

/* Shortcut grid */
.hrms-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hrms-shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--hrms-radius-sm);
    background: var(--hrms-bg);
    color: var(--hrms-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--hrms-transition), transform var(--hrms-transition);
}

.hrms-shortcut:hover {
    background: #eef2f6;
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--hrms-ariston-blue);
}

.hrms-shortcut__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(227, 6, 19, 0.08);
    color: var(--hrms-ariston-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* Dashboard */
.hrms-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hrms-dashboard__stats {
    margin-bottom: 4px;
}

.hrms-dashboard__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.hrms-dashboard__main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.hrms-dashboard__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hrms-card__body--compact {
    padding-top: 12px;
    padding-bottom: 20px;
}

.hrms-card__empty--compact {
    padding: 28px 16px;
}

.hrms-card__empty--compact i {
    font-size: 36px;
    margin-bottom: 8px;
}

.hrms-card--birthday {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 45%, #fce7f3 100%);
    border-left: 4px solid var(--hrms-ariston-red);
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-card--birthday__body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.hrms-card--birthday__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(227, 6, 19, 0.12);
    color: var(--hrms-ariston-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.hrms-card--birthday__text {
    min-width: 0;
    flex: 1;
}

.hrms-card--birthday__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9f1239;
    margin-bottom: 2px;
}

.hrms-card--birthday__names {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #881337;
    line-height: 1.4;
}

.hrms-stat-grid--bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hrms-stat-mini--link .hrms-stat-mini__value a {
    color: var(--hrms-ariston-blue);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.hrms-stat-mini--link .hrms-stat-mini__value a:hover {
    text-decoration: underline;
}

.hrms-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hrms-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 8px;
    border-radius: var(--hrms-radius-sm);
    background: var(--hrms-bg);
    min-height: 96px;
}

.hrms-summary-item__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hrms-text-secondary);
    margin-bottom: 6px;
}

.hrms-summary-item__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--hrms-text);
    line-height: 1.2;
}

.hrms-summary-item__value--text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hrms-summary-item__hint,
.hrms-summary-item__link {
    font-size: 11px;
    color: var(--hrms-text-muted);
    margin-top: 4px;
}

.hrms-summary-item__link {
    color: var(--hrms-ariston-blue);
    text-decoration: none;
    font-weight: 500;
}

.hrms-summary-item__link:hover {
    text-decoration: underline;
}

/* Admin stat mini cards */
.hrms-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hrms-stat-mini {
    background: var(--hrms-surface);
    border-radius: var(--hrms-radius);
    padding: 20px;
    box-shadow: var(--hrms-shadow);
    transition: transform var(--hrms-transition);
}

.hrms-stat-mini:hover {
    transform: translateY(-2px);
}

.hrms-stat-mini__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.hrms-stat-mini__icon--blue { background: rgba(30, 77, 140, 0.1); color: var(--hrms-ariston-blue); }
.hrms-stat-mini__icon--red { background: rgba(227, 6, 19, 0.08); color: var(--hrms-ariston-red); }
.hrms-stat-mini__icon--green { background: rgba(34, 197, 94, 0.1); color: var(--hrms-success-dark); }

.hrms-stat-mini__label {
    font-size: 12px;
    color: var(--hrms-text-secondary);
    margin: 0 0 4px;
}

.hrms-stat-mini__value {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: var(--hrms-text);
}

/* Placeholder info tiles */
.hrms-info-tile {
    padding: 16px;
    border-radius: var(--hrms-radius-sm);
    background: var(--hrms-bg);
}

.hrms-info-tile__label {
    font-size: 12px;
    color: var(--hrms-text-secondary);
    margin-bottom: 4px;
}

.hrms-info-tile__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--hrms-text);
}

/* ── Buttons ── */
.btn,
.hrms-btn {
    border-radius: var(--hrms-radius-sm) !important;
    font-weight: 500;
    font-family: var(--hrms-font);
    transition: all var(--hrms-transition);
    border: none;
    box-shadow: var(--hrms-shadow-sm);
}

.btn:hover,
.hrms-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--hrms-shadow);
}

.btn-primary,
.btn-success {
    background: var(--hrms-ariston-blue) !important;
    border-color: var(--hrms-ariston-blue) !important;
}

.btn-success {
    background: var(--hrms-success-dark) !important;
    border-color: var(--hrms-success-dark) !important;
}

.btn-danger {
    background: var(--hrms-danger) !important;
}

.btn-warning {
    background: var(--hrms-warning) !important;
}

.btn-default,
.btn-dark {
    background: var(--hrms-bg) !important;
    color: var(--hrms-text) !important;
    border: 1px solid var(--hrms-border) !important;
}

/* ── Forms ── */
.form-control {
    border-radius: var(--hrms-radius-sm) !important;
    border: 1px solid var(--hrms-border) !important;
    box-shadow: none !important;
    font-family: var(--hrms-font);
    transition: border-color var(--hrms-transition), box-shadow var(--hrms-transition);
    height: 42px;
}

.form-control:focus {
    border-color: var(--hrms-ariston-blue-light) !important;
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.12) !important;
}

.input-group-addon {
    border-radius: var(--hrms-radius-sm) 0 0 var(--hrms-radius-sm) !important;
    background: var(--hrms-bg) !important;
    border-color: var(--hrms-border) !important;
}

textarea.form-control {
    height: auto;
}

.modal-content {
    border: none;
    border-radius: var(--hrms-radius-lg);
    box-shadow: var(--hrms-shadow-hover);
}

.modal-header {
    border-bottom: 1px solid var(--hrms-border);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

/* ── Tables ── */
.table,
table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
}

.table > thead > tr > th,
table.dataTable thead th {
    background: var(--hrms-bg) !important;
    border-bottom: 2px solid var(--hrms-border) !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hrms-text-secondary);
    padding: 12px 16px !important;
}

.table > tbody > tr > td,
table.dataTable tbody td {
    border-top: 1px solid var(--hrms-border) !important;
    padding: 12px 16px !important;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd),
table.dataTable.stripe tbody tr.odd {
    background: rgba(245, 247, 250, 0.6) !important;
}

.table > tbody > tr:hover,
table.dataTable.hover tbody tr:hover {
    background: rgba(30, 77, 140, 0.04) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--hrms-radius-sm) !important;
    border: 1px solid var(--hrms-border) !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--hrms-ariston-blue) !important;
    color: #fff !important;
    border-color: var(--hrms-ariston-blue) !important;
}

/* ── Panels → cards (legacy + MVC content) ── */
.app-content .panel,
.mainpanel .panel,
.contentpanel .panel {
    border: none !important;
    border-radius: var(--hrms-radius) !important;
    box-shadow: var(--hrms-shadow) !important;
    margin-bottom: 20px;
    background: var(--hrms-surface);
    transition: box-shadow var(--hrms-transition);
}

.app-content .panel:hover,
.mainpanel .panel:hover {
    box-shadow: var(--hrms-shadow-hover);
}

.panel-heading {
    background: transparent !important;
    border-bottom: 1px solid var(--hrms-border) !important;
    border-radius: var(--hrms-radius) var(--hrms-radius) 0 0 !important;
    padding: 16px 20px !important;
}

.panel-title {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: var(--hrms-text) !important;
}

.panel-body {
    padding: 20px !important;
}

/* Module nav pills */
.hrms-module-nav,
.app-module-nav .nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}

.hrms-module-nav > li > a,
.app-module-nav .nav-pills > li > a {
    border-radius: 999px !important;
    padding: 8px 18px !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--hrms-text-secondary) !important;
    background: var(--hrms-surface);
    border: 1px solid var(--hrms-border);
    transition: all var(--hrms-transition);
}

.hrms-module-nav > li.active > a,
.hrms-module-nav > li > a:hover,
.app-module-nav .nav-pills > li.active > a {
    background: var(--hrms-ariston-blue) !important;
    color: #fff !important;
    border-color: var(--hrms-ariston-blue) !important;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--hrms-radius-sm);
}

/* Profile page */
.img-profile {
    border-radius: 50% !important;
    border: 4px solid var(--hrms-ariston-blue-light) !important;
    box-shadow: var(--hrms-shadow);
}

.profile-name {
    font-weight: 600;
    color: var(--hrms-text);
}

.lg-title {
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hrms-text-secondary) !important;
}

.text-primary {
    color: var(--hrms-ariston-blue) !important;
    font-weight: 500;
}

/* ── Login page ── */
.signin-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2744 0%, #1e4d8c 50%, #2d6cb5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.signin-page::before {
    display: none;
}

.panel-signin {
    border-radius: var(--hrms-radius-lg) !important;
    box-shadow: var(--hrms-shadow-hover) !important;
    border: none;
}

.signin-subtitle {
    color: var(--hrms-text-secondary);
    font-weight: 500;
}

.captcha-box {
    border-radius: var(--hrms-radius-sm);
    border: 1px solid var(--hrms-border);
    background: var(--hrms-bg);
}

#btnSignIn.btn-success {
    background: var(--hrms-ariston-blue) !important;
    border-color: var(--hrms-ariston-blue) !important;
    padding: 10px 24px;
    border-radius: var(--hrms-radius-sm) !important;
}

/* ── Legacy static shell (shell-layout.js) ── */
body.hrms-enterprise {
    background: var(--hrms-bg);
}

body.hrms-enterprise .headerwrapper.hrms-brand-header {
    background: var(--hrms-surface) !important;
    box-shadow: var(--hrms-shadow-sm);
    border-bottom: 1px solid var(--hrms-border);
    height: var(--hrms-topbar-height);
}

body.hrms-enterprise .headerwrapper .header-left .logo,
body.hrms-enterprise .hrms-header-logo {
    filter: none;
}

body.hrms-enterprise .headerwrapper .menu-collapse {
    color: var(--hrms-text);
    border-radius: var(--hrms-radius-sm);
    transition: background var(--hrms-transition);
}

body.hrms-enterprise .headerwrapper .menu-collapse:hover {
    background: var(--hrms-bg);
}

body.hrms-enterprise .hrms-signout,
body.hrms-enterprise #btnLogout {
    color: var(--hrms-ariston-red) !important;
    font-weight: 600;
    border-radius: var(--hrms-radius-sm);
    padding: 8px 16px;
    transition: background var(--hrms-transition);
}

body.hrms-enterprise .hrms-signout:hover,
body.hrms-enterprise #btnLogout:hover {
    background: rgba(227, 6, 19, 0.06) !important;
    text-decoration: none;
}

body.hrms-enterprise .leftpanel {
    background: linear-gradient(180deg, var(--hrms-sidebar-start) 0%, var(--hrms-sidebar-end) 100%) !important;
    border-right: none !important;
    width: var(--hrms-sidebar-width) !important;
}

body.hrms-enterprise .leftpanel .leftpanel-title {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 20px 8px;
}

body.hrms-enterprise .profile-left {
    background: rgba(255, 255, 255, 0.06) !important;
    margin: 16px 12px;
    border-radius: var(--hrms-radius);
    padding: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.hrms-enterprise .profile-left .media-heading,
body.hrms-enterprise #shellProfileName {
    color: #fff !important;
    font-weight: 600;
}

body.hrms-enterprise .profile-left .text-muted,
body.hrms-enterprise #shellProfileRole {
    color: rgba(255, 255, 255, 0.55) !important;
}

body.hrms-enterprise .profile-thumb img,
body.hrms-enterprise #shellProfileImage {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.hrms-enterprise .nav-bracket > li > a {
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: var(--hrms-radius-sm);
    margin: 2px 10px;
    padding: 10px 14px !important;
    transition: all var(--hrms-transition);
    border-left: 3px solid transparent;
}

body.hrms-enterprise .nav-bracket > li > a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

body.hrms-enterprise .nav-bracket > li.active > a,
body.hrms-enterprise .nav-bracket > li.parent-focus > a {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-left-color: var(--hrms-ariston-red) !important;
}

body.hrms-enterprise .nav-bracket .children {
    background: transparent !important;
}

body.hrms-enterprise .nav-bracket .children li a {
    color: rgba(255, 255, 255, 0.6) !important;
    padding-left: 42px !important;
    font-size: 13px;
}

body.hrms-enterprise .nav-bracket .children li.active a {
    color: #fff !important;
    font-weight: 600;
}

body.hrms-enterprise .mainpanel {
    background: var(--hrms-bg) !important;
}

body.hrms-enterprise .pageheader {
    background: var(--hrms-surface);
    border-bottom: 1px solid var(--hrms-border);
    padding: 20px 28px;
    margin: 0;
}

body.hrms-enterprise .pageheader .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--hrms-text-muted);
}

body.hrms-enterprise .pageheader h4,
body.hrms-enterprise #pageTitle {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: var(--hrms-text) !important;
    margin: 0 !important;
}

body.hrms-enterprise .contentpanel {
    padding: 24px 28px !important;
}

body.hrms-enterprise .pageicon {
    background: var(--hrms-ariston-blue) !important;
    border-radius: 12px !important;
}

#eventShow .hrms-card__empty {
    padding: 28px 16px;
}

#eventShow .hrms-card__empty i {
    font-size: 36px;
}

#eventShow p.text-danger {
    text-align: center;
    padding: 20px;
    margin: 0;
}

.hrms-skeleton {
    background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 50%, #eef2f6 75%);
    background-size: 200% 100%;
    animation: hrms-shimmer 1.4s infinite;
    border-radius: var(--hrms-radius-sm);
    height: 64px;
}

.hrms-skeleton--sm {
    height: 48px;
}

@keyframes hrms-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 1199px) {
    .hrms-dashboard__grid {
        grid-template-columns: 1fr;
    }

    .hrms-stat-grid,
    .hrms-stat-grid--bar {
        grid-template-columns: 1fr;
    }

    .hrms-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .hrms-shortcuts {
        grid-template-columns: 1fr;
    }

    .hrms-summary-grid {
        grid-template-columns: 1fr;
    }
}
