/* =========================================================
   VARIABLES SGAN
   ========================================================= */
:root {
    --tcf-primary:        #2ab8c8;
    --tcf-primary-dark:   #1e4a5a;
    --tcf-primary-light:  #eaf9fb;
    --tcf-accent:         #e8637a;
    --tcf-text:           #333333;
    --tcf-text-light:     #6b7280;
    --tcf-border:         #d0dde0;
    --tcf-border-focus:   #2ab8c8;
    --tcf-bg:             #f8fbfc;
    --tcf-radius:         5px;
    --tcf-shadow-focus:   rgba(42, 184, 200, 0.18);
}

/* =========================================================
   MENSAJES GLOBALES
   ========================================================= */
.tcf-message {
    padding: 11px 14px;
    margin-bottom: 14px;
    border-radius: var(--tcf-radius);
    font-size: 14px;
    line-height: 1.5;
}

.tcf-message-success {
    background: #edfaf4;
    color: #0d6e4a;
    border: 1px solid #7dd4b0;
}

.tcf-message-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================
   WRAPPER Y FILAS DEL FORMULARIO
   ========================================================= */
.tcf-form-wrapper {
    margin: 16px 0;
}

.tcf-form .tcf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 -6px 4px;
}

.tcf-form .tcf-col {
    padding: 0 6px;
    flex: 0 0 var(--tcf-col-width);
    max-width: var(--tcf-col-width);
    box-sizing: border-box;
}

/* =========================================================
   CAMPOS DEL FORMULARIO
   ========================================================= */
.tcf-field {
    margin-bottom: 14px;
}

.tcf-field input[type='text'],
.tcf-field input[type='email'],
.tcf-field input[type='tel'],
.tcf-field input[type='number'],
.tcf-field input[type='date'],
.tcf-field input[type='time'],
.tcf-field input[type='file'],
.tcf-field input[type='password'],
.tcf-field input[type='url'],
.tcf-field input[type='search'],
.tcf-field select,
.tcf-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    font-size: 15px;
    color: var(--tcf-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}

.tcf-field input:focus,
.tcf-field select:focus,
.tcf-field textarea:focus {
    border-color: var(--tcf-border-focus);
    outline: none;
    box-shadow: 0 0 0 3px var(--tcf-shadow-focus);
}

.tcf-label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tcf-primary-dark);
}

.tcf-required {
    color: var(--tcf-accent);
    margin-left: 2px;
}

.tcf-help {
    display: block;
    color: var(--tcf-text-light);
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.45;
}

.tcf-error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: 4px;
}

/* Separadores de sección dentro del formulario */
.tcf-field-section {
    border-top: 2px solid var(--tcf-primary);
    padding-top: 10px;
    margin-top: 6px;
}

.tcf-section-title {
    color: var(--tcf-primary-dark);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

/* Checkbox y radio */
.tcf-options-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tcf-option {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tcf-option input[type='checkbox'],
.tcf-option input[type='radio'] {
    accent-color: var(--tcf-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Honeypot */
.tcf-honeypot-wrap {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Botón de envío del formulario */
.tcf-submit-button {
    display: inline-block;
    padding: 11px 28px;
    background: var(--tcf-primary);
    color: #fff;
    border: none;
    border-radius: var(--tcf-radius);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s, transform 0.1s;
}

.tcf-submit-button:hover {
    background: var(--tcf-primary-dark);
}

.tcf-submit-button:active {
    transform: scale(0.98);
}

.tcf-submit-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .tcf-form .tcf-col {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* =========================================================
   LOGIN
   ========================================================= */
.tcf-login-wrap {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--tcf-border);
    border-top: 3px solid var(--tcf-primary);
    border-radius: var(--tcf-radius);
    padding: 28px 32px 24px;
    box-shadow: 0 2px 12px rgba(30, 74, 90, 0.07);
}

.tcf-login-form .tcf-field-wrap {
    margin-bottom: 16px;
}

.tcf-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tcf-primary-dark);
}

.tcf-input {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    font-size: 15px;
    color: var(--tcf-text);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tcf-input:focus {
    border-color: var(--tcf-border-focus);
    outline: none;
    box-shadow: 0 0 0 3px var(--tcf-shadow-focus);
}

.tcf-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    color: var(--tcf-text);
}

.tcf-field-checkbox input[type='checkbox'] {
    accent-color: var(--tcf-primary);
    width: 15px;
    height: 15px;
}

.tcf-btn {
    display: inline-block;
    padding: 11px 22px;
    border: none;
    border-radius: var(--tcf-radius);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.15s, transform 0.1s;
}

.tcf-btn-primary {
    background: var(--tcf-primary);
    color: #fff;
    width: 100%;
    text-align: center;
}

.tcf-btn-primary:hover {
    background: var(--tcf-primary-dark);
    color: #fff;
}

.tcf-btn-primary:active {
    transform: scale(0.98);
}

.tcf-btn[disabled],
.tcf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tcf-submit-wrap {
    margin-top: 10px;
}

.tcf-login-links {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: var(--tcf-text-light);
}

.tcf-login-links a {
    color: var(--tcf-primary);
    text-decoration: none;
    font-weight: 600;
}

.tcf-login-links a:hover {
    color: var(--tcf-primary-dark);
    text-decoration: underline;
}

.tcf-login-active,
.tcf-profile-login-required,
.tcf-message.tcf-info {
    padding: 10px 14px;
    background: var(--tcf-primary-light);
    color: var(--tcf-primary-dark);
    border: 1px solid #a0dde5;
    border-radius: var(--tcf-radius);
    margin-bottom: 12px;
    font-size: 14px;
}

.tcf-login-error {
    margin-bottom: 14px;
}

.tcf-ajax-message {
    padding: 10px 13px;
    border-radius: var(--tcf-radius);
    font-size: 14px;
    margin-top: 10px;
}

.tcf-ajax-message.tcf-message-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.tcf-ajax-message.tcf-message-success {
    background: #edfaf4;
    color: #0d6e4a;
    border: 1px solid #7dd4b0;
}

/* =========================================================
   PERFIL DE USUARIO
   ========================================================= */
.tcf-profile-wrapper {
    max-width: 680px;
    margin: 0 auto;
}

.tcf-profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--tcf-primary-light);
    border: 1px solid #a0dde5;
    border-radius: var(--tcf-radius);
}

.tcf-profile-avatar-section img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tcf-primary);
}

.tcf-profile-avatar-section .tcf-avatar-label {
    font-size: 14px;
    color: var(--tcf-text-light);
}

/* =========================================================
   DIRECTORIO DE USUARIOS
   ========================================================= */
.tcf-user-directory {
    margin: 16px 0;
}

.tcf-directory-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tcf-directory-search input[type="search"],
.tcf-directory-search input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 9px 13px;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tcf-directory-search input:focus {
    border-color: var(--tcf-border-focus);
    outline: none;
    box-shadow: 0 0 0 3px var(--tcf-shadow-focus);
}

.tcf-directory-search button,
.tcf-search-btn {
    padding: 9px 18px;
    background: var(--tcf-primary);
    color: #fff;
    border: none;
    border-radius: var(--tcf-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: background 0.15s;
}

.tcf-directory-search button:hover,
.tcf-search-btn:hover {
    background: var(--tcf-primary-dark);
}

.tcf-directory-count {
    margin-bottom: 16px;
    color: var(--tcf-text-light);
    font-size: 14px;
}

.tcf-no-results {
    padding: 24px;
    text-align: center;
    color: var(--tcf-text-light);
    background: var(--tcf-bg);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
}

/* Grid de cards */
.tcf-user-grid {
    display: grid;
    grid-template-columns: repeat(var(--tcf-dir-cols, 3), 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .tcf-user-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .tcf-user-grid { grid-template-columns: 1fr; }
}

.tcf-user-card {
    background: #fff;
    border: 1px solid var(--tcf-border);
    border-top: 3px solid var(--tcf-primary);
    border-radius: var(--tcf-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}

.tcf-user-card:hover {
    box-shadow: 0 4px 18px rgba(30, 74, 90, 0.1);
    transform: translateY(-2px);
}

.tcf-user-card-avatar {
    text-align: center;
    padding: 20px 20px 0;
}

.tcf-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tcf-primary);
}

.tcf-user-card-body {
    padding: 14px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tcf-user-display-name {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: var(--tcf-primary-dark);
}

.tcf-user-fields {
    margin: 0 0 14px;
    padding: 0;
}

.tcf-user-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    font-size: 14px;
}

.tcf-field-label {
    font-weight: 600;
    color: var(--tcf-primary-dark);
    margin-bottom: 2px;
}

.tcf-field-value {
    color: var(--tcf-text-light);
    word-break: break-word;
}

.tcf-user-profile-link {
    display: inline-block;
    margin-top: auto;
    padding: 8px 14px;
    background: var(--tcf-primary);
    color: #fff;
    border-radius: var(--tcf-radius);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: background 0.15s;
}

.tcf-user-profile-link:hover {
    background: var(--tcf-primary-dark);
    color: #fff;
}

/* =========================================================
   PAGINACIÓN
   ========================================================= */
.tcf-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 28px;
    justify-content: center;
}

.tcf-pagination a,
.tcf-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    font-size: 14px;
    text-decoration: none;
    color: var(--tcf-primary-dark);
    background: #fff;
    transition: background 0.12s, border-color 0.12s;
}

.tcf-pagination a:hover {
    background: var(--tcf-primary-light);
    border-color: var(--tcf-primary);
    color: var(--tcf-primary-dark);
}

.tcf-pagination .tcf-page-current {
    background: var(--tcf-primary);
    color: #fff;
    border-color: var(--tcf-primary);
    font-weight: 700;
    pointer-events: none;
}

.tcf-pagination .tcf-page-disabled {
    color: #d1d5db;
    pointer-events: none;
}
