/* ============================================================
   Konnekt Smartlife — Microsoft Fluent-Inspired Global Theme
   ============================================================
   Include this file once in your layout. All auth pages and
   app pages share these variables and utility classes.
   ============================================================ */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
    --ms-blue: #0078d4;
    --ms-blue-hover: #106ebe;
    --ms-blue-active: #005a9e;
    --ms-dark: #1b1b1b;
    --ms-gray-text: #616161;
    --ms-gray-secondary: #767676;
    --ms-border: #d1d1d1;
    --ms-border-focus: #0078d4;
    --ms-bg: #f2f2f2;
    --ms-card-bg: #ffffff;
    --ms-error: #d13438;
    --ms-error-bg: #fde7e9;
    --ms-success: #107c10;
    --ms-success-bg: #dff6dd;
    --ms-info-bg: #e6f2fb;
    --ms-info-text: #004578;
    --ms-warning: #ca5010;
    --ms-warning-bg: #fff4ce;
    --ms-font:
        "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto",
        "Helvetica Neue", sans-serif;
    --ms-radius: 0;
    --ms-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    --ms-transition: 0.1s ease;
}

/* ---- Base / Body ---- */
body.ms-theme {
    font-family: var(--ms-font) !important;
    background: var(--ms-bg) !important;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Auth Wrapper ---- */
.ms-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ms-bg);
    padding: 20px;
}

/* ---- Card ---- */
.ms-card {
    background: var(--ms-card-bg);
    box-shadow: var(--ms-shadow);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    animation: msFadeIn 0.3s ease-out;
}
.ms-card-wide {
    max-width: 820px;
}

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

/* ---- Logo placeholder ---- */
.ms-logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ms-logo-placeholder {
    width: 36px;
    height: 36px;
    background: var(--ms-bg);
    border: 1px solid var(--ms-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ms-logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ms-brand-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ms-dark);
    letter-spacing: -0.2px;
}

/* ---- Headings ---- */
.ms-card h1,
.ms-heading {
    font-size: 24px;
    font-weight: 600;
    color: var(--ms-dark);
    margin: 0 0 4px 0;
    line-height: 1.3;
}
.ms-subtitle {
    font-size: 13px;
    color: var(--ms-gray-text);
    margin-bottom: 24px;
}

/* ---- Form Inputs ---- */
.ms-input-group {
    margin-bottom: 16px;
}
.ms-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-dark);
    margin-bottom: 5px;
}
.ms-input {
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: var(--ms-font);
    color: var(--ms-dark);
    background: var(--ms-card-bg);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    outline: none;
    transition: border-color var(--ms-transition);
    box-sizing: border-box;
}
.ms-input:focus {
    border-color: var(--ms-border-focus);
    border-bottom: 2px solid var(--ms-border-focus);
}
.ms-input::placeholder {
    color: var(--ms-gray-secondary);
}
.ms-input[readonly] {
    background: #f5f5f5;
    color: var(--ms-gray-text);
}

/* ---- Password wrapper ---- */
.ms-password-wrapper {
    position: relative;
}
.ms-password-wrapper .ms-input {
    padding-right: 40px;
}
.ms-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ms-gray-text);
    font-size: 13px;
    padding: 4px 6px;
    font-family: var(--ms-font);
    line-height: 0;
}
.ms-password-toggle:hover {
    color: var(--ms-dark);
}

/* ---- Checkbox + Options Row ---- */
.ms-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
}
.ms-checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ms-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ms-blue);
    cursor: pointer;
}
.ms-checkbox-group label {
    color: var(--ms-dark);
    cursor: pointer;
    font-size: 13px;
    margin: 0;
}

/* ---- Links ---- */
.ms-link {
    color: var(--ms-blue);
    text-decoration: none;
    font-size: 13px;
}
.ms-link:hover {
    text-decoration: underline;
    color: var(--ms-blue-hover);
}

/* ---- Buttons ---- */
.ms-btn-primary {
    display: block;
    width: 100%;
    height: 36px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ms-font);
    color: #fff;
    background: var(--ms-blue);
    border: none;
    border-radius: var(--ms-radius);
    cursor: pointer;
    transition: background var(--ms-transition);
}
.ms-btn-primary:hover {
    background: var(--ms-blue-hover);
}
.ms-btn-primary:active {
    background: var(--ms-blue-active);
}
.ms-btn-primary:disabled {
    background: #c8c8c8;
    color: #fff;
    cursor: not-allowed;
}
.ms-btn-primary .spinner-border {
    width: 14px;
    height: 14px;
    border-width: 2px;
    vertical-align: middle;
}

.ms-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ms-font);
    color: var(--ms-dark);
    background: var(--ms-card-bg);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    cursor: pointer;
    transition: background var(--ms-transition);
    text-decoration: none;
}
.ms-btn-outline:hover {
    background: #f5f5f5;
    color: var(--ms-dark);
    text-decoration: none;
}

/* ---- Alerts ---- */
.ms-alert {
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ms-alert-danger {
    background: var(--ms-error-bg);
    border-color: var(--ms-error);
    color: var(--ms-error);
}
.ms-alert-success {
    background: var(--ms-success-bg);
    border-color: var(--ms-success);
    color: #0e6a0e;
}
.ms-alert-info {
    background: var(--ms-info-bg);
    border-color: var(--ms-blue);
    color: var(--ms-info-text);
}
.ms-alert-warning {
    background: var(--ms-warning-bg);
    border-color: var(--ms-warning);
    color: #8a3707;
}
.ms-alert .ms-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

/* ---- Divider ---- */
.ms-divider {
    border: none;
    border-top: 1px solid #e1e1e1;
    margin: 20px 0;
}

/* ---- Footer ---- */
.ms-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    color: var(--ms-gray-secondary);
}

/* ---- Back Link ---- */
.ms-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ms-blue);
    text-decoration: none;
    font-size: 13px;
    margin-top: 16px;
}
.ms-back-link:hover {
    text-decoration: underline;
    color: var(--ms-blue-hover);
}
.ms-back-link svg {
    width: 14px;
    height: 14px;
}

/* ---- Password Strength Bar ---- */
.ms-strength-wrapper {
    margin-bottom: 20px;
}
.ms-strength-bar-track {
    width: 100%;
    height: 4px;
    background: #e1e1e1;
    overflow: hidden;
    margin-top: 6px;
}
.ms-strength-bar-fill {
    height: 100%;
    width: 0;
    transition:
        width 0.3s,
        background 0.3s;
}
.ms-strength-bar-fill.weak {
    background: var(--ms-error);
}
.ms-strength-bar-fill.medium {
    background: var(--ms-warning);
}
.ms-strength-bar-fill.strong {
    background: var(--ms-success);
}

.ms-strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: var(--ms-gray-text);
}

/* ---- OTP Input Group ---- */
.ms-otp-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}
.ms-otp-input {
    width: 44px;
    height: 44px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--ms-font);
    color: var(--ms-dark);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    outline: none;
    background: var(--ms-card-bg);
    transition: border-color var(--ms-transition);
}
.ms-otp-input:focus {
    border-color: var(--ms-border-focus);
    border-bottom: 2px solid var(--ms-border-focus);
}

/* ---- 2FA Card Layout (Side-by-Side on Desktop) ---- */
.ms-2fa-grid {
    display: flex;
    gap: 0;
    width: 100%;
}
.ms-2fa-left,
.ms-2fa-right {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ms-2fa-left {
    border-right: 1px solid #e1e1e1;
}

@media (max-width: 767px) {
    .ms-2fa-grid {
        flex-direction: column;
    }
    .ms-2fa-left {
        border-right: none;
        border-bottom: 1px solid #e1e1e1;
    }
    .ms-card-wide {
        max-width: 440px;
    }
}

/* ---- QR Code ---- */
.ms-qr-wrapper {
    text-align: center;
    padding: 8px;
    background: var(--ms-card-bg);
    display: inline-block;
    border: 1px solid #e1e1e1;
}
.ms-qr-wrapper svg,
.ms-qr-wrapper img {
    max-width: 180px;
    height: auto;
}

/* ---- Info Box (instructions, tips, etc.) ---- */
.ms-info-box {
    background: #f5f5f5;
    border: 1px solid #e1e1e1;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--ms-dark);
    margin-top: 12px;
}
.ms-info-box .ms-info-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ms-success);
    font-size: 12px;
}
.ms-info-box ul {
    margin: 0 0 6px 0;
    padding-left: 18px;
}
.ms-info-box ul li {
    margin-bottom: 3px;
}
.ms-info-box .ms-info-note {
    color: var(--ms-gray-text);
    font-size: 11px;
}

/* ---- Utility: Text Center ---- */
.ms-text-center {
    text-align: center;
}
.ms-text-muted {
    color: var(--ms-gray-text);
}
.ms-text-sm {
    font-size: 13px;
}
.ms-mt-8 {
    margin-top: 8px;
}
.ms-mt-16 {
    margin-top: 16px;
}
.ms-mt-24 {
    margin-top: 24px;
}
.ms-mb-8 {
    margin-bottom: 8px;
}
.ms-mb-16 {
    margin-bottom: 16px;
}
.ms-mb-24 {
    margin-bottom: 24px;
}

/* ---- Secret Key Monospace ---- */
.ms-mono {
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================================
   GLOBAL APPLICATION OVERRIDES — Microsoft Fluent Theme
   Applied via body.ms-theme to override Bootstrap & framework
   ============================================================ */

/* ---- Global Border Radius Reset ---- */
body.ms-theme *,
body.ms-theme *::before,
body.ms-theme *::after {
    border-radius: 0 !important;
}
/* Preserve circular shapes for spinners, loaders and avatars */
body.ms-theme .spinner-border,
body.ms-theme .spinner-grow,
body.ms-theme .spinner-border::after,
body.ms-theme .spinner-grow::after,
body.ms-theme .loader-p,
body.ms-theme .loader-p::before,
body.ms-theme .loader-p::after,
body.ms-theme .ms-avatar-circle,
body.ms-theme .ms-detail-avatar,
body.ms-theme .loading-spinner,
body.ms-theme .chart-spinner {
    border-radius: 50% !important;
}

/* ---- Typography ---- */
body.ms-theme h1,
body.ms-theme h2,
body.ms-theme h3,
body.ms-theme h4,
body.ms-theme h5,
body.ms-theme h6 {
    font-family: var(--ms-font) !important;
    color: var(--ms-dark) !important;
}

/* ---- Links ---- */
body.ms-theme a {
    color: var(--ms-blue);
}
body.ms-theme a:hover {
    color: var(--ms-blue-hover);
}

/* ====================
   FORM CONTROLS
   ==================== */
body.ms-theme .form-control,
body.ms-theme .form-select,
body.ms-theme input[type="text"],
body.ms-theme input[type="email"],
body.ms-theme input[type="password"],
body.ms-theme input[type="number"],
body.ms-theme input[type="tel"],
body.ms-theme input[type="url"],
body.ms-theme input[type="search"],
body.ms-theme input[type="date"],
body.ms-theme input[type="datetime-local"],
body.ms-theme input[type="month"],
body.ms-theme input[type="week"],
body.ms-theme input[type="time"],
body.ms-theme select,
body.ms-theme textarea {
    font-family: var(--ms-font) !important;
    font-size: 14px !important;
    color: var(--ms-dark) !important;
    background-color: var(--ms-card-bg) !important;
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: border-color var(--ms-transition) !important;
    height: 36px !important;
    padding: 6px 12px !important;
}
body.ms-theme textarea {
    height: auto !important;
    min-height: 80px !important;
}
body.ms-theme .form-control:focus,
body.ms-theme .form-select:focus,
body.ms-theme input:focus,
body.ms-theme select:focus,
body.ms-theme textarea:focus {
    border-color: var(--ms-border-focus) !important;
    border-bottom: 2px solid var(--ms-border-focus) !important;
    box-shadow: none !important;
    outline: none !important;
}
body.ms-theme .form-control::placeholder,
body.ms-theme input::placeholder,
body.ms-theme textarea::placeholder {
    color: var(--ms-gray-secondary) !important;
}
body.ms-theme .form-control:disabled,
body.ms-theme .form-control[readonly],
body.ms-theme input:disabled,
body.ms-theme input[readonly] {
    background-color: #f5f5f5 !important;
    color: var(--ms-gray-text) !important;
    opacity: 1 !important;
}

/* ---- Form Labels ---- */
body.ms-theme label,
body.ms-theme .form-label,
body.ms-theme .col-form-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--ms-dark) !important;
    margin-bottom: 5px !important;
}

/* ---- Input Groups ---- */
body.ms-theme .input-group-text {
    background-color: #f5f5f5 !important;
    border: 1px solid var(--ms-border) !important;
    color: var(--ms-gray-text) !important;
    font-size: 14px !important;
}

/* ====================
   BUTTONS
   ==================== */
body.ms-theme .btn {
    font-family: var(--ms-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    padding: 6px 20px !important;
    height: 36px !important;
    line-height: 1.5 !important;
    transition:
        background var(--ms-transition),
        border-color var(--ms-transition) !important;
    box-shadow: none !important;
}

body.ms-theme .btn-primary {
    background-color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .btn-primary:hover,
body.ms-theme .btn-primary:focus {
    background-color: var(--ms-blue-hover) !important;
    border-color: var(--ms-blue-hover) !important;
    box-shadow: none !important;
}
body.ms-theme .btn-primary:active {
    background-color: var(--ms-blue-active) !important;
    border-color: var(--ms-blue-active) !important;
}

body.ms-theme .btn-secondary {
    background-color: #f3f2f1 !important;
    border-color: var(--ms-border) !important;
    color: var(--ms-dark) !important;
}
body.ms-theme .btn-secondary:hover,
body.ms-theme .btn-secondary:focus {
    background-color: #e1dfdd !important;
    border-color: #8a8886 !important;
}

body.ms-theme .btn-success {
    background-color: var(--ms-success) !important;
    border-color: var(--ms-success) !important;
    color: #fff !important;
}
body.ms-theme .btn-success:hover,
body.ms-theme .btn-success:focus {
    background-color: #0b6a0b !important;
    border-color: #0b6a0b !important;
}

body.ms-theme .btn-danger {
    background-color: var(--ms-error) !important;
    border-color: var(--ms-error) !important;
    color: #fff !important;
}
body.ms-theme .btn-danger:hover,
body.ms-theme .btn-danger:focus {
    background-color: #a4262c !important;
    border-color: #a4262c !important;
}

body.ms-theme .btn-warning {
    background-color: var(--ms-warning) !important;
    border-color: var(--ms-warning) !important;
    color: #fff !important;
}
body.ms-theme .btn-warning:hover,
body.ms-theme .btn-warning:focus {
    background-color: #a33d0b !important;
    border-color: #a33d0b !important;
}

body.ms-theme .btn-info {
    background-color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .btn-info:hover,
body.ms-theme .btn-info:focus {
    background-color: var(--ms-blue-hover) !important;
    border-color: var(--ms-blue-hover) !important;
}

body.ms-theme .btn-light {
    background-color: #faf9f8 !important;
    border-color: var(--ms-border) !important;
    color: var(--ms-dark) !important;
}

body.ms-theme .btn-dark {
    background-color: var(--ms-dark) !important;
    border-color: var(--ms-dark) !important;
    color: #fff !important;
}

/* Outline button variants */
body.ms-theme .btn-outline-primary {
    color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    background: transparent !important;
}
body.ms-theme .btn-outline-primary:hover {
    background-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .btn-outline-secondary {
    color: var(--ms-dark) !important;
    border-color: var(--ms-border) !important;
    background: transparent !important;
}
body.ms-theme .btn-outline-secondary:hover {
    background-color: #f3f2f1 !important;
    color: var(--ms-dark) !important;
}
body.ms-theme .btn-outline-danger {
    color: var(--ms-error) !important;
    border-color: var(--ms-error) !important;
    background: transparent !important;
}
body.ms-theme .btn-outline-danger:hover {
    background-color: var(--ms-error) !important;
    color: #fff !important;
}
body.ms-theme .btn-outline-success {
    color: var(--ms-success) !important;
    border-color: var(--ms-success) !important;
    background: transparent !important;
}
body.ms-theme .btn-outline-success:hover {
    background-color: var(--ms-success) !important;
    color: #fff !important;
}

/* Small and Large Buttons */
body.ms-theme .btn-sm {
    height: 28px !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
}
body.ms-theme .btn-lg {
    height: 44px !important;
    font-size: 16px !important;
    padding: 8px 28px !important;
}

body.ms-theme .btn:disabled,
body.ms-theme .btn.disabled {
    background-color: #c8c8c8 !important;
    border-color: #c8c8c8 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* ====================
   CARDS
   ==================== */
body.ms-theme .card {
    background: #fff !important;
    border: 1px solid #edebe9 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.ms-theme .card .card-header,
body.ms-theme .card-header {
    background-color: #fff !important;
    border-bottom: 1px solid #edebe9 !important;
    border-left: none !important;
    font-weight: 600 !important;
    color: var(--ms-dark) !important;
    padding: 12px 16px !important;
    box-shadow: none !important;
}
body.ms-theme .card-body {
    background: #fff !important;
    padding: 16px !important;
}
body.ms-theme .card-footer {
    background-color: #fff !important;
    border-top: 1px solid #edebe9 !important;
    padding: 12px 16px !important;
}
body.ms-theme .card-title {
    font-weight: 600 !important;
    color: var(--ms-dark) !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
}

/* ====================
   TABLES
   ==================== */
body.ms-theme .table {
    font-family: var(--ms-font) !important;
    font-size: 13px !important;
    color: var(--ms-dark) !important;
    border-collapse: collapse !important;
}
body.ms-theme .table thead th {
    background-color: #faf9f8 !important;
    border-bottom: 2px solid var(--ms-blue) !important;
    color: var(--ms-dark) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    text-transform: none !important;
    white-space: nowrap !important;
}
body.ms-theme .table tbody td {
    border-bottom: 1px solid #edebe9 !important;
    padding: 7px 12px !important;
    vertical-align: middle !important;
}
body.ms-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #faf9f8 !important;
}
body.ms-theme .table-hover > tbody > tr:hover > * {
    background-color: #f3f2f1 !important;
}
body.ms-theme .table-bordered {
    border: 1px solid #edebe9 !important;
}
body.ms-theme .table-bordered th,
body.ms-theme .table-bordered td {
    border: 1px solid #edebe9 !important;
}

/* ====================
   DATATABLES OVERRIDES
   ==================== */
body.ms-theme table.dataTable thead th {
    background-color: #faf9f8 !important;
    border-bottom: 2px solid var(--ms-blue) !important;
    color: var(--ms-dark) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
}
body.ms-theme table.dataTable tbody td {
    padding: 7px 12px !important;
    font-size: 13px !important;
    border-bottom: 1px solid #edebe9 !important;
}
body.ms-theme table.dataTable tbody tr:hover {
    background-color: #f3f2f1 !important;
}
body.ms-theme table.dataTable tbody tr.selected {
    background-color: var(--ms-info-bg) !important;
}
body.ms-theme .dataTables_wrapper .dataTables_length,
body.ms-theme .dataTables_wrapper .dataTables_filter,
body.ms-theme .dataTables_wrapper .dataTables_info,
body.ms-theme .dataTables_wrapper .dataTables_paginate {
    font-size: 12px !important;
    font-family: var(--ms-font) !important;
    color: var(--ms-gray-text) !important;
}
body.ms-theme .dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    height: 32px !important;
}
body.ms-theme .dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--ms-border-focus) !important;
    outline: none !important;
    box-shadow: none !important;
}
body.ms-theme .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    height: 32px !important;
}
body.ms-theme .dataTables_paginate .paginate_button {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    background: var(--ms-card-bg) !important;
    color: var(--ms-dark) !important;
    padding: 4px 10px !important;
    margin: 0 1px !important;
}
body.ms-theme .dataTables_paginate .paginate_button:hover {
    background: #f3f2f1 !important;
    border-color: var(--ms-blue) !important;
    color: var(--ms-blue) !important;
}
body.ms-theme .dataTables_paginate .paginate_button.current {
    background: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .dataTables_paginate .paginate_button.disabled {
    color: #c8c8c8 !important;
    border-color: #edebe9 !important;
    cursor: not-allowed !important;
}

/* ====================
   PAGINATION (Bootstrap)
   ==================== */
body.ms-theme .pagination .page-link {
    color: var(--ms-blue) !important;
    background-color: var(--ms-card-bg) !important;
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
}
body.ms-theme .pagination .page-link:hover {
    background-color: #f3f2f1 !important;
    color: var(--ms-blue-hover) !important;
}
body.ms-theme .pagination .page-item.active .page-link {
    background-color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .pagination .page-item.disabled .page-link {
    color: #c8c8c8 !important;
    background-color: #faf9f8 !important;
}

/* ====================
   BADGES
   ==================== */
body.ms-theme .badge {
    font-family: var(--ms-font) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 0 !important;
}
body.ms-theme .badge.bg-primary,
body.ms-theme .badge.badge-primary {
    background-color: var(--ms-blue) !important;
}
body.ms-theme .badge.bg-success,
body.ms-theme .badge.badge-success {
    background-color: var(--ms-success) !important;
}
body.ms-theme .badge.bg-danger,
body.ms-theme .badge.badge-danger {
    background-color: var(--ms-error) !important;
}
body.ms-theme .badge.bg-warning,
body.ms-theme .badge.badge-warning {
    background-color: var(--ms-warning) !important;
    color: #fff !important;
}
body.ms-theme .badge.bg-info,
body.ms-theme .badge.badge-info {
    background-color: var(--ms-blue) !important;
}
body.ms-theme .badge.bg-secondary,
body.ms-theme .badge.badge-secondary {
    background-color: #605e5c !important;
}

/* ====================
   MODALS
   ==================== */
body.ms-theme .modal-content {
    border: none !important;
    border-radius: 0 !important;
    box-shadow:
        0 25.6px 57.6px rgba(0, 0, 0, 0.22),
        0 4.8px 14.4px rgba(0, 0, 0, 0.18) !important;
}
body.ms-theme .modal-header {
    border-bottom: 1px solid #edebe9 !important;
    padding: 16px 24px !important;
    background-color: var(--ms-card-bg) !important;
}
body.ms-theme .modal-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--ms-dark) !important;
}
body.ms-theme .modal-body {
    padding: 24px !important;
}
body.ms-theme .modal-footer {
    border-top: 1px solid #edebe9 !important;
    padding: 16px 24px !important;
    background-color: #faf9f8 !important;
}
body.ms-theme .btn-close {
    border-radius: 0 !important;
    opacity: 0.6 !important;
}
body.ms-theme .btn-close:hover {
    opacity: 1 !important;
}

/* ====================
   DROPDOWN MENUS
   ==================== */
body.ms-theme .dropdown-menu {
    border: 1px solid #edebe9 !important;
    border-radius: 0 !important;
    box-shadow:
        0 6.4px 14.4px rgba(0, 0, 0, 0.13),
        0 1.2px 3.6px rgba(0, 0, 0, 0.1) !important;
    padding: 4px 0 !important;
}
body.ms-theme .dropdown-item {
    font-size: 14px !important;
    padding: 8px 16px !important;
    color: var(--ms-dark) !important;
}
body.ms-theme .dropdown-item:hover,
body.ms-theme .dropdown-item:focus {
    background-color: #f3f2f1 !important;
    color: var(--ms-dark) !important;
}
body.ms-theme .dropdown-item.active,
body.ms-theme .dropdown-item:active {
    background-color: var(--ms-info-bg) !important;
    color: var(--ms-blue) !important;
}
body.ms-theme .dropdown-divider {
    border-top: 1px solid #edebe9 !important;
}

/* ====================
   NAVS & TABS
   ==================== */
body.ms-theme .nav-tabs {
    border-bottom: 1px solid #edebe9 !important;
}
body.ms-theme .nav-tabs .nav-link {
    color: var(--ms-gray-text) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition:
        color var(--ms-transition),
        border-color var(--ms-transition) !important;
}
body.ms-theme .nav-tabs .nav-link:hover {
    color: var(--ms-dark) !important;
    border-bottom-color: #c8c6c4 !important;
}
body.ms-theme .nav-tabs .nav-link.active {
    color: var(--ms-blue) !important;
    border-bottom-color: var(--ms-blue) !important;
    background: transparent !important;
}
body.ms-theme .nav-pills .nav-link {
    color: var(--ms-dark) !important;
    border-radius: 0 !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
}
body.ms-theme .nav-pills .nav-link.active {
    background-color: var(--ms-blue) !important;
    color: #fff !important;
}

/* ====================
   ALERTS (Bootstrap)
   ==================== */
body.ms-theme .alert {
    border-radius: 0 !important;
    border: none !important;
    border-left: 4px solid !important;
    font-size: 13px !important;
    font-family: var(--ms-font) !important;
}
body.ms-theme .alert-primary {
    background-color: var(--ms-info-bg) !important;
    border-left-color: var(--ms-blue) !important;
    color: var(--ms-info-text) !important;
}
body.ms-theme .alert-success {
    background-color: var(--ms-success-bg) !important;
    border-left-color: var(--ms-success) !important;
    color: #0e6a0e !important;
}
body.ms-theme .alert-danger {
    background-color: var(--ms-error-bg) !important;
    border-left-color: var(--ms-error) !important;
    color: var(--ms-error) !important;
}
body.ms-theme .alert-warning {
    background-color: var(--ms-warning-bg) !important;
    border-left-color: var(--ms-warning) !important;
    color: #8a3707 !important;
}
body.ms-theme .alert-info {
    background-color: var(--ms-info-bg) !important;
    border-left-color: var(--ms-blue) !important;
    color: var(--ms-info-text) !important;
}

/* ====================
   BREADCRUMBS
   ==================== */
body.ms-theme .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    font-size: 13px !important;
}
body.ms-theme .breadcrumb-item a {
    color: var(--ms-blue) !important;
    text-decoration: none !important;
}
body.ms-theme .breadcrumb-item.active {
    color: var(--ms-gray-text) !important;
}

/* ====================
   PROGRESS BARS
   ==================== */
body.ms-theme .progress {
    border-radius: 0 !important;
    height: 4px !important;
    background-color: #edebe9 !important;
}
body.ms-theme .progress-bar {
    background-color: var(--ms-blue) !important;
    border-radius: 0 !important;
}

/* ====================
   LIST GROUPS
   ==================== */
body.ms-theme .list-group-item {
    border: 1px solid #edebe9 !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    color: var(--ms-dark) !important;
    font-size: 14px !important;
}
body.ms-theme .list-group-item.active {
    background-color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme .list-group-item:hover {
    background-color: #f3f2f1 !important;
}

/* ====================
   TOOLTIPS & POPOVERS
   ==================== */
body.ms-theme .tooltip-inner {
    background-color: var(--ms-dark) !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-family: var(--ms-font) !important;
    padding: 6px 10px !important;
}
body.ms-theme .popover {
    border-radius: 0 !important;
    border: 1px solid #edebe9 !important;
    box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, 0.13) !important;
}

/* ====================
   SELECT2 OVERRIDES
   ==================== */
body.ms-theme .select2-container--default .select2-selection--single {
    height: 36px !important;
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    font-family: var(--ms-font) !important;
    font-size: 14px !important;
}
body.ms-theme
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    line-height: 34px !important;
    color: var(--ms-dark) !important;
    padding-left: 12px !important;
}
body.ms-theme
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 34px !important;
}
body.ms-theme .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    min-height: 36px !important;
    font-family: var(--ms-font) !important;
}
body.ms-theme
    .select2-container--default.select2-container--focus
    .select2-selection--single,
body.ms-theme
    .select2-container--default.select2-container--focus
    .select2-selection--multiple,
body.ms-theme
    .select2-container--default.select2-container--open
    .select2-selection--single,
body.ms-theme
    .select2-container--default.select2-container--open
    .select2-selection--multiple {
    border-color: var(--ms-border-focus) !important;
    border-bottom: 2px solid var(--ms-border-focus) !important;
    box-shadow: none !important;
}
body.ms-theme .select2-dropdown {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, 0.13) !important;
}
body.ms-theme
    .select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: var(--ms-blue) !important;
    color: #fff !important;
}
body.ms-theme
    .select2-container--default
    .select2-results__option[aria-selected="true"] {
    background-color: var(--ms-info-bg) !important;
    color: var(--ms-blue) !important;
}
body.ms-theme .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--ms-border) !important;
    border-radius: 0 !important;
    padding: 6px 10px !important;
    font-family: var(--ms-font) !important;
}
body.ms-theme
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: var(--ms-info-bg) !important;
    border: 1px solid var(--ms-blue) !important;
    border-radius: 0 !important;
    color: var(--ms-blue) !important;
    font-size: 12px !important;
    padding: 2px 8px !important;
}

/* ====================
   TOASTR OVERRIDES
   ==================== */
body.ms-theme .toast-success {
    background-color: var(--ms-success) !important;
}
body.ms-theme .toast-error {
    background-color: var(--ms-error) !important;
}
body.ms-theme .toast-info {
    background-color: var(--ms-blue) !important;
}
body.ms-theme .toast-warning {
    background-color: var(--ms-warning) !important;
}
body.ms-theme #toast-container > div {
    border-radius: 0 !important;
    box-shadow: 0 3.2px 7.2px rgba(0, 0, 0, 0.18) !important;
    font-family: var(--ms-font) !important;
    opacity: 1 !important;
}

/* ====================
   SIDEBAR — Light Sky Blue Theme
   High-specificity selectors to override framework CSS
   ==================== */
body.ms-theme .sidebar-wrapper {
    background-color: #ebf5ff !important;
}
body.ms-theme .sidebar-wrapper .logo-wrapper {
    background-color: #dceefb !important;
    border-bottom: 1px solid #bee3f8 !important;
    padding: 14px 16px !important;
}
body.ms-theme .sidebar-wrapper .logo-wrapper p,
body.ms-theme .sidebar-wrapper .logo-wrapper p a,
body.ms-theme .sidebar-wrapper .logo-wrapper p b a {
    color: #1e3a8a !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}
body.ms-theme .sidebar-wrapper .logo-wrapper p a:hover {
    color: #3182ce !important;
}
body.ms-theme .page-wrapper .sidebar-main-title h6,
body.ms-theme .sidebar-wrapper .sidebar-main-title h6 {
    color: #3182ce !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
    padding: 8px 0 4px 0 !important;
}

/* Sidebar link text — override framework's deep selectors */
body.ms-theme .sidebar-wrapper .sidebar-link,
body.ms-theme .sidebar-wrapper .sidebar-link span,
body.ms-theme
    .page-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    li
    .sidebar-link,
body.ms-theme
    .page-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    li
    .sidebar-link
    span,
body.ms-theme
    .page-wrapper.compact-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    .simplebar-wrapper
    .simplebar-mask
    .simplebar-content-wrapper
    .simplebar-content
    > li
    a
    span,
body.ms-theme
    .page-wrapper.compact-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    .simplebar-wrapper
    .simplebar-mask
    .simplebar-content-wrapper
    .simplebar-content
    > li
    .sidebar-link
    span,
body.ms-theme
    .page-wrapper.compact-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    .simplebar-wrapper
    .simplebar-mask
    .simplebar-content-wrapper
    .simplebar-content
    > li
    .sidebar-link.active
    span {
    color: #1e3a8a !important;
    font-weight: 500 !important;
}
body.ms-theme .sidebar-wrapper .sidebar-link {
    padding: 10px 16px !important;
    margin: 2px 8px !important;
    border-radius: 6px !important;
    border-left: 3px solid transparent !important;
    transition: all 0.2s ease !important;
}
body.ms-theme .sidebar-wrapper .sidebar-link:hover {
    background-color: #bee3f8 !important;
    border-left: 3px solid #3182ce !important;
}
body.ms-theme .sidebar-wrapper .sidebar-link .material-symbols-outlined {
    color: #1e3a8a !important;
}
/* Active sidebar item */
body.ms-theme .sidebar-wrapper .sidebar-link.active,
body.ms-theme .sidebar-wrapper li.active > .sidebar-link {
    background-color: #bee3f8 !important;
    border-left: 3px solid #3182ce !important;
}
body.ms-theme .sidebar-wrapper .sidebar-link.active span,
body.ms-theme .sidebar-wrapper li.active > .sidebar-link span {
    color: #1e3a8a !important;
    font-weight: 600 !important;
}
body.ms-theme .sidebar-wrapper .sidebar-link.active .material-symbols-outlined,
body.ms-theme
    .sidebar-wrapper
    li.active
    > .sidebar-link
    .material-symbols-outlined {
    color: #3182ce !important;
}

/* Submenu text — override framework's deep selectors */
body.ms-theme .sidebar-wrapper .sidebar-submenu li a,
body.ms-theme .sidebar-wrapper .sidebar-submenu li a span,
body.ms-theme
    .page-wrapper
    .page-body-wrapper
    .sidebar-main
    .sidebar-links
    li
    .sidebar-submenu
    li
    a,
body.ms-theme
    .page-wrapper
    .page-body-wrapper
    .sidebar-main
    .sidebar-links
    li
    .sidebar-submenu
    li
    a
    span,
body.ms-theme
    .page-wrapper
    .page-body-wrapper
    .sidebar-main
    .sidebar-links
    .sidebar-list
    ul.sidebar-submenu
    li
    a
    span,
body.ms-theme
    .page-wrapper.compact-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    .simplebar-wrapper
    .simplebar-mask
    .simplebar-content-wrapper
    .simplebar-content
    > li
    .sidebar-submenu
    li
    a,
body.ms-theme
    .page-wrapper.compact-wrapper
    .page-body-wrapper
    div.sidebar-wrapper
    .sidebar-main
    .sidebar-links
    .simplebar-wrapper
    .simplebar-mask
    .simplebar-content-wrapper
    .simplebar-content
    > li
    .sidebar-submenu
    li
    a
    span {
    color: #4a5568 !important;
    font-size: 13px !important;
}
body.ms-theme .sidebar-wrapper .sidebar-submenu {
    background-color: transparent !important;
    padding-left: 8px !important;
}
body.ms-theme .sidebar-wrapper .sidebar-submenu li {
    margin: 1px 0 !important;
}
body.ms-theme .sidebar-wrapper .sidebar-submenu li a {
    padding: 7px 12px 7px 20px !important;
    margin: 0 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}
body.ms-theme .sidebar-wrapper .sidebar-submenu li a:hover,
body.ms-theme .sidebar-wrapper .sidebar-submenu li a:hover span {
    color: #1e3a8a !important;
    background-color: #d6ecfd !important;
}
body.ms-theme .sidebar-wrapper .sidebar-submenu li a .material-symbols-outlined,
body.ms-theme
    .sidebar-wrapper
    .sidebar-submenu
    li
    a
    .material-symbols-outlined {
    color: #4a5568 !important;
}
body.ms-theme
    .sidebar-wrapper
    .sidebar-submenu
    li
    a:hover
    .material-symbols-outlined {
    color: #3182ce !important;
}
body.ms-theme .sidebar-wrapper .navbar-search input {
    background: #ffffff !important;
    border: 1px solid #bee3f8 !important;
    color: #1e3a8a !important;
    font-family: var(--ms-font) !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
}
body.ms-theme .sidebar-wrapper .navbar-search input::placeholder {
    color: #90b4d8 !important;
}
body.ms-theme .sidebar-wrapper .navbar-search input:focus {
    border-color: #3182ce !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.15) !important;
}
body.ms-theme .sidebar-wrapper .drawer-close-btn {
    background-color: #3182ce !important;
}
body.ms-theme .sidebar-wrapper .drawer-close-btn:hover {
    background-color: #2b6cb0 !important;
}
body.ms-theme .sidebar-wrapper .drawer-close-btn .material-symbols-outlined {
    color: #ffffff !important;
}

/* Sidebar scrollbar styling */
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar {
    width: 4px !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-track {
    background: #ebf5ff !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-thumb {
    background: #bee3f8 !important;
    border-radius: 4px !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #90cdf4 !important;
}

/* ====================
   HEADER BAR — Microsoft Theme
   ==================== */
body.ms-theme .page-header {
    background-color: var(--ms-card-bg) !important;
    border-bottom: 1px solid #edebe9 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}
body.ms-theme .nav-menus .material-symbols-outlined {
    color: var(--ms-blue) !important;
}
body.ms-theme .nav-menus .message .material-symbols-outlined {
    color: var(--ms-blue) !important;
}
body.ms-theme .profile-nav .profile-avatar {
    color: var(--ms-blue) !important;
}
body.ms-theme .profile-nav .user span:first-child {
    color: var(--ms-dark) !important;
}
body.ms-theme .profile-nav .user .material-symbols-outlined {
    color: var(--ms-blue) !important;
}
body.ms-theme .profile-dropdown li a .material-symbols-outlined {
    color: var(--ms-blue) !important;
}
body.ms-theme .profile-dropdown li a:hover {
    background-color: #f3f2f1 !important;
}

/* Hamburger icon */
body.ms-theme .mobile-hamburger .toggle-sidebar .material-symbols-outlined {
    color: var(--ms-blue) !important;
}
body.ms-theme .mobile-hamburger .toggle-sidebar:hover {
    background-color: rgba(0, 120, 212, 0.08) !important;
}

/* ====================
   FOOTER — Microsoft Theme
   ==================== */
body.ms-theme .footer {
    background-color: #faf9f8 !important;
    border-top: 1px solid #edebe9 !important;
}
body.ms-theme .footer-copyright p {
    color: var(--ms-gray-text) !important;
    font-family: var(--ms-font) !important;
}

/* ====================
   LOGO HOVER
   ==================== */
body.ms-theme .logo-wrapper p a:hover {
    color: #3182ce !important;
}

/* ====================
   PAGE BODY
   ==================== */
body.ms-theme .page-wrapper {
    background-color: var(--ms-bg) !important;
}
body.ms-theme .page-body {
    background-color: var(--ms-bg) !important;
}

/* ====================
   SCROLLBAR — Fluent Thin
   ==================== */
body.ms-theme ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.ms-theme ::-webkit-scrollbar-track {
    background: #f1f1f1;
}
body.ms-theme ::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 0 !important;
}
body.ms-theme ::-webkit-scrollbar-thumb:hover {
    background: #a6a6a6;
}

/* Sidebar scrollbar — thin Microsoft blue */
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar,
body.ms-theme .sidebar-wrapper .simplebar-scrollbar::before {
    width: 4px !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-track {
    background: transparent !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-thumb {
    background: #0078d4 !important;
    border-radius: 2px !important;
}
body.ms-theme .sidebar-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #106ebe !important;
}
/* SimpleBar (used by the framework sidebar) */
body.ms-theme .sidebar-wrapper .simplebar-scrollbar::before {
    background: #0078d4 !important;
    opacity: 0.6 !important;
    border-radius: 2px !important;
}
body.ms-theme .sidebar-wrapper .simplebar-scrollbar.simplebar-visible::before {
    opacity: 1 !important;
}
body.ms-theme .sidebar-wrapper .simplebar-track.simplebar-vertical {
    width: 4px !important;
}
body.ms-theme
    .sidebar-wrapper
    .simplebar-track.simplebar-vertical
    .simplebar-scrollbar {
    width: 4px !important;
}

/* ====================
   LOADER
   ==================== */
body.ms-theme .loader-wrapper .theme-loader .loader-p::before,
body.ms-theme .loader-wrapper .theme-loader .loader-p::after {
    border-color: var(--ms-blue) !important;
}

/* ====================
   ACCORDION
   ==================== */
body.ms-theme .accordion-item {
    border: 1px solid #edebe9 !important;
    border-radius: 0 !important;
}
body.ms-theme .accordion-button {
    border-radius: 0 !important;
    font-weight: 600 !important;
    color: var(--ms-dark) !important;
    background-color: #faf9f8 !important;
    font-family: var(--ms-font) !important;
    box-shadow: none !important;
}
body.ms-theme .accordion-button:not(.collapsed) {
    color: var(--ms-blue) !important;
    background-color: var(--ms-info-bg) !important;
}
body.ms-theme .accordion-button:focus {
    box-shadow: none !important;
    border-color: var(--ms-border-focus) !important;
}

/* ====================
   SPINNER
   ==================== */
body.ms-theme .spinner-border {
    color: var(--ms-blue) !important;
    border-radius: 50% !important;
    display: inline-block !important;
}
body.ms-theme .spinner-grow {
    color: var(--ms-blue) !important;
    border-radius: 50% !important;
    display: inline-block !important;
}
body.ms-theme .spinner-border-sm,
body.ms-theme .spinner-grow-sm {
    border-radius: 50% !important;
}

/* ====================
   FORM CHECK / SWITCH
   ==================== */
body.ms-theme .form-check-input:checked {
    background-color: var(--ms-blue) !important;
    border-color: var(--ms-blue) !important;
}
body.ms-theme .form-check-input:focus {
    box-shadow: none !important;
    border-color: var(--ms-blue) !important;
}
body.ms-theme .form-switch .form-check-input:checked {
    background-color: var(--ms-blue) !important;
}

/* ====================
   TEXT COLORS (utility override)
   ==================== */
body.ms-theme .text-primary {
    color: var(--ms-blue) !important;
}
body.ms-theme .text-success {
    color: var(--ms-success) !important;
}
body.ms-theme .text-danger {
    color: var(--ms-error) !important;
}
body.ms-theme .text-warning {
    color: var(--ms-warning) !important;
}
body.ms-theme .text-info {
    color: var(--ms-blue) !important;
}

/* ====================
   BG COLORS (utility override)
   ==================== */
body.ms-theme .bg-primary {
    background-color: var(--ms-blue) !important;
}
body.ms-theme .bg-success {
    background-color: var(--ms-success) !important;
}
body.ms-theme .bg-danger {
    background-color: var(--ms-error) !important;
}
body.ms-theme .bg-warning {
    background-color: var(--ms-warning) !important;
}
body.ms-theme .bg-info {
    background-color: var(--ms-blue) !important;
}

/* ====================
   BORDER COLOR (utility override)
   ==================== */
body.ms-theme .border-primary {
    border-color: var(--ms-blue) !important;
}

/* ====================
   FEATHER ICONS COLOR
   ==================== */
body.ms-theme .feather {
    color: var(--ms-blue) !important;
}

/* ====================
   AVATAR CIRCLE (initials)
   ==================== */
.ms-avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50% !important;
    background-color: var(--ms-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ms-font);
    line-height: 1;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ==========================================================
   CLIENT DETAIL PAGE — Microsoft Fluent-Inspired Layout
   ========================================================== */

/* ---- Hero Header ---- */
.ms-detail-hero {
    background: #fff;
    border: 1px solid var(--ms-border);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.ms-detail-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50% !important;
    background: var(--ms-blue);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    font-family: var(--ms-font);
    text-transform: uppercase;
    flex-shrink: 0;
}

.ms-detail-identity h4 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

/* ---- Status Pill (in hero) ---- */
.ms-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px !important;
    font-family: var(--ms-font);
}
.ms-status-pill.ms-status-loading {
    background: #f3f2f1;
    color: #a19f9d;
}

/* ---- Action Toolbar ---- */
.ms-detail-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
    border: 1px solid var(--ms-border);
    padding: 8px 16px;
    margin-bottom: 16px;
}

.ms-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--ms-font);
    color: var(--ms-blue);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.ms-detail-btn .material-symbols-outlined {
    font-size: 15px;
    color: var(--ms-blue);
    text-decoration: none;
}
.ms-detail-btn:not(.ms-detail-btn-back) > :not(.material-symbols-outlined) {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ms-detail-btn:hover {
    background: transparent;
    color: #004578;
    text-decoration: none;
}
.ms-detail-btn:hover > :not(.material-symbols-outlined) {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ms-detail-btn:active {
    background: transparent;
    color: #003060;
}

/* Separator between toolbar buttons */
.ms-detail-toolbar .ms-detail-btn + .ms-detail-btn {
    border-left: 1px solid #d2d0ce;
}

/* Danger variant (Archive) */
.ms-detail-btn.ms-detail-btn-danger {
    color: var(--ms-error);
    background: transparent;
    border: none;
    text-decoration: underline;
}
.ms-detail-btn.ms-detail-btn-danger .material-symbols-outlined {
    color: var(--ms-error);
}
.ms-detail-btn.ms-detail-btn-danger:hover {
    background: transparent;
    color: #a4262c;
}

/* Back button variant */
.ms-detail-btn.ms-detail-btn-back {
    background: transparent;
    border: 1px solid var(--ms-border);
    color: #605e5c;
    text-decoration: none;
}
.ms-detail-btn.ms-detail-btn-back:hover {
    background: #f3f2f1;
    color: #323130;
    text-decoration: none;
}
.ms-detail-btn.ms-detail-btn-back .material-symbols-outlined {
    color: #605e5c;
}

/* Toolbar divider */
.ms-toolbar-divider {
    width: 1px;
    height: 24px;
    background: #d2d0ce;
    margin: 0 6px;
}

/* Reset left border for button right after divider */
.ms-detail-toolbar .ms-toolbar-divider + .ms-detail-btn {
    border-left: none;
}

/* ---- Quick Stats Bar (unified single card) ---- */
.ms-stats-bar {
    background: #fff;
    border: 1px solid var(--ms-border);
    overflow: hidden;
}
.ms-stats-bar .row {
    margin: 0;
}
.ms-stats-bar-col {
    position: relative;
}
.ms-stats-bar-col:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: rgba(0, 120, 212, 0.22);
}
.ms-stats-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
}
.ms-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 6px !important;
    flex-shrink: 0;
    background: #e6f2fb;
    color: var(--ms-blue);
}
.ms-stat-icon .material-symbols-outlined {
    font-size: 19px;
}
.ms-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #8a8886;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1px;
}
.ms-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
}
.ms-stat-value-wallet,
.ms-stat-value-wallet span,
#pageWalletBalance,
#pageWalletBalance span {
    color: var(--ms-blue) !important;
    font-weight: 700 !important;
}
/* md breakpoint: 2 cols per row */
@media (max-width: 991px) {
    .ms-stats-bar-col:nth-child(2)::after {
        display: none;
    }
    .ms-stats-bar-col:nth-child(1),
    .ms-stats-bar-col:nth-child(2) {
        border-bottom: none;
        position: relative;
    }
    .ms-stats-bar-col:nth-child(1)::before,
    .ms-stats-bar-col:nth-child(2)::before {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
        background: rgba(0, 120, 212, 0.22);
    }
}
/* xs: stack single column with short centered dividers */
@media (max-width: 575px) {
    .ms-stats-bar-col:not(:last-child)::after {
        right: auto;
        top: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
    }
    .ms-stats-bar-col:nth-child(1)::before,
    .ms-stats-bar-col:nth-child(2)::before {
        display: none;
    }
    .ms-stats-bar-item {
        padding: 12px 16px;
    }
}

/* ---- Detail Card (tabs container) ---- */
.ms-detail-card {
    border: 1px solid var(--ms-border) !important;
    background: #fff !important;
    overflow: hidden;
}

/* ---- Detail Tabs ---- */
.ms-detail-tabs {
    display: flex;
    border-bottom: 1px solid #e1dfdd !important;
    padding: 0 16px;
    background: #faf9f8;
    margin: 0;
    list-style: none;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.ms-detail-tabs .nav-item {
    flex-shrink: 0;
}
.ms-detail-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #605e5c;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: var(--ms-font);
    margin-bottom: -1px;
}
.ms-detail-tabs .nav-link .material-symbols-outlined {
    font-size: 17px;
}
.ms-detail-tabs .nav-link:hover {
    color: #323130;
    background: #f3f2f1 !important;
}
.ms-detail-tabs .nav-link.active {
    color: var(--ms-blue) !important;
    border-bottom-color: var(--ms-blue) !important;
    background: transparent !important;
    font-weight: 600;
}
.ms-detail-tabs .nav-link.active .material-symbols-outlined {
    color: var(--ms-blue);
}

/* ---- Info Sections (inside tabs) ---- */
.ms-info-section {
    border: 1px solid #edebe9;
    background: #fff;
    margin-bottom: 0;
}
.ms-info-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #323130;
    background: #faf9f8;
    border-bottom: 1px solid #edebe9;
    font-family: var(--ms-font);
}
.ms-info-title .material-symbols-outlined {
    font-size: 16px;
    color: var(--ms-blue);
}

/* ---- Info Table (key-value pairs) ---- */
.ms-info-table {
    width: 100%;
    border-collapse: collapse;
}
.ms-info-table tr {
    border-bottom: 1px solid #f3f2f1;
}
.ms-info-table tr:last-child {
    border-bottom: none;
}
.ms-info-table td {
    padding: 8px 16px;
    font-size: 13px;
    vertical-align: middle;
    font-family: var(--ms-font);
}
.ms-info-label {
    color: #8a8886;
    font-weight: 500;
    width: 40%;
    white-space: nowrap;
}
.ms-info-value {
    color: #323130;
}

/* ---- Tags (inline labels) ---- */
.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ms-font);
}
.ms-tag-blue {
    background: #e6f2fb;
    color: #004578;
}
.ms-tag-green {
    background: #dff6dd;
    color: #0b6a0b;
}
.ms-tag-red {
    background: #fde7e9;
    color: #a4262c;
}
.ms-tag-orange {
    background: #fff4ce;
    color: #8a6116;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .ms-detail-hero {
        padding: 16px;
    }
    .ms-detail-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 17px;
    }
    .ms-detail-toolbar {
        padding: 8px 10px;
    }
    .ms-detail-btn {
        padding: 4px 8px;
        font-size: 11.5px;
    }
    .ms-detail-tabs .nav-link {
        padding: 10px 12px;
        font-size: 12px;
    }
    .ms-info-label {
        width: 45%;
    }
}

/* ====================
   TICKET-SPECIFIC STYLES
   ==================== */

/* Issue banner (used on ticket details) */
.ms-issue-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-family: var(--ms-font);
    border: 1px solid;
    margin-bottom: 16px;
}
.ms-issue-banner .ms-issue-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}
.ms-issue-banner-open {
    background: #fef0f1;
    border-color: #f3d6d8;
    color: #a4262c;
}
.ms-issue-banner-open .ms-issue-icon {
    color: #d13438;
}
.ms-issue-banner-closed {
    background: #f0faf0;
    border-color: #c8e6c9;
    color: #107c10;
}
.ms-issue-banner-closed .ms-issue-icon {
    color: #107c10;
}
.ms-issue-banner-label {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.ms-issue-banner-text {
    font-size: 13px;
    line-height: 1.5;
}

/* Ticket number badge */
.ms-ticket-no {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ms-blue);
    background: #eff6fc;
    padding: 2px 8px;
    border: 1px solid #cce4f7;
    letter-spacing: 0.3px;
}

/* Overdue tag inline */
.ms-overdue-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #a4262c;
    background: #fef0f1;
    padding: 2px 6px;
    border: 1px solid #f3d6d8;
    margin-left: 6px;
}
