/* =========================================================
   MEDICAL CENTER CONSOLE
   Clean Corporate UI - MeDHRI Inspired
   ========================================================= */

:root {
    --mc-primary: #f2c500;
    --mc-primary-dark: #d4ab00;
    --mc-primary-soft: #fff6cc;

    --mc-black: #111111;
    --mc-dark: #242424;
    --mc-text: #2f2f2f;
    --mc-muted: #6b7280;

    --mc-white: #ffffff;
    --mc-bg: #ffffff;
    --mc-soft: #f7f4ef;
    --mc-soft-2: #fafafa;

    --mc-border: rgba(17, 17, 17, 0.08);
    --mc-border-strong: rgba(17, 17, 17, 0.14);

    --mc-success: #198754;
    --mc-danger: #dc3545;
    --mc-warning: #f2c500;
    --mc-info: #0dcaf0;

    --mc-radius-sm: 8px;
    --mc-radius-md: 12px;
    --mc-radius-lg: 18px;
    --mc-radius-xl: 24px;
    --mc-radius-2xl: 30px;

    --mc-shadow-sm: 0 6px 20px rgba(17, 17, 17, 0.04);
    --mc-shadow-md: 0 14px 36px rgba(17, 17, 17, 0.08);
    --mc-shadow-lg: 0 28px 80px rgba(17, 17, 17, 0.16);

    --mc-navbar-height: 72px;
    --mc-sidebar-width: 280px;
}

/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--mc-white);
    color: var(--mc-text);
    font-family: "Sarabun", "Tahoma", Arial, sans-serif;
    font-size: 15px;
}

a {
    color: var(--mc-black);
    text-decoration: none;
}

a:hover {
    color: var(--mc-primary-dark);
}

img {
    max-width: 100%;
}

hr {
    border-color: var(--mc-border);
    opacity: 1;
}

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

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

.bg-primary {
    background-color: var(--mc-primary) !important;
    color: var(--mc-black) !important;
}

.bg-light {
    background-color: var(--mc-soft) !important;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.app-navbar,
.navbar {
    min-height: var(--mc-navbar-height);
    background: #ffffff !important;
    border-bottom: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-sm);
    z-index: 1030;
}

.app-navbar .container-fluid {
    min-height: var(--mc-navbar-height);
    padding-left: 28px;
    padding-right: 28px;
}

.app-navbar-brand,
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--mc-black) !important;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.2px;
}

.app-navbar-logo {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #ffffff;
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
    flex: 0 0 auto;
}

.app-navbar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.app-navbar-title {
    color: var(--mc-black);
    line-height: 1;
    white-space: nowrap;
}

.app-navbar-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--mc-muted);
    text-transform: uppercase;
}

.navbar .nav-link {
    color: var(--mc-black) !important;
    font-weight: 750;
    border-radius: 999px;
    padding: 8px 14px !important;
}

.navbar .nav-link:hover {
    background: var(--mc-soft);
}

.app-navbar-user {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 7px 10px !important;
    border-radius: 999px;
    color: var(--mc-black) !important;
}

.app-navbar-user:hover {
    background: var(--mc-soft);
}

.app-navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--mc-primary);
    color: var(--mc-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    flex: 0 0 auto;
}

.app-navbar-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.app-navbar-user-name {
    font-size: 14px;
    font-weight: 850;
    color: var(--mc-black);
}

.app-navbar-user-role {
    margin-top: 2px;
    font-size: 12px;
    color: var(--mc-muted);
}

.navbar .dropdown-menu {
    border: 1px solid var(--mc-border);
    border-radius: 18px;
    box-shadow: var(--mc-shadow-md);
    padding: 8px;
}

.navbar .dropdown-item,
.navbar .dropdown-item-text {
    border-radius: 12px;
    padding: 8px 12px;
}

.navbar .dropdown-item {
    font-weight: 650;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: var(--mc-primary-soft);
    color: var(--mc-black);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.admin-wrapper {
    min-height: calc(100vh - var(--mc-navbar-height));
    display: flex;
    align-items: stretch;
    background: #ffffff;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 30px;
    background: #ffffff;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    margin-bottom: 24px;
    border-radius: var(--mc-radius-xl);
    background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-sm);
}

.page-title {
    margin: 0;
    color: var(--mc-black);
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.4px;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--mc-muted);
    font-size: 14px;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.app-sidebar,
.sidebar {
    width: var(--mc-sidebar-width);
    flex: 0 0 var(--mc-sidebar-width);
    min-height: calc(100vh - var(--mc-navbar-height));
    background: #fafafa;
    border-right: 1px solid var(--mc-border);
    padding: 18px 14px;
}

.sidebar-section-title {
    padding: 6px 12px 14px;
    color: var(--mc-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.app-sidebar .nav,
.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.app-sidebar .nav-link,
.sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 17px;
    color: #333333;
    font-weight: 800;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.app-sidebar .nav-link:hover,
.sidebar .nav-link:hover {
    background: var(--mc-primary-soft);
    color: var(--mc-black);
    transform: translateX(2px);
}

.app-sidebar .nav-link.active,
.sidebar .nav-link.active {
    background: var(--mc-black);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(17, 17, 17, 0.16);
}

.app-sidebar .nav-link.active::before,
.sidebar .nav-link.active::before {
    content: "";
    width: 5px;
    height: 24px;
    border-radius: 999px;
    background: var(--mc-primary);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--mc-border);
    color: var(--mc-black);
    font-size: 15px;
    flex: 0 0 auto;
}

.nav-link.active .sidebar-menu-icon {
    background: var(--mc-primary);
    border-color: var(--mc-primary);
    color: var(--mc-black);
}

.sidebar-menu-text {
    line-height: 1.15;
}

.sidebar-menu-title {
    display: block;
    font-size: 14px;
}

.sidebar-menu-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 650;
    color: var(--mc-muted);
}

.nav-link.active .sidebar-menu-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-divider {
    height: 1px;
    margin: 16px 8px;
    background: var(--mc-border);
}

/* =========================================================
   FOOTER
   ========================================================= */

.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--mc-border);
    color: var(--mc-muted);
    font-size: 13px;
    padding: 16px 30px;
}

.app-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.app-footer-title {
    color: var(--mc-black);
    font-weight: 850;
}

.app-footer-separator {
    margin: 0 8px;
    color: var(--mc-primary-dark);
}

/* =========================================================
   DASHBOARD HERO / QUICK CARDS
   ========================================================= */

.app-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--mc-radius-2xl);
    padding: 34px;
    margin-bottom: 24px;
    background:
        radial-gradient(circle at 90% 15%, rgba(242, 197, 0, 0.28), transparent 28%),
        linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
    color: #ffffff;
    box-shadow: var(--mc-shadow-md);
}

.app-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(242, 197, 0, 0.16);
    right: -90px;
    bottom: -130px;
}

.app-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.app-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(242, 197, 0, 0.16);
    color: var(--mc-primary);
    font-size: 12px;
    font-weight: 850;
    margin-bottom: 14px;
}

.app-hero-title {
    margin: 0;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.6px;
}

.app-hero-text {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-card {
    display: block;
    padding: 20px;
    min-height: 150px;
    border-radius: var(--mc-radius-xl);
    border: 1px solid var(--mc-border);
    background: #ffffff;
    box-shadow: var(--mc-shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mc-shadow-md);
    border-color: var(--mc-border-strong);
    color: var(--mc-black);
}

.quick-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: var(--mc-primary-soft);
    color: var(--mc-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    margin-bottom: 16px;
}

.quick-card-title {
    display: block;
    color: var(--mc-black);
    font-size: 16px;
    font-weight: 900;
}

.quick-card-text {
    display: block;
    margin-top: 6px;
    color: var(--mc-muted);
    font-size: 13px;
    line-height: 1.55;
}

/* =========================================================
   CARD / STAT
   ========================================================= */

.card {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-xl);
    background: #ffffff;
    box-shadow: var(--mc-shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--mc-border);
    color: var(--mc-black);
    font-weight: 900;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    background: #faf7f1;
    border-top: 1px solid var(--mc-border);
}

.stat-card {
    min-height: 132px;
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--mc-border);
    background: #ffffff;
    box-shadow: var(--mc-shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -30px;
    top: -30px;
    border-radius: 999px;
    background: rgba(242, 197, 0, 0.18);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mc-shadow-md);
}

.stat-title {
    color: var(--mc-muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-value {
    color: var(--mc-black);
    font-size: 36px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -1px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border-radius: 14px;
    font-weight: 800;
    padding: 9px 16px;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--mc-black) !important;
    border-color: var(--mc-black) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(17, 17, 17, 0.14);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #000000 !important;
    border-color: #000000 !important;
    color: var(--mc-primary) !important;
}

.btn-secondary {
    background: var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
    color: var(--mc-black) !important;
    box-shadow: 0 10px 22px rgba(242, 197, 0, 0.18);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background: var(--mc-primary-dark) !important;
    border-color: var(--mc-primary-dark) !important;
    color: var(--mc-black) !important;
}

.btn-light {
    background: var(--mc-soft) !important;
    border-color: var(--mc-border) !important;
    color: var(--mc-black) !important;
}

.btn-warning {
    background: #fff2b8 !important;
    border-color: #ffe176 !important;
    color: var(--mc-black) !important;
}

.btn-danger {
    background: var(--mc-danger) !important;
    border-color: var(--mc-danger) !important;
    color: #ffffff !important;
}

.btn-success {
    background: var(--mc-success) !important;
    border-color: var(--mc-success) !important;
    color: #ffffff !important;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 11px;
    font-size: 13px;
}

.btn-sso-mednu {
    min-width: 196px;
    height: 44px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #8f3f93 0%, #9c4a9f 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 44px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(143, 63, 147, 0.22);
    cursor: pointer;
    transition: all 0.18s ease-in-out;
}

.btn-sso-mednu:hover {
    background: linear-gradient(135deg, #7f347f 0%, #8f3f93 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(143, 63, 147, 0.30);
}

/* =========================================================
   FORMS
   ========================================================= */

.form-label {
    color: #2b2b2b;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 7px;
}

.form-control,
.form-select {
    min-height: 44px;
    border-radius: 15px;
    border: 1px solid rgba(17, 17, 17, 0.10);
    background-color: #ffffff;
    color: var(--mc-text);
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(17, 17, 17, 0.18);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 0.22rem rgba(242, 197, 0, 0.18);
}

.form-control::placeholder {
    color: #a3a3a3;
}

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

.input-group-text {
    background-color: var(--mc-soft);
    border-color: rgba(17, 17, 17, 0.10);
    color: var(--mc-black);
    font-weight: 800;
    border-radius: 15px;
}

.form-check-input:checked {
    background-color: var(--mc-primary);
    border-color: var(--mc-primary);
}

.form-check-input:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 0.22rem rgba(242, 197, 0, 0.18);
}

.form-text {
    color: var(--mc-muted);
    font-size: 12px;
}

.required.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--mc-danger) !important;
    box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.12) !important;
}

.invalid-feedback {
    display: none;
    margin-top: 6px;
    color: var(--mc-danger);
    font-size: 12px;
    font-weight: 750;
}

.invalid-feedback.show {
    display: block;
}

/* =========================================================
   TABLE
   ========================================================= */

.table-responsive {
    border-radius: 18px;
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--mc-black);
    color: #ffffff;
    border: 0;
    padding: 14px;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.table thead th:first-child {
    border-top-left-radius: 14px;
}

.table thead th:last-child {
    border-top-right-radius: 14px;
}

.table tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.14s ease;
}

.table-hover tbody tr:hover {
    background: var(--mc-primary-soft);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   DATATABLES
   ========================================================= */

.dataTables_wrapper,
.dt-container {
    color: var(--mc-text);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 14px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dt-container .dt-input {
    border-radius: 14px;
    border: 1px solid rgba(17, 17, 17, 0.10);
    padding: 8px 12px;
    background: #ffffff;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dt-container .dt-input:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 0.22rem rgba(242, 197, 0, 0.18);
}

.dataTables_wrapper .dataTables_info,
.dt-container .dt-info {
    color: var(--mc-muted);
    padding-top: 14px;
}

.dataTables_wrapper .dataTables_paginate,
.dt-container .dt-paging {
    padding-top: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 12px !important;
    padding: 6px 12px !important;
    margin: 0 2px !important;
    border: 1px solid transparent !important;
    color: var(--mc-black) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--mc-black) !important;
    border-color: var(--mc-black) !important;
    color: #ffffff !important;
}

.dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dt-buttons .btn,
.dt-button {
    border-radius: 14px !important;
    font-weight: 800 !important;
}

/* =========================================================
   MODAL
   ========================================================= */

.modal-content {
    border: 0;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--mc-shadow-lg);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--mc-border);
}

.modal-title {
    color: var(--mc-black);
    font-size: 19px;
    font-weight: 950;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 18px 24px;
    background: #faf7f1;
    border-top: 1px solid var(--mc-border);
}

.btn-close:focus {
    box-shadow: 0 0 0 0.22rem rgba(242, 197, 0, 0.18);
}

/* =========================================================
   BADGE / ALERT / SWEETALERT
   ========================================================= */

.badge {
    border-radius: 999px;
    font-weight: 850;
    padding: 7px 10px;
}

.badge.text-bg-primary,
.text-bg-primary {
    background-color: var(--mc-primary) !important;
    color: var(--mc-black) !important;
}

.badge.text-bg-secondary,
.text-bg-secondary {
    background-color: var(--mc-secondary) !important;
    color: var(--mc-black) !important;
}

.alert {
    border-radius: 18px;
    border: 1px solid var(--mc-border);
}

.alert-secondary {
    background: var(--mc-soft);
    color: var(--mc-black);
}

.swal2-popup {
    border-radius: 24px !important;
    font-family: "Sarabun", "Tahoma", Arial, sans-serif !important;
    box-shadow: var(--mc-shadow-lg) !important;
}

.swal2-title {
    color: var(--mc-black) !important;
    font-weight: 900 !important;
}

.swal2-html-container {
    color: var(--mc-text) !important;
}

.swal2-confirm {
    background-color: var(--mc-black) !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    font-weight: 850 !important;
}

.swal2-cancel {
    border-radius: 14px !important;
    font-weight: 850 !important;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */

body.login-page {
    min-height: 100vh;
    background: #ffffff;
}

.login-page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-shell {
    width: 100%;
    max-width: 1060px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: #ffffff;
    border: 1px solid var(--mc-border);
    border-radius: 28px;
    box-shadow: var(--mc-shadow-lg);
    overflow: hidden;
}

.login-hero {
    position: relative;
    padding: 54px;
    background: var(--mc-soft);
    color: var(--mc-black);
    overflow: hidden;
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.login-hero::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    bottom: -90px;
    border-radius: 50%;
    background: rgba(242, 197, 0, 0.34);
}

.login-hero::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    left: -50px;
    top: -50px;
    border-radius: 50%;
    background: rgba(216, 208, 196, 0.42);
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 76px;
}

.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mc-shadow-sm);
    overflow: hidden;
    padding: 7px;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.login-brand-title {
    font-size: 20px;
    font-weight: 950;
    line-height: 1.2;
    margin: 0;
}

.login-brand-subtitle {
    font-size: 14px;
    color: var(--mc-muted);
    margin: 4px 0 0;
}

.login-hero-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.login-hero-content h1 {
    font-size: 38px;
    line-height: 1.25;
    font-weight: 950;
    margin: 0 0 18px;
    letter-spacing: -0.6px;
}

.login-hero-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #4b5563;
    margin: 0;
}

.login-card-wrap {
    padding: 54px 48px;
    background: #ffffff;
    display: flex;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.login-card-header {
    margin-bottom: 28px;
}

.login-card-header .badge {
    margin-bottom: 14px;
}

.login-card-header h2 {
    font-size: 28px;
    font-weight: 950;
    margin: 0 0 8px;
    color: var(--mc-black);
    letter-spacing: -0.5px;
}

.login-card-header p {
    margin: 0;
    color: var(--mc-muted);
    font-size: 15px;
}

.password-wrap {
    position: relative;
}

.password-wrap .form-control {
    padding-right: 58px;
}

.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--mc-muted);
    font-size: 13px;
    padding: 8px;
    cursor: pointer;
}

.btn-toggle-password:hover {
    color: var(--mc-black);
}

.btn-login {
    min-height: 48px;
    border-radius: 14px;
    font-weight: 950;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #9ca3af;
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mc-border);
}

.login-note {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--mc-soft);
    border: 1px solid var(--mc-border);
    color: var(--mc-muted);
    font-size: 13px;
    line-height: 1.6;
}

.login-footer {
    text-align: center;
    padding: 16px;
    color: var(--mc-muted);
    font-size: 13px;
    background: transparent;
    border-top: 0;
}

.login-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(5px);
}

.login-loading.active {
    display: flex;
}

.login-spinner {
    color: var(--mc-primary);
}

.login-loading-text {
    color: var(--mc-black);
    font-weight: 800;
}

/* =========================================================
   UTILITY
   ========================================================= */

.text-break {
    word-break: break-word;
}

.rounded-mc {
    border-radius: var(--mc-radius-xl) !important;
}

.shadow-mc {
    box-shadow: var(--mc-shadow-md) !important;
}

.border-mc {
    border: 1px solid var(--mc-border) !important;
}

.bg-mc-primary {
    background-color: var(--mc-primary) !important;
    color: var(--mc-black) !important;
}

.bg-mc-soft {
    background-color: var(--mc-soft) !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {
    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-navbar .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-wrapper {
        display: block;
    }

    .app-sidebar,
    .sidebar {
        width: 100%;
        flex: none;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--mc-border);
    }

    .admin-main {
        padding: 18px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-navbar-user {
        margin-top: 10px;
        justify-content: flex-start;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .login-hero {
        padding: 34px;
        min-height: auto;
    }

    .login-brand {
        margin-bottom: 30px;
    }

    .login-hero-content h1 {
        font-size: 28px;
    }

    .login-card-wrap {
        padding: 34px 26px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    .admin-main {
        padding: 14px;
    }

    .page-header {
        padding: 18px;
        border-radius: 18px;
    }

    .page-title {
        font-size: 22px;
    }

    .app-hero {
        padding: 24px;
    }

    .app-hero-title {
        font-size: 26px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .stat-card,
    .quick-card {
        border-radius: 18px;
    }

    .card-body {
        padding: 16px;
    }

    .modal-body {
        padding: 18px;
    }

    .modal-header,
    .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .table thead th,
    .table tbody td {
        padding: 11px;
    }

    .app-navbar-title {
        font-size: 15px;
    }

    .app-navbar-logo {
        width: 38px;
        height: 38px;
    }

    .app-footer {
        padding: 14px;
        text-align: center;
    }

    .app-footer-inner {
        justify-content: center;
    }

    .login-main {
        padding: 18px 12px;
        align-items: stretch;
    }

    .login-shell {
        border-radius: 22px;
    }

    .login-hero {
        padding: 28px 22px;
    }

    .login-logo {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .login-brand-title {
        font-size: 18px;
    }

    .login-hero-content h1 {
        font-size: 24px;
    }

    .login-hero-content p {
        font-size: 14px;
    }

    .login-card-wrap {
        padding: 28px 20px;
    }

    .login-card-header h2 {
        font-size: 24px;
    }

    .btn-sso-mednu {
        min-width: 180px;
        height: 42px;
        line-height: 42px;
    }
}

/* =========================================================
   PERSONNEL PAGE / FILTER TOOLBAR
   Moved from admin/personnel.php inline <style>
   ========================================================= */

.personnel-page-header {
    align-items: flex-start;
}

.page-actions,
.personnel-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-page-action {
    min-height: 42px;
    border-radius: 14px;
    padding-left: 18px;
    padding-right: 18px;
    font-weight: 900;
}

.filter-card {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-xl);
    background: #ffffff;
    box-shadow: var(--mc-shadow-sm);
    overflow: visible;
}

.filter-card .card-body {
    padding: 16px 18px;
}

.filter-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-item {
    width: min(100%, 420px);
}

.filter-item .form-label {
    font-weight: 900;
    color: var(--mc-black);
    margin-bottom: 7px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-actions .btn {
    min-height: 42px;
    border-radius: 14px;
    font-weight: 900;
    padding-left: 18px;
    padding-right: 18px;
}

#personnelTable th,
#personnelTable td {
    white-space: nowrap;
}

#personnelTable th {
    text-align: center;
    vertical-align: middle;
}

#personnelTable tbody tr.usage-warning-row>td {
    background: #fff1f2 !important;
}

#personnelTable tbody tr.usage-warning-row:hover>td {
    background: #ffe4e6 !important;
}

#personnelTable tbody tr.usage-expired-row>td {
    background: #fee2e2 !important;
}

#personnelTable tbody tr.usage-expired-row:hover>td {
    background: #fecaca !important;
}

.usage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    margin-left: 6px;
    white-space: nowrap;
}

.usage-badge-normal {
    background: #ecfdf5;
    color: #047857;
}

.usage-badge-warning {
    background: #fee2e2;
    color: #b91c1c;
}

.usage-badge-expired {
    background: #991b1b;
    color: #ffffff;
}

.personnel-action-group {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.personnel-action-group .btn {
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
}

.dt-buttons {
    margin-bottom: 12px;
}

.dt-buttons .btn,
.dt-button {
    border-radius: 12px !important;
    font-weight: 800 !important;
}

@media (max-width: 991.98px) {

    .page-actions,
    .personnel-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-actions .btn,
    .personnel-page-actions .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 767.98px) {
    .filter-toolbar {
        display: block;
    }

    .filter-item {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        margin-top: 12px;
    }

    .filter-actions .btn {
        flex: 1 1 auto;
    }
}

/* =========================================================
   PERSONNEL FILTER STATUS
   ========================================================= */

.filter-group {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-item-sm {
    width: min(100%, 300px);
}

@media (max-width: 767.98px) {
    .filter-group {
        display: block;
    }

    .filter-group .filter-item+.filter-item {
        margin-top: 12px;
    }

    .filter-item-sm {
        width: 100%;
    }
}

/* =========================================================
   PERSONNEL SUMMARY
   ========================================================= */

.personnel-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.personnel-summary-card {
    padding: 16px 18px;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius-xl);
    background: #ffffff;
    box-shadow: var(--mc-shadow-sm);
}

.personnel-summary-card .summary-label {
    color: var(--mc-muted);
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 8px;
    white-space: nowrap;
}

.personnel-summary-card .summary-value {
    color: var(--mc-black);
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

@media (max-width: 1199.98px) {
    .personnel-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .personnel-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .personnel-summary-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-stat-card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dashboard-stat-card .card-body {
    padding: 22px;
}

.dashboard-stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-stat-value {
    color: #0f172a;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.dashboard-stat-note {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 10px;
}

.dashboard-chart-card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dashboard-chart-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
    padding: 18px 22px;
    font-weight: 900;
    color: #0f172a;
}

.dashboard-chart-card .card-body {
    padding: 22px;
}

.dashboard-empty {
    padding: 36px 16px;
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
}



/* =========================================================
   PERSONNEL COLUMN TOGGLE
   ========================================================= */

.personnel-column-menu {
    min-width: 340px;
    max-height: 520px;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-md);
}

.personnel-column-list {
    display: grid;
    gap: 6px;
}

.personnel-column-list .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 9px;
    border-radius: 10px;
    cursor: pointer;
}

.personnel-column-list .form-check:hover {
    background: var(--mc-primary-soft);
}

.personnel-column-list .form-check-input {
    margin: 0;
    cursor: pointer;
}

.personnel-column-list .form-check-input:disabled {
    cursor: not-allowed;
}

.personnel-column-list .form-check-label {
    font-size: 13px;
    font-weight: 750;
    color: var(--mc-text);
    cursor: pointer;
}

.personnel-column-list .form-check-input:disabled + .form-check-label {
    color: var(--mc-muted);
    cursor: not-allowed;
}

.personnel-status-badge,
.personnel-position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 850;
    white-space: nowrap;
}

.personnel-position-personnel {
    background: #eef2ff;
    color: #3730a3;
}

.personnel-position-doctor {
    background: #ecfeff;
    color: #0e7490;
}

.personnel-position-special-instructor {
    background: #fef3c7;
    color: #92400e;
}

.personnel-status-working {
    background: #ecfdf5;
    color: #047857;
}

.personnel-status-resigned {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================================
   evidence.css
   admin/evidence.php only
   ========================================================= */

#positionEvidenceTable th,
#positionEvidenceTable td {
    white-space: nowrap;
    vertical-align: middle;
}

#positionEvidenceTable th {
    text-align: center;
}

.position-evidence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 850;
    white-space: nowrap;
}

.position-evidence-doctor {
    background: #ecfeff;
    color: #0e7490;
}

.position-evidence-special-instructor {
    background: #fef3c7;
    color: #92400e;
}
