/* ============================================================
   theme-modern.css — PMT Portal visual refresh
   Pure presentation layer. Loaded LAST so it overrides the
   legacy stylesheets (main.css, style.css, site.css, bootstrap
   defaults). No markup or behavior depends on this file.
   ============================================================ */

:root {
    /* Brand */
    --pmt-primary: #0760d4;
    --pmt-primary-dark: #054eae;
    --pmt-primary-darker: #0a3e7e;
    --pmt-primary-soft: #e8f0fd;
    --pmt-primary-ring: rgba(7, 96, 212, 0.18);
    /* Internal (PMT) nav */
    --pmt-ink: #1e293b;
    --pmt-ink-hover: #334155;
    /* Neutrals (slate scale) */
    --pmt-text: #1e293b;
    --pmt-text-soft: #475569;
    --pmt-text-muted: #94a3b8;
    --pmt-border: #e2e8f0;
    --pmt-border-strong: #cbd5e1;
    --pmt-bg: #f4f6fb;
    --pmt-surface: #ffffff;
    --pmt-surface-alt: #f8fafc;
    /* Status */
    --pmt-success: #16a34a;
    --pmt-danger: #dc2626;
    --pmt-warning: #d97706;
    /* Shape + depth */
    --pmt-radius-sm: 8px;
    --pmt-radius: 12px;
    --pmt-radius-lg: 16px;
    --pmt-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --pmt-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px -8px rgba(15, 23, 42, 0.12);
    --pmt-shadow-lg: 0 8px 16px -6px rgba(15, 23, 42, 0.12), 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    --pmt-font: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */

body {
    font-family: var(--pmt-font);
    background-color: var(--pmt-bg);
    color: var(--pmt-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pmt-font);
    color: var(--pmt-text);
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    font-size: 15px;
}

a {
    color: var(--pmt-primary);
    transition: color 0.15s ease;
}

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

/* Slim, subtle scrollbar (replaces legacy inline styles) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    box-shadow: none;
}

::-webkit-scrollbar-thumb {
    background: var(--pmt-border-strong);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pmt-text-muted);
}

#favicon, #dropdownMenuButton {
    display: inline-block;
}

thead {
    text-align: center;
}

/* ---------- Header ---------- */

.dashboard-wraper header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--pmt-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.header-item {
    height: 64px;
    padding: 8px 12px;
    align-items: center;
}

.header-item .logo-section1 {
    padding-top: 0;
    display: flex;
    align-items: center;
}

.main-content {
    padding-top: 64px;
}

/* User chip in the header */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pmt-primary-soft);
    color: var(--pmt-primary);
    margin-right: 10px;
    font-size: 15px;
}

.welcome-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--pmt-text-soft);
}

.user-dropdown-section .dropdown-toggle::after {
    color: var(--pmt-text-muted);
    vertical-align: middle;
}

.dropdown-menu {
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius-sm);
    box-shadow: var(--pmt-shadow);
    padding: 6px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--pmt-text-soft);
}

.dropdown-item:hover {
    background: var(--pmt-surface-alt);
    color: var(--pmt-text);
}

/* ---------- Primary navigation ---------- */

/* External-user nav: brand blue bar */
.main-content .content-body ul.nav.nav-tabs {
    background: linear-gradient(180deg, var(--pmt-primary) 0%, var(--pmt-primary-dark) 100%);
    border-bottom: 0;
    padding: 0 8px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.main-content .content-body .nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 18px;
    border: 0;
    border-radius: 0;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.main-content .content-body .nav-tabs .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Internal (PMT) nav: dark slate bar — keep the visual distinction */
.main-content .content-body ul.nav.nav-tabs[style] {
    background: linear-gradient(180deg, var(--pmt-ink) 0%, #16202f 100%) !important;
}

.main-content .content-body .nav-tabs .nav-link.PMT:hover {
    background-color: var(--pmt-ink-hover);
    color: #ffffff;
}

/* Active state toggled by the layout script */
.nav-link.joseActive {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 -3px 0 #ffffff;
}

.nav-link.PMT.joseActive {
    color: #ffffff !important;
    background-color: var(--pmt-ink-hover) !important;
    box-shadow: inset 0 -3px 0 #ffffff;
}

/* Dropdowns hanging off the nav keep readable link colors */
.main-content .content-body .nav-tabs .dropdown-menu .nav-link {
    color: var(--pmt-text-soft);
    padding: 8px 14px;
    border-radius: 6px;
}

.main-content .content-body .nav-tabs .dropdown-menu .nav-link:hover {
    background: var(--pmt-surface-alt);
    color: var(--pmt-text);
}

/* ---------- Page title strip + content cards ---------- */

.card {
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius);
    box-shadow: var(--pmt-shadow-sm);
}

.card-s {
    padding: 14px 18px;
    border: 1px solid var(--pmt-border);
    border-left: 4px solid var(--pmt-primary);
    background: var(--pmt-surface);
}

.card-s h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.userbox {
    box-shadow: var(--pmt-shadow);
    background: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    padding: 22px;
    border-radius: var(--pmt-radius);
    margin-top: 16px;
}

.userbox h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--pmt-text);
}

.tabtittle {
    padding: 15px;
}

/* ---------- Tables ---------- */

.table {
    color: var(--pmt-text-soft);
    margin-bottom: 0;
}

.table thead th,
table.dataTable thead th {
    background: var(--pmt-surface-alt);
    color: var(--pmt-text);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-top: 0;
    border-bottom: 1px solid var(--pmt-border);
    padding: 12px 14px;
    white-space: nowrap;
}

.table td,
table.dataTable tbody td {
    font-size: 14px;
    padding: 11px 14px;
    border-top: 1px solid var(--pmt-border);
    vertical-align: middle;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border-color: var(--pmt-border);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--pmt-surface-alt);
}

.table tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: var(--pmt-primary-soft);
    transition: background-color 0.12s ease;
}

table.dataTable {
    border-collapse: collapse !important;
}

/* DataTables chrome: search box, length select, info, pagination */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--pmt-border-strong);
    border-radius: var(--pmt-radius-sm);
    padding: 6px 10px;
    margin-left: 6px;
    background: var(--pmt-surface);
    color: var(--pmt-text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--pmt-primary);
    box-shadow: 0 0 0 3px var(--pmt-primary-ring);
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    color: var(--pmt-text-soft);
    font-size: 13px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--pmt-radius-sm) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--pmt-text-soft) !important;
    padding: 5px 12px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--pmt-surface-alt) !important;
    border-color: var(--pmt-border) !important;
    color: var(--pmt-text) !important;
}

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

/* DataTables export buttons */
button.dt-button,
div.dt-button,
a.dt-button {
    background: var(--pmt-surface) !important;
    border: 1px solid var(--pmt-border-strong) !important;
    border-radius: var(--pmt-radius-sm) !important;
    color: var(--pmt-text-soft) !important;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    box-shadow: none !important;
}

button.dt-button:hover,
div.dt-button:hover,
a.dt-button:hover {
    background: var(--pmt-surface-alt) !important;
    border-color: var(--pmt-primary) !important;
    color: var(--pmt-primary) !important;
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: var(--pmt-radius-sm);
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:focus {
    box-shadow: 0 0 0 3px var(--pmt-primary-ring);
}

.btn-primary {
    background-color: var(--pmt-primary);
    border-color: var(--pmt-primary);
}

.btn-primary:hover,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--pmt-primary-dark);
    border-color: var(--pmt-primary-dark);
}

.btn-success {
    background-color: var(--pmt-success);
    border-color: var(--pmt-success);
}

.btn-danger {
    background-color: var(--pmt-danger);
    border-color: var(--pmt-danger);
}

.btn-secondary {
    background-color: var(--pmt-text-soft);
    border-color: var(--pmt-text-soft);
}

.btn-default {
    color: var(--pmt-text-soft);
    background-color: var(--pmt-surface);
    border-color: var(--pmt-border-strong);
}

.btn-default:hover {
    background-color: var(--pmt-surface-alt);
    color: var(--pmt-text);
}

/* ---------- Forms ---------- */

.form-control,
select.form-control,
textarea.form-control {
    border: 1px solid var(--pmt-border-strong);
    border-radius: var(--pmt-radius-sm);
    color: var(--pmt-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--pmt-primary);
    box-shadow: 0 0 0 3px var(--pmt-primary-ring);
}

.form-control::placeholder {
    color: var(--pmt-text-muted);
}

label,
.control-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pmt-text-soft);
    margin-bottom: 4px;
}

/* Show/hide password toggle */
.password-field {
    position: relative;
    width: 100%;
}

.password-field .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--pmt-text-muted);
    transition: color 0.15s ease;
}

.password-toggle:hover {
    color: var(--pmt-text-soft);
}

.password-toggle:focus {
    outline: none;
    color: var(--pmt-primary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* ---------- Modals ---------- */

.modal-content {
    border: 0;
    border-radius: var(--pmt-radius-lg);
    box-shadow: var(--pmt-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--pmt-border);
    padding: 18px 24px;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--pmt-border);
    padding: 14px 24px;
}

.modal-backdrop.show {
    opacity: 0.4;
}

/* ---------- Dashboard summary tiles ---------- */

.users-section {
    background-color: var(--pmt-surface);
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius);
    box-shadow: var(--pmt-shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.users-section:hover {
    box-shadow: var(--pmt-shadow);
    transform: translateY(-2px);
}

.user-icon,
.user-icongray {
    border-radius: var(--pmt-radius);
}

.user-text h2 {
    color: var(--pmt-text);
    font-weight: 700;
}

.user-text h2 a {
    color: inherit;
}

.user-text h4 {
    color: var(--pmt-text-muted);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.users-column h3 {
    font-size: 18px;
    font-weight: 600;
}

.users-column h3::after {
    background: var(--pmt-primary);
    height: 24px;
    bottom: 0;
}

.software-support,
.users-section,
.products {
    box-shadow: var(--pmt-shadow-sm);
}

/* ---------- Footer ---------- */

.footer {
    background: transparent;
    border-top: 1px solid var(--pmt-border) !important;
    color: var(--pmt-text-muted);
    font-size: 13px;
}

.footer a {
    color: var(--pmt-text-soft);
}

/* ---------- Toggle switch (user status) ---------- */

input:checked + .slider {
    background-color: var(--pmt-primary);
}

input:focus + .slider {
    box-shadow: 0 0 0 3px var(--pmt-primary-ring);
}

/* ---------- Auth pages (login / register / reset) ---------- */

.half .contents {
    background: var(--pmt-bg);
}

.half .contents .form-control,
.half .bg .form-control {
    border: 1px solid var(--pmt-border-strong);
    border-radius: var(--pmt-radius-sm);
    box-shadow: none;
    height: 50px;
}

.half .contents .form-control:focus,
.half .bg .form-control:focus {
    border-color: var(--pmt-primary);
    box-shadow: 0 0 0 3px var(--pmt-primary-ring);
}

.half .btn {
    border-radius: var(--pmt-radius-sm);
}

.login-btn {
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--pmt-radius-sm);
    background: var(--pmt-primary);
    padding: 13px 0;
    box-shadow: 0 6px 16px -6px rgba(7, 96, 212, 0.5);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
    background: var(--pmt-primary-dark);
    box-shadow: 0 8px 20px -6px rgba(7, 96, 212, 0.6);
}

.login-block .form-control,
.register-block .form-control {
    border: 1px solid var(--pmt-border-strong);
    border-radius: var(--pmt-radius-sm);
    padding-left: 12px;
}

.login-right-panel h1 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ---------- jQuery UI autocomplete (zip lookup etc.) ---------- */

.ui-autocomplete {
    border: 1px solid var(--pmt-border) !important;
    border-radius: var(--pmt-radius-sm);
    box-shadow: var(--pmt-shadow);
    font-family: var(--pmt-font) !important;
    font-size: 14px;
}

/* Page-level legacy boxes (e.g. Admin dashboard) — element+class
   selectors so these win over the per-page <style> blocks */
div.newBox {
    border: 1px solid var(--pmt-border);
    border-radius: var(--pmt-radius);
    background: var(--pmt-surface);
    box-shadow: var(--pmt-shadow-sm);
}

div.borderBtm, h3.borderBtm, h4.borderBtm {
    border-bottom: 2px solid var(--pmt-primary);
}

/* ---------- Misc polish ---------- */

.border-top {
    border-top: 1px solid var(--pmt-border);
}

.border-bottom {
    border-bottom: 1px solid var(--pmt-border);
}

hr {
    border-top-color: var(--pmt-border);
}

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