.disabled a,
a.disabled {
    pointer-events: none;
}

a:hover {
    color: #15848F;
}

a {
    color: #0068CC;
}

.side-nav li a:not(.button) {
    color: #15848F;
}

.side-nav li a:not(.button):hover {
    color: #15848F;
}

header {
    background-color: #D33C44;
    color: #ffffff;
    font-size: 30px;
    height: 84px;
    line-height: 64px;
    padding: 16px 0px;
    box-shadow: 0px 1px rgba(0, 0, 0, 0.24);
}

header .header-title {
    padding-left:80px
}

legend {
    color:#15848F;
}

.row {
    max-width: 80rem;
}

.actions.columns {
    margin-top:1rem;
    border-left: 5px solid #15848F;
    padding-left: 15px;
    padding: 32px 20px;
}

.actions.columns h3 {
    color:#15848F;
}

.related table {
    border: 0;
    width: 100%;
    table-layout: fixed;
}

.index table thead {
    height: 3.5rem;
}

.header-help {
    float: right;
    margin-right:2rem;
    margin-top: -80px;
    font-size:16px;
}

.header-help span {
    font-weight: normal;
    text-align: center;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    display: inline-block;
    padding: 0.25rem 0.5rem 0.375rem;
    font-size: 0.8rem;
    background-color: #0097a7;
    color: #FFF;
    border-radius: 1000px;
}

.header-help a {
    color: #fff;
}

ul.pagination li a {
    color: rgba(0, 0 ,0 , 0.54);
}

ul.pagination li.active a {
    background-color: #337AB7;
    color: #FFF;
    font-weight: bold;
    cursor: default;
}
ul.pagination .disabled:hover a {
    background: none;
}

.paginator {
    text-align: center;
}

.paginator ul.pagination li {
    float: none;
    display: inline-block;
}

.paginator p {
    text-align: right;
    color: rgba(0, 0 ,0 , 0.54);
}

.asc:after {
    content: " \2193";
}
.desc:after {
    content: " \2191";
}

.form .error-message {
    display: block;
    padding: 0.375rem 0.5625rem 0.5625rem;
    margin-top: -1px;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: normal;
    font-style: italic;
    color: rgba(0, 0, 0, 0.54);
}

.required > label {
    font-weight: bold;
}
.required > label:after {
    content: ' *';
    color: #C3232D;
}

select[multiple] {
    min-height:150px;
    background: none;
}
input[type=checkbox],
input[type=radio] {
    margin-right: 0.5em;
}

.date select,
.time select,
.datetime select {
    display: inline;
    width: auto;
    margin-right: 10px;
}

.error label,
.error label.error {
    color: #C3232D;
}

.view h2 {
    color: #6F6F6F;
}

.view .columns.strings {
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin-right:0.7rem;
}

.view .numbers {
    background-color: #B7E3EC;
    color: #FFF;
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin-right: 0.7rem;
}

.view .columns.dates {
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin-right:0.7rem;
    background-color:#337AB7;
    color: #fff;
}

.view .columns.booleans {
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin-right:0.7rem;
    background-color: #8D6E65;
    color: #fff;
}

.view .strings p {
    border-bottom: 1px solid #eee;
}
.view .numbers .subheader, .view .dates .subheader {
    color:#747474;
}
.view .booleans .subheader {
    color: #E9E9E9
}

.view .texts .columns {
    margin-top:1.2rem;
    border-bottom: 1px solid #eee;
}

/** Notices and Errors **/
.cake-error,
.cake-debug,
.notice,
p.error,
p.notice {
    display: block;
    clear: both;
    background-repeat: repeat-x;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
}

.cake-debug,
.notice,
p.notice {
    color: #000000;
    background: #ffcc00;
}

.cake-error,
p.error {
    color: #fff;
    background: #C3232D;
}

pre {
    background: none repeat scroll 0% 0% #FFF;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin: 15px 0px;
    color: rgba(0, 0 ,0 , 0.74);
    padding:5px;
}

.cake-error .cake-stack-trace {
    margin-top:10px;
}

.cake-stack-trace code {
    background: inherit;
    border:0;
}

.cake-code-dump .code-highlight {
    display: block;
    background-color: #FFC600;
}

.cake-error a,
.cake-error a:hover {
    color:#fff;
    text-decoration: underline;
}

.checks {
    padding:30px;
    color: #626262;
    background-color: #B7E3EC;
    border-radius: 3px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.24);
    margin-bottom: 2em;
}

.checks h4 {
    margin-bottom: 1.5rem;
}

.checks hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.checks .success,
.checks .problem {
    margin-left: 10px;
}
.checks .success:before,
.checks .problem:before {
    line-height: 0px;
    font-size: 28px;
    height: 12px;
    width: 12px;
    border-radius: 15px;
    text-align: center;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    left: -11px;
}

.checks .success:before {
    content: "✓";
    color: green;
    margin-right: 9px;
}

.checks .problem:before {
    content: "✘";
    color: red;
    margin-right: 9px;
}

.top-bar.expanded .title-area {
    background: #1e1e1e;
}

.top-bar.expanded, .top-bar,.top-bar-section ul li,.top-bar-section li:not(.has-form) a:not(.button) {
    background: #000000;
}

.top-bar-section li:not(.has-form) a:not(.button):hover {
    background-color: #308e97;
    background: #308e97;
}

.side-nav li.heading {
    color: #0068CC;
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0.4375rem 0.875rem;
}

#actions-sidebar {
    background: #fafafa;
}

.index table {
    margin-top: 0rem;
    border: 0;
    width: 100%;
    table-layout: fixed;
}

table {
    background: #fff;
    margin-bottom: 1.25rem;
    border: none;
    table-layout: fixed;
    width: 100%;
}

table thead {
    background: none;
}

table tr {
    border-bottom: 1px solid #ebebec;
}

table thead tr {
    border-bottom: 1px solid #0068CC;
}

table tr th {
    padding: 0.5625rem 0.625rem;
    font-size: 0.875rem;
    color: #0068CC;
    text-align: left;
    border-bottom: 2px solid #0068CC;
}

table tr:nth-of-type(even) {
    background: none;
}

fieldset {
    border: none;
    padding: 1.25rem;
    margin: 1.125rem 0;
}

fieldset legend {
    border-bottom: 2px solid #0068CC;
    width: 100%;
    line-height: 2rem;
}

.form button[type="submit"] {
    float: right;
    text-transform: uppercase;
    box-shadow: none;
}

.form button:hover, .form button:focus {
    background: #BE840B;
    box-shadow: none;
}

button {
    background: #337ab7;
}

div.message {
    text-align: center;
    cursor: pointer;
    display: block;
    font-weight: normal;
    padding: 0 1.5rem 0 1.5rem;
    transition: height 300ms ease-out 0s;
    background-color: #a0d3e8;
    color: #626262;
    top: 15px;
    right: 15px;
    z-index: 999;
    overflow: hidden;
    height: 50px;
    line-height: 2.5em;
}

div.message:before {
    line-height: 0px;
    font-size: 20px;
    height: 12px;
    width: 12px;
    border-radius: 15px;
    text-align: center;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    left: -11px;
    background-color: #FFF;
    padding: 12px 14px 12px 10px;
    content: "i";
    color: #a0d3e8;
}

div.message.error {
    background-color: #C3232D;
    color: #FFF;
}

div.message.error:before {
    padding: 11px 16px 14px 7px;
    color: #C3232D;
    content: "x";
}
div.message.hidden {
    height: 0;
}


.vertical-table th {
    padding: 0.5625rem 0.625rem;
    font-size: 0.875rem;
    color: #0068CC;
    border: none;
    text-align: left;
}

.vertical-table {
    vertical-align: middle;
}

.vertical-table td {
    text-align: right;
}

.content {
    padding: 2rem;
}

/* Use 'one true layout' methods to get equal height columns */
.container {
    overflow: hidden;
    min-height: 92%; /* full height almost always */
}

/* Force equal height by overflowing */
.content,
#actions-sidebar {
    margin-bottom: -99999px;
    padding-bottom: 99999px;
}
@media(max-width: 640px) {
    #actions-sidebar {
        padding-bottom: 2rem;
        margin-bottom: 0;
    }
}

.content h3 {
    color: #0c0b0c;
    padding-bottom: 0.5rem;
    margin-bottom: 20px;
}

.content h4 {
    color: #0c0b0c;
    padding-bottom: 0.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #0c0b0c;
}

.content .related h4 {
    color: #4d8f97;
    padding-bottom: 0.5rem;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 0px;
}

table td {
    vertical-align: top;
    word-break: break-all;
}

.top-bar {
    background: #000;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    height: 48px;
}

.topbar-home {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.topbar-home:hover {
    background: #1f1f1f;
    color: #fff;
}

.top-bar-section {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: space-between;
    min-width: 0;
}

.top-bar-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Navegación y reportes */
.top-bar .left li a,
.top-bar .right li a,
.top-bar .title-area li a {
    display: inline-block;
    padding: 10px 14px;
}

@media (max-width: 768px) {
    .top-bar {
        align-items: stretch;
    }

    .top-bar-admin-strip {
        justify-content: center;
        padding: 8px 10px;
    }

    .top-bar-admin-summary {
        justify-content: center;
        width: 100%;
    }

    .topbar-left {
        width: 100%;
        border-bottom: 1px solid #1f2937;
    }

    .topbar-home {
        width: 100%;
        justify-content: center;
    }

    .top-bar-section {
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
    }

    .top-bar-section .left,
    .top-bar-section .right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .top-bar .left li a,
    .top-bar .right li a {
        display: block;
        width: 100%;
        padding: 12px 10px;
        text-align: center;
        border-bottom: 1px solid #111827;
        border-right: 1px solid #111827;
    }

    .top-bar-section .right li span {
        display: block !important;
        padding: 12px 10px !important;
        text-align: center;
        border-bottom: 1px solid #111827;
        border-right: 1px solid #111827;
        font-size: 13px;
    }
}

.topnav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
}

.topnav a,
.topnav button,
.topnav input[type=submit] {
    display: inline-block;
    width: auto;
    min-width: 0;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    background: #343434;
    color: #fff;
    border: 0;
    border-radius: 4px;
}

.topnav a:hover,
.topnav button:hover,
.topnav input[type=submit]:hover {
    background: #242424;
    color: #fff;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.report-card,
.log-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.report-card h3,
.log-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.report-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0 18px 0;
}

.kpi {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.kpi-label {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.table-responsive {
    overflow-x: auto;
    padding-bottom: 6px;
}

.table-report {
    width: max-content;
    min-width: 2100px;
    border-collapse: collapse;
    white-space: nowrap;
    background: #fff;
}

.table-report th,
.table-report td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 14px;
    text-align: left;
    vertical-align: top;
}

.table-report th {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    color: #475569;
}

.table-report tr:hover td {
    background: #fafafa;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.muted {
    color: #6b7280;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    border: 1px solid #c7d2fe;
}

.logs-table th:nth-child(1), .logs-table td:nth-child(1) { min-width: 160px; }
.logs-table th:nth-child(2), .logs-table td:nth-child(2) { min-width: 200px; }
.logs-table th:nth-child(3), .logs-table td:nth-child(3) { min-width: 150px; }
.logs-table th:nth-child(4), .logs-table td:nth-child(4) { min-width: 140px; }
.logs-table th:nth-child(5), .logs-table td:nth-child(5),
.logs-table th:nth-child(6), .logs-table td:nth-child(6),
.logs-table th:nth-child(7), .logs-table td:nth-child(7),
.logs-table th:nth-child(8), .logs-table td:nth-child(8),
.logs-table th:nth-child(9), .logs-table td:nth-child(9),
.logs-table th:nth-child(10), .logs-table td:nth-child(10) { min-width: 110px; }
.logs-table th:nth-child(11), .logs-table td:nth-child(11) { min-width: 360px; white-space: normal; }
.logs-table th:nth-child(12), .logs-table td:nth-child(12) { min-width: 130px; }
.logs-table th:nth-child(13), .logs-table td:nth-child(13) { min-width: 260px; }


/* Ajustes vistas Reportes / Logs / Contactos */
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.filter-actions button,
.filter-actions .btn-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
}

.filter-actions button {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.filter-actions .btn-secondary-link {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
}


.report-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.report-pager-info {
    color: #374151;
}

.report-pager-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.report-pager-actions .pager-link,
.report-pager-actions a,
.report-pager-actions .disabled,
.report-pager-actions .page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    line-height: 1;
    text-decoration: none;
}

.report-pager-actions a,
.report-pager-actions .pager-link {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
}

.report-pager-actions .page {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #374151;
}

.report-pager-actions .disabled {
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.logs-filter-form .filter-grid {
    align-items: end;
}

.filter-grid > div {
    min-width: 0;
}

.filter-grid > div .input,
.filter-grid > div .form-group {
    margin-bottom: 0;
}

.filter-actions {
    margin-top: 16px;
}

.filter-actions .btn-primary-inline,
.filter-actions button,
.filter-actions .btn-secondary-link {
    margin: 0;
    line-height: 1;
}

.filter-actions .btn-secondary-link {
    min-height: 36px;
}

@media (max-width: 768px) {
    .report-pager {
        align-items: stretch;
    }

    .report-pager-actions {
        width: 100%;
    }
}

.btn-primary-inline,
.btn-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    line-height: 1;
}

.btn-primary-inline {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.btn-primary-inline:hover {
    background: #1d4ed8;
    color: #fff;
}

.btn-secondary-link {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
}

.btn-secondary-link:hover {
    background: #f9fafb;
    color: #111827;
}

.kpi-value-text {
    font-size: 18px;
    line-height: 1.35;
}

.kpi-foot {
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
}

.user-plan-head,
.user-plan-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-plan-head {
    justify-content: space-between;
}

.user-admin-grid {
    align-items: start;
}

.users-table {
    min-width: 980px;
}

.user-sessions-table {
    min-width: 700px;
}

.actions-inline a,
.actions-inline form {
    display: inline;
}

.actions-inline a,
.actions-inline form a,
.actions-inline form button {
    margin-right: 10px;
}

.actions-inline .postlink,
.actions-inline button {
    background: transparent;
    border: 0;
    padding: 0;
    color: #0068CC;
    cursor: pointer;
}

.user-form-card .input,
.user-form-card .select,
.user-form-card .password,
.user-form-card .email,
.user-form-card .text {
    margin-bottom: 0;
}

.user-form-grid {
    align-items: end;
}

.user-form-actions {
    margin-top: 18px;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.user-detail-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}

.user-detail-item span,
.user-detail-item strong {
    display: block;
}

.user-detail-item strong {
    margin-top: 6px;
    color: #111827;
}

/* ====================================================
   PROFESSIONAL THEME OVERRIDES
   Fuente Inter, escala compacta, paleta slate/blue
   ==================================================== */

/* --- Base & Tipografía --- */
html {
    font-size: 87.5%; /* 14px base (default era 16px) */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    background-color: #f8fafc;
    color: #1e293b;
}

h1, h2, h3, h4, h5, h6,
.top-bar, button, .button, input, select, textarea, label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

h1 { font-size: 1.6rem;  color: #0f172a; font-weight: 600; }
h2 { font-size: 1.3rem;  color: #0f172a; font-weight: 600; }
h3 { font-size: 1.05rem; color: #1e293b; font-weight: 600; }
h4 { font-size: 0.9rem;  color: #1e293b; font-weight: 600; }

p {
    font-size: 0.875rem;
    color: #334155;
}

/* --- Links --- */
a {
    color: #2563eb;
}
a:hover {
    color: #1d4ed8;
}

/* --- Navegación --- */
.top-bar,
.top-bar.expanded,
.top-bar-section ul li,
.top-bar-section li:not(.has-form) a:not(.button),
.top-bar.expanded .title-area {
    background: #1e293b !important;
}

.top-bar {
    min-height: 44px;
    border-bottom: 1px solid #0f172a;
}

.top-bar-admin-strip {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 6px 12px;
    border-bottom: 1px solid #0f172a;
    background: #0f172a;
}

.top-bar-admin-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.top-bar-admin-title {
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
}

.topbar-left {
    height: 44px;
}

.topbar-home {
    height: 44px;
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.01em;
}

.topbar-home:hover {
    background: #334155 !important;
    color: #fff;
}

.top-bar-section li:not(.has-form) a:not(.button) {
    color: #cbd5e1 !important;
    font-size: 0.8rem;
    padding: 0 12px !important;
    line-height: 44px;
}

.top-bar-section li:not(.has-form) a:not(.button):hover,
.top-bar-section li:not(.has-form) a:not(.button):focus {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

/* Nombre del cliente en navbar */
.top-bar-section .right li span[style] {
    color: #94a3b8 !important;
    font-size: 0.775rem !important;
    padding: 0 10px !important;
    line-height: 44px !important;
    font-weight: 500;
}

/* --- Tablas --- */
table {
    font-size: 0.8125rem;
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background: #f8fafc;
}

table tr th {
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f1f5f9;
    padding: 0.45rem 0.75rem;
}

table tr td {
    font-size: 0.8125rem;
    color: #334155;
    padding: 0.45rem 0.75rem;
    vertical-align: middle;
    word-break: break-word;
}

table tr {
    border-bottom: 1px solid #f1f5f9;
}

table thead tr {
    border-bottom: 1px solid #e2e8f0;
}

table tr:hover td {
    background: #f8fafc;
}

/* --- Formularios --- */
label {
    font-size: 0.775rem !important;
    color: #475569;
    font-weight: 500;
    margin-bottom: 2px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
input[type="color"],
textarea,
select {
    font-size: 0.8125rem !important;
    height: 2rem;
    border-color: #e2e8f0;
    color: #1e293b;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    outline: none;
}

fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 1rem 1.25rem;
}

fieldset legend {
    color: #475569;
    border-bottom: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 6px;
    background: #fff;
}

/* --- Botones --- */
button, .button {
    font-size: 0.8rem !important;
    padding: 0.45rem 1rem !important;
    border-radius: 6px !important;
    line-height: 1.4 !important;
    background-color: #2563eb;
    border-color: #1d4ed8;
    font-weight: 500;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

button:hover, .button:hover {
    background-color: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}

button.secondary, .button.secondary {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
}
button.secondary:hover, .button.secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

button.alert, .button.alert {
    background-color: #dc2626;
    border-color: #b91c1c;
}
button.alert:hover, .button.alert:hover {
    background-color: #b91c1c;
}

button.success, .button.success {
    background-color: #16a34a;
    border-color: #15803d;
}
button.success:hover, .button.success:hover {
    background-color: #15803d;
}

/* --- Topnav (acciones rápidas) --- */
.topnav a,
.topnav button,
.topnav input[type=submit] {
    background: #334155;
    font-size: 0.775rem;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
}
.topnav a:hover,
.topnav button:hover,
.topnav input[type=submit]:hover {
    background: #1e293b;
}

.topnav a.is-active {
    background: #2563eb;
    color: #fff;
}

/* --- Sidebar de acciones --- */
#actions-sidebar {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

.actions.columns {
    border-left: 3px solid #2563eb;
}
.actions.columns h3 {
    color: #2563eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.actions.columns ul li a,
.side-nav li a:not(.button) {
    font-size: 0.8rem;
    color: #2563eb;
}

/* --- Legend (section headers) --- */
legend {
    color: #2563eb;
}

/* --- Contenedor --- */
.container {
    max-width: 1400px;
}

.content {
    padding: 1.25rem 1.5rem;
    background: #fff;
}

.content h3 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 0.4rem;
}

.content h4 {
    color: #334155;
    font-size: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
    padding-bottom: 0.4rem;
}

/* --- KPIs --- */
.kpi-value {
    font-size: 20px;
    font-weight: 700;
}

.kpi-label {
    font-size: 0.7rem;
}

.kpi-foot {
    font-size: 0.7rem;
}

/* --- Report/log cards --- */
.report-card h3,
.log-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
}

.report-card,
.log-card {
    border-radius: 8px;
    border-color: #e2e8f0;
}

/* --- Flash / mensajes --- */
div.message {
    font-size: 0.8125rem;
    height: 42px;
    line-height: 2.2em;
    border-radius: 6px;
}

/* --- Paginación --- */
ul.pagination {
    list-style: none;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 0;
}
ul.pagination li {
    display: inline-flex;
    float: none;
    font-size: 0.8rem;
    height: auto;
    margin: 0;
}
ul.pagination li a,
ul.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #374151;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1;
}
ul.pagination li a:hover {
    background: #f1f5f9;
    color: #1e293b;
}
ul.pagination li.active a,
ul.pagination li.current a {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}
ul.pagination li.disabled a,
ul.pagination .disabled:hover a {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
.paginator {
    text-align: left;
}
.paginator p {
    color: #6b7280;
    font-size: 0.775rem;
    margin-top: 6px;
}

/* --- Tags --- */
.tag {
    font-size: 0.7rem;
}

/* --- Scroll bars (webkit) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.session-tracker-nav {
    padding: 6px 8px;
}

.global-ops-nav {
    padding: 6px 8px;
}

.global-ops-summary {
    display: grid;
    gap: 6px;
    min-width: 320px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #111827;
    border: 1px solid #374151;
    color: #e5e7eb;
}

.global-ops-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.global-ops-title {
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
    margin-right: 4px;
}

.global-ops-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #1f2937;
    color: #d1d5db;
    font-size: 11px;
}

.global-ops-pill-working {
    background: #052e16;
    color: #bbf7d0;
}

.global-ops-pill-break {
    background: #451a03;
    color: #fde68a;
}

.global-ops-meter {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #374151;
    display: flex;
}

.session-tracker {
    display: grid;
    gap: 4px;
    min-width: 240px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
}

.session-tracker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
}

.session-times {
    justify-content: space-between;
    color: #cbd5e1;
}

.session-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: #22c55e;
}

.session-tracker.is-break .session-status-dot {
    background: #f59e0b;
}

.session-break-btn {
    height: 28px;
    min-height: 28px;
    padding: 0 10px !important;
    border-radius: 6px !important;
    border: 1px solid #64748b;
    background: #1e293b;
    color: #f8fafc;
    font-size: 12px !important;
    line-height: 1 !important;
}

.session-break-btn:hover {
    background: #334155;
}

.session-tracker.is-break .session-break-btn {
    border-color: #f59e0b;
    background: #78350f;
}

.session-break-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.operator-status-tag.status-working {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.operator-status-tag.status-break {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.operator-status-tag.status-offline {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #cbd5e1;
}

.operators-meter {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
}

.operators-meter-working {
    background: #22c55e;
    transition: width 180ms ease;
}

.operators-meter-break {
    background: #f59e0b;
    transition: width 180ms ease;
}

@media (max-width: 900px) {
    .top-bar-section .right .global-ops-nav,
    .top-bar-section .right .session-tracker-nav {
        grid-column: 1 / -1;
    }

    .global-ops-nav {
        width: 100%;
        border-bottom: 1px solid #0f172a;
    }

    .global-ops-summary {
        width: 100%;
        min-width: 0;
    }

    .session-tracker-nav {
        width: 100%;
        border-bottom: 1px solid #0f172a;
    }

    .session-tracker {
        width: 100%;
        min-width: 0;
    }
}
