:root {
    --tx-primary: #1d4459;
    --tx-primary-hover: #163545;
    --tx-accent: #7ac1c3;
    --tx-text: #1d4459;
    --tx-muted: #6f7a83;
    --tx-card-bg: #ededed;
    --tx-input-border: #c4cdd2;
    --tx-input-border-focus: #1d4459;
    --tx-error: #d83a3a;
    --tx-success: #1f7a4d;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: var(--tx-text);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.tx-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.tx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: #ffffff;
}

.tx-header__logo img {
    height: 56px;
    width: auto;
}

.tx-header__nav {
    color: var(--tx-text);
    font-size: 0.95rem;
}

.tx-header__nav a {
    color: var(--tx-text);
    text-decoration: underline;
    font-weight: 600;
}

.tx-header__nav a:hover {
    color: var(--tx-primary-hover);
}

/* Main */
.tx-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tx-card {
    width: 100%;
    max-width: 460px;
    background: var(--tx-card-bg);
    border-radius: 12px;
    padding: 2.5rem 2.75rem;
}

.tx-card__title {
    color: var(--tx-primary);
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 1.75rem 0;
}

/* Form fields - Material Design style (underline) */
.tx-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.tx-field label {
    display: block;
    color: var(--tx-text);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.tx-field input[type="email"],
.tx-field input[type="text"],
.tx-field input[type="password"] {
    width: 100%;
    padding: 0.55rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--tx-input-border);
    color: var(--tx-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.tx-field input:focus {
    border-bottom-color: var(--tx-input-border-focus);
    border-bottom-width: 2px;
}

.tx-field--password input {
    padding-right: 2rem;
}

.tx-field__toggle {
    position: absolute;
    right: 0;
    bottom: 0.45rem;
    background: none;
    border: 0;
    color: var(--tx-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.tx-field__toggle:hover {
    color: var(--tx-primary);
}

/* Options row (checkbox + recover link) */
.tx-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.25rem 0 1.5rem 0;
    font-size: 0.92rem;
}

.tx-form-options label {
    color: var(--tx-text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

.tx-form-options input[type="checkbox"] {
    accent-color: var(--tx-primary);
    width: 16px;
    height: 16px;
}

.tx-form-options a {
    color: var(--tx-text);
    text-decoration: none;
}

.tx-form-options a:hover {
    text-decoration: underline;
}

.tx-form-options--single {
    justify-content: flex-start;
}

/* Form validation errors (rendered by Symfony form_errors) */
.tx-field ul,
.tx-card form > ul {
    margin: 0.35rem 0 0 0;
    padding-left: 0;
    list-style: none;
    color: var(--tx-error);
    font-size: 0.85rem;
}

.tx-field ul li,
.tx-card form > ul li {
    margin: 0.15rem 0;
}

/* Primary button (pill) */
.tx-btn-primary {
    display: block;
    width: 100%;
    background: var(--tx-primary);
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tx-btn-primary:hover {
    background: var(--tx-primary-hover);
}

.tx-btn-outline {
    display: inline-block;
    border: 1px solid var(--tx-primary);
    color: var(--tx-primary);
    background: transparent;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    font-weight: 600;
}

.tx-btn-outline:hover {
    background: var(--tx-primary);
    color: #ffffff;
}

/* Google button + divider */
.tx-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--tx-muted);
    font-size: 0.85rem;
    margin: 1.25rem 0;
}

.tx-divider::before,
.tx-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--tx-input-border);
}

.tx-divider::before { margin-right: 0.75rem; }
.tx-divider::after { margin-left: 0.75rem; }

.tx-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.tx-btn-google:hover {
    background: #f7f8f8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tx-btn-google svg {
    flex-shrink: 0;
}

/* Tools list (Herramientas index) */
.tx-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tx-tools-list li {
    margin-bottom: 0.75rem;
}

.tx-tools-list a {
    display: block;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--tx-input-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--tx-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tx-tools-list a:hover {
    border-color: var(--tx-primary);
    box-shadow: 0 2px 6px rgba(29, 68, 89, 0.08);
}

.tx-tools-list a.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.tx-tools-list a strong {
    display: block;
    font-size: 1.05rem;
    color: var(--tx-primary);
}

.tx-tools-list a span {
    display: block;
    font-size: 0.88rem;
    color: var(--tx-muted);
    margin-top: 0.2rem;
}

/* File input styling for tx-field */
.tx-field input[type="file"] {
    width: 100%;
    padding: 0.45rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--tx-input-border);
    color: var(--tx-text);
    font-size: 0.95rem;
}

/* Cuadre section heading */
.tx-section-title {
    color: var(--tx-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.75rem 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--tx-primary);
}

/* Cuadre comparison table */
.tx-cuadre-meta {
    background: #f5f7f9;
    border: 1px solid var(--tx-input-border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.tx-cuadre-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.tx-cuadre-table th,
.tx-cuadre-table td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid #e1e6ea;
}

.tx-cuadre-table th {
    background: var(--tx-primary);
    color: #ffffff;
    font-weight: 600;
}

.tx-cuadre-table .tx-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tx-cuadre-table .tx-row-ok td {
    background: #f5fbf7;
}

.tx-cuadre-table .tx-row-bad td {
    background: #fdf2f2;
}

.tx-cuadre-table .tx-row-bad .tx-diff {
    color: var(--tx-error);
    font-weight: 700;
}

.tx-cuadre-table .tx-row-ok .tx-diff {
    color: var(--tx-success);
}

.tx-status {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tx-status--ok  { color: var(--tx-success); }
.tx-status--bad { color: var(--tx-error); }

/* Info / note box (light blue, for instructional content under forms) */
.tx-info-box {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: #eaf4fb;
    border: 1px solid #b8ddf5;
    border-radius: 6px;
    color: #154360;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Helper text */
.tx-help {
    color: var(--tx-muted);
    font-size: 0.88rem;
    margin: 0.5rem 0 1rem 0;
}

.tx-link-row {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.92rem;
}

.tx-link-row a {
    color: var(--tx-primary);
    font-weight: 600;
}

/* Alerts */
.tx-alert {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.tx-alert--error {
    background: #fde8e8;
    color: var(--tx-error);
    border: 1px solid #f5c2c2;
}

.tx-alert--success {
    background: #e6f4ec;
    color: var(--tx-success);
    border: 1px solid #b9dfca;
}

/* Footer */
.tx-footer {
    text-align: center;
    padding: 1.25rem 1rem;
    color: var(--tx-muted);
    font-size: 0.85rem;
    background: #ffffff;
}

/* Override Symfony form theme spacing for our card */
.tx-card form > div,
.tx-card form .mb-3 {
    margin-bottom: 1.25rem;
}

.tx-card .form-label {
    color: var(--tx-text);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.tx-card .form-control {
    width: 100%;
    padding: 0.55rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--tx-input-border);
    border-radius: 0;
    color: var(--tx-text);
    font-size: 1rem;
    box-shadow: none;
}

.tx-card .form-control:focus {
    border-bottom-color: var(--tx-input-border-focus);
    border-bottom-width: 2px;
    outline: none;
    box-shadow: none;
}

.tx-card .form-check-input {
    accent-color: var(--tx-primary);
}

.tx-card .invalid-feedback,
.tx-card .form-error-message,
.tx-card ul.list-unstyled {
    color: var(--tx-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
