* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation - legacy (NavMenu unused) */
.navbar-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.navbar-links a:hover {
    color: white;
}

.navbar-user {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Container */
/* Note: container is provided by Bootstrap for public pages */

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-secondary {
    background: #fff;
    color: #333;
    border-color: #ccc;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Forms */
.form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}



/* Dialog */
.dialog {
    border: none;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    position: fixed;
    inset: 0;
    margin: auto;
}

.dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.alert-danger {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}

.text-danger {
    color: #c62828;
    font-size: 0.85rem;
}

.text-warning {
    color: #e65100;
}

.text-muted {
    color: #666;
    font-size: 0.85rem;
}

.table-budget td {
    text-align: right;
    padding: 0.5rem 0.75rem;
}

.table-budget th {
    text-align: right;
    padding: 0.5rem 0.75rem;
}

.table-budget td:first-child,
.table-budget th:first-child {
    text-align: left;
}

/* Confirm delete */
.confirm-delete {
    max-width: 500px;
}

.confirm-delete p {
    margin-bottom: 1rem;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Hour editor dialog */
.hour-dialog {
    border: none;
    border-radius: 8px;
    padding: 2rem;
    min-width: 320px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hour-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.hour-dialog h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.hour-dialog .form-group {
    margin-bottom: 1rem;
}

.hour-dialog .form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.hour-dialog .form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    min-width: 320px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.modal-content .form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .table {
        font-size: 0.8rem;
    }
}

/* Plan selection cards */
.plan-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.plan-card {
    flex: 1;
    min-width: 200px;
    padding: 1.25rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.plan-card input[type="radio"] {
    display: none;
}

.plan-card:has(input[type="radio"]:checked) {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.plan-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.plan-card:has(input[type="radio"]:checked):hover {
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.plan-card h4 {
    margin: 0 0 0.5rem;
    color: #1a73e8;
}

.plan-price {
    font-size: 1.25rem;
    margin: 0.5rem 0;
}

.plan-price span {
    font-size: 0.85rem;
    color: #666;
}

.plan-desc {
    font-size: 0.9rem;
    color: #555;
    margin: 0.5rem 0;
}

.plan-limit {
    font-size: 0.8rem;
    color: #888;
    margin: 0.25rem 0;
}

/* Checkout page */
.checkout-info {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.checkout-info h2 {
    margin: 0 0 0.5rem;
}

/* Empresa cards */
.empresa-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.empresa-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.empresa-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.empresa-cif {
    color: #666;
    font-size: 0.85rem;
}

.empresa-details {
    margin-bottom: 0.75rem;
}

.empresa-field {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.empresa-row {
    display: flex;
    gap: 1.5rem;
}

.empresa-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Empleados grid */
.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.horas-excedidas {
    color: #dc3545 !important;
    font-weight: 600;
}

tr.horas-excedidas {
    background-color: #fff5f5;
}

td.horas-excedidas {
    background-color: #fff5f5;
}

/* Dashboard */
.dashboard-title {
    margin-bottom: 1rem;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.widget-icon {
    font-size: 2rem;
    line-height: 1;
}

.widget-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.widget-label {
    font-size: 0.85rem;
    color: #666;
}

.widget-primary .widget-value { color: #0d6efd; }
.widget-success .widget-value { color: #198754; }
.widget-info .widget-value { color: #0dcaf0; }
.widget-warning .widget-value { color: #fd7e14; }

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
}

.dashboard-card h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

/* Horizontal bars */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-label {
    width: 100px;
    font-size: 0.85rem;
    text-align: right;
    flex-shrink: 0;
}

.chart-bar-track {
    flex: 1;
    height: 1.25rem;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
    min-width: 2px;
}

.chart-bar-primary { background: #0d6efd; }

.chart-value {
    width: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

/* Vertical bars */
.chart-bars-h {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 140px;
    padding-top: 1rem;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-v-track {
    width: 100%;
    max-width: 32px;
    flex: 1;
    background: #f0f0f0;
    border-radius: 4px 4px 0 0;
    display: flex;
    flex-direction: column-reverse;
    min-height: 2px;
}

.chart-bar-v {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
    min-height: 2px;
}

.chart-bar-info { background: #0dcaf0; }

.chart-label-v {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.25rem;
}

.chart-value-v {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    margin-top: 0.15rem;
}

@media (max-width: 768px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

/* Status badges */
.estado-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.estado-planificacion { background: #e2e3f5; color: #4a4e8c; }
.estado-activo { background: #d1e7dd; color: #0a5e2a; }
.estado-pausa { background: #fff3cd; color: #856404; }
.estado-finalizado { background: #cff4fc; color: #055160; }
.estado-cancelado { background: #f8d7da; color: #842029; }

/* Budget summary */
.budget-summary {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    max-width: 400px;
    margin-left: auto;
}

.budget-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.budget-summary-total {
    border-top: 2px solid #adb5bd;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

.budget-summary-value {
    font-variant-numeric: tabular-nums;
}

/* Budget table cells */
.budget-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Alert */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-link {
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
}

/* Payment result */
.pago-resultado {
    max-width: 480px;
    margin: 3rem auto;
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
}

.pago-exitoso {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0a5e2a;
}

.pago-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.pago-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #0a5e2a;
    color: #fff;
    font-size: 2rem;
    line-height: 64px;
    text-align: center;
}

.pago-icon-error {
    background: #842029;
}

/* ===== Landing page ===== */
.landing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.landing-hero {
    text-align: center;
    padding: 5rem 1rem 4rem;
}

.landing-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.landing-hero-sub {
    font-size: 1.15rem;
    color: #555;
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.landing-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    border-radius: 6px;
}

.landing-section {
    padding: 4rem 0;
    text-align: center;
}

.landing-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.landing-section-sub {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.landing-feature {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.landing-feature:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.landing-feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.landing-feature h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.landing-feature p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.landing-plans {
    background: #fff;
    border-radius: 12px;
    margin: 2rem 0;
    padding: 3rem 1.5rem;
}

.landing-plan-cards {
    justify-content: center;
}

.landing-plan-card {
    max-width: 320px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
}

.landing-cta {
    text-align: center;
    padding: 4rem 1rem;
    margin: 2rem 0 3rem;
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #fff;
    border-radius: 12px;
}

.landing-cta h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.landing-cta p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.landing-cta .btn {
    background: #fff;
    color: #1a73e8;
    border-color: #fff;
}

.landing-cta .btn:hover {
    background: #f0f4ff;
    border-color: #f0f4ff;
    color: #1557b0;
}

@media (max-width: 640px) {
    .landing-hero h1 {
        font-size: 1.75rem;
    }
    .landing-features {
        grid-template-columns: 1fr;
    }
}

/* Checkout confirmation card */
.checkout-card {
    max-width: 480px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.checkout-header {
    background: #1a73e8;
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}

.checkout-header h2 {
    margin: 0 0 0.5rem;
    color: #fff;
}

.checkout-header .plan-price {
    margin: 0;
    font-size: 1.5rem;
}

.checkout-header .plan-price span {
    color: rgba(255,255,255,0.8);
}

.checkout-body {
    padding: 1.5rem;
}

.checkout-desc {
    color: #555;
    margin-bottom: 0.75rem;
}

.checkout-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.95rem;
}

.checkout-summary p {
    margin: 0.35rem 0;
}

.checkout-footer {
    padding: 0 1.5rem 1.5rem;
}

.checkout-secure {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin: 0.75rem 0 0;
}

/* Error boundary */
.error-boundary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.error-boundary-content {
    text-align: center;
    max-width: 500px;
}

.error-boundary-content h1 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-boundary-content p {
    color: #555;
    margin-bottom: 1rem;
}

/* Pending payment bar */
.pending-payment-bar {
    background: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: 0.6rem 1rem;
    text-align: center;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pending-payment-bar a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
}

.pending-payment-bar a:hover {
    color: #533f03;
}

/* ==========================================================================
   Modo oscuro: Bootstrap y Radzen (CSS sin @layer) pisan las utilidades
   dark: de Tailwind (que van en @layer utilities) en la cascada de capas.
   Estas reglas van sin capa y con mayor especificidad para restaurar el
   aspecto oscuro de la landing.
   ========================================================================== */




/* Logo: the three-bar mark on a flat indigo tile, plus the wordmark (Components/UI/LogoMarca.razor, LogoEmeproy.razor).
   Same design as the public website. */
.logo-marca {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 0.6rem;
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.logo-marca svg {
    width: 100%;
    height: 100%;
}

.logo-marca.logo-marca-sidebar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
}

.logo-texto {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111827;
}

.logo-texto-acento {
    color: #4f46e5;
}

.dark .logo-texto {
    color: #fff;
}

.dark .logo-texto-acento {
    color: #a5b4fc;
}
