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

a:hover {
    color: white;
}

a {
    color: white;
}

.side-nav li a:not(.button) {
    color: white;
}

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

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: #DCE47E;
    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";
}

.error-message {
    display: block;
    padding: 0.5rem 0.8rem;
    margin-top: 5px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #C3232D;
    background-color: rgba(195, 35, 45, 0.08);
    border-radius: 6px;
    border-left: 4px solid #C3232D;
}

.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:#DCE47E;
    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: #01545b;
}

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

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

.side-nav li.heading {
    color: #1798A5;
    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 #1798A5;
}

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

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

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

fieldset legend {
    border-bottom: 2px solid #1798A5;
    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: #966600;
}

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: #1798A5;
    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: #be140b;
    padding-bottom: 0.5rem;
    margin-bottom: 20px;
}

.content h4 {
    color: var(--primary-color, #AB4391);
    padding-bottom: 0.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color, #AB4391);
}

.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;
}

/* --- Portal de Servicios - Region Selection Styles --- */

.region-form-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.region-form-container h3 {
    color: #AB4391;
    margin-bottom: 30px;
    font-weight: bold;
    font-family: 'Verdana', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.region-form-container .input {
    margin-bottom: 25px;
    text-align: left;
}

.region-form-container label {
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: block;
}

.region-form-container select,
.region-form-container input[type="text"],
.region-form-container input[type="password"],
.region-form-container input[type="email"],
.region-form-container input[type="number"],
.region-form-container input[type="tel"],
.region-form-container input[type="date"] {
    width: 100%;
    padding: 8px 12px; /* Reducido para ajustarse mejor a la altura del texto */
    border: 2px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
    height: 40px; /* Altura fija para mayor control */
    line-height: 1.5;
}

.region-form-container select:focus,
.region-form-container input[type="text"]:focus,
.region-form-container input[type="password"]:focus,
.region-form-container input[type="email"]:focus,
.region-form-container input[type="number"]:focus,
.region-form-container input[type="tel"]:focus,
.region-form-container input[type="date"]:focus {
    border-color: #AB4391;
    outline: none;
}

.input.checkbox {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.region-form-container .input.checkbox {
    justify-content: center;
    margin: 25px 0;
}

/* Custom checkbox styling */
.input.checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.input.checkbox input[type="checkbox"]:checked {
    background-color: #AB4391;
    border-color: #AB4391;
}

.input.checkbox input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.input.checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 20px;
}

.btn-portal-submit {
    background-image: linear-gradient(to right, #AB4391 0%, #e6197a 100%);
    color: white !important;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(171, 67, 145, 0.3);
    display: inline-block;
}

.btn-portal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(171, 67, 145, 0.4);
    filter: brightness(1.1);
}

.btn-portal-cancel {
    background: #f1f1f1;
    color: #666 !important;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-left: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #ddd;
}

.btn-portal-cancel:hover {
    background: #e5e5e5;
    color: #333 !important;
    border-color: #ccc;
}

/* --- Usuarios Gestion - Modern Professional Styles --- */
:root {
    --primary-color: #AB4391;
    --secondary-color: #e6197a;
    --gradient: linear-gradient(135deg, #AB4391 0%, #e6197a 100%);
    --text-dark: #2d3748;
    --text-muted: #718096;
    --bg-light: #fffaf5;
    --border-color: #f3e8e8;
    --white: #ffffff;
}

.main-centered-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    float: none !important;
}

.section-title {
    color: var(--text-dark);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 10px auto 0;
    border-radius: 2px;
}

.user-data-container {
    margin-bottom: 50px;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.user-profile-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.user-profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-icon { font-size: 1.2rem; }
.user-label { font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }
.user-value { font-weight: 700; color: var(--primary-color); font-size: 1.1rem; text-transform: uppercase; }

.user-profile-divider {
    height: 30px;
    width: 1px;
    background-color: var(--border-color);
}

.search-section {
    margin-bottom: 40px;
    text-align: center;
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto 15px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-container input#searchEmpresaInput {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    background: white;
}

.search-container input#searchEmpresaInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(171, 67, 145, 0.1);
}

.grid-instruction {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    margin-top: 10px;
}

.empresas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.modern-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.modern-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    background: var(--white);
}

.modern-card:hover::before {
    opacity: 1;
}

.card-header {
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.modern-card .empresa-nombre {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--primary-color) !important;
}

.card-body {
    flex: 1;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-info {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.info-label { color: var(--text-muted); font-weight: 500; }
.info-value { color: var(--text-dark); font-weight: 600; }

.internal-badge {
    display: inline-block;
    align-self: center;
    background: #f3e8ff;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #e9d5ff;
}

.card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--bg-light);
    text-align: right;
}

.action-text {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.modern-card:hover .action-text {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .user-profile-card { flex-direction: column; gap: 15px; }
    .user-profile-divider { display: none; }
    .empresas-grid { grid-template-columns: 1fr; }
}

.header-section {
    text-align: center;
    margin-bottom: 30px; /* Reducido de 40px */
}

.header-section h3 {
    color: #93025b;
    font-size: 2rem; /* Reducido de 2.2rem */
    font-weight: 700;
    margin: 0;
    padding-bottom: 12px;
    position: relative;
    display: inline-block;
}

.header-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: #e6197a;
    border-radius: 2px;
}

.btn-filter {
    background-color: #93025b;
    color: white;
    border: none;
    padding: 14px 30px; /* Ajustado para igualar al botón de cancelar */
    border-radius: 10px; /* Bordes más redondeados para estilo profesional */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    height: 50px; /* Altura fija para ambos */
    line-height: 22px; /* Centrado de texto */
    box-sizing: border-box;
}

.btn-toggle-filters, .btn-action {
    background-color: #f8f9fa;
    color: #93025b;
    border: 1px solid #93025b;
    padding: 0 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    height: 42px;
    box-sizing: border-box;
    line-height: 1;
    width: max-content;
    margin: 0 !important;
}

.btn-toggle-filters:hover, .btn-action:hover {
    background-color: #93025b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(147, 2, 91, 0.15);
}

.btn-toggle-filters.active {
    background-color: #93025b;
    color: white;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.btn-verde {
    border-color: #28a745;
    color: #28a745;
}

.btn-verde:hover {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-rojo {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-rojo:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white !important;
}


.btn-pdf {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-pdf:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-filter:hover {
    background-color: #e6197a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(147, 2, 91, 0.2);
}

.btn-reset {
    background: #f1f1f1;
    color: #666 !important;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #ddd;
    height: 50px; /* Misma altura fija */
    line-height: 22px; /* Centrado de texto */
    box-sizing: border-box;
    cursor: pointer;
}

.btn-reset:hover {
    background: #e5e5e5;
    color: #333 !important;
    border-color: #ccc;
    transform: translateY(-2px);
}

