/* ═══════════════════════════════════════════════════════════
   GoDoWorks Client Portal — Design System
   Paleta CLAUDE.md raiz: #2C7BE5 / #1B2A4A
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    /* Marca */
    --gdw-blue:     #2C7BE5;
    --gdw-blue-700: #1F5BB8;
    --gdw-blue-100: #E8F0FC;
    --gdw-blue-50:  #F4F8FE;
    --gdw-navy:     #1B2A4A;
    --gdw-navy-600: #2D4070;

    /* Neutros */
    --gdw-bg:       #F8FAFC;
    --gdw-card:     #FFFFFF;
    --gdw-surface:  #F1F5F9;
    --gdw-border:   #E2E8F0;
    --gdw-border-strong: #CBD5E1;
    --gdw-text:     #0F172A;
    --gdw-text-2:   #475569;
    --gdw-text-3:   #94A3B8;

    /* Estados */
    --gdw-success: #10B981;
    --gdw-success-bg: #D1FAE5;
    --gdw-warning: #F59E0B;
    --gdw-warning-bg: #FEF3C7;
    --gdw-danger:  #EF4444;
    --gdw-danger-bg: #FEE2E2;
    --gdw-info:    #06B6D4;
    --gdw-info-bg: #CFFAFE;

    /* Geometria */
    --gdw-radius-sm: 8px;
    --gdw-radius:    12px;
    --gdw-radius-lg: 16px;

    /* Sombras */
    --gdw-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --gdw-shadow:    0 4px 12px rgba(27, 42, 74, .08);
    --gdw-shadow-md: 0 8px 24px rgba(27, 42, 74, .10);
    --gdw-shadow-lg: 0 16px 40px rgba(27, 42, 74, .14);

    /* Transiciones */
    --gdw-fast:  0.15s ease;
    --gdw-base:  0.25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset minimal ── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gdw-bg);
    color: var(--gdw-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* ── Tipografia ── */
h1, h2, h3, h4 { color: var(--gdw-navy); margin: 0; font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p  { margin: 0; color: var(--gdw-text-2); }
a  { color: var(--gdw-blue); text-decoration: none; transition: color var(--gdw-fast); }
a:hover { color: var(--gdw-blue-700); }

/* ── Botones ── */
.gdw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: var(--gdw-radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--gdw-fast);
    line-height: 1.2;
}
.gdw-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gdw-btn:focus-visible { outline: 3px solid var(--gdw-blue-100); outline-offset: 1px; }

.gdw-btn-primary {
    background: var(--gdw-blue);
    color: #fff;
}
.gdw-btn-primary:hover:not(:disabled) {
    background: var(--gdw-blue-700);
    box-shadow: 0 4px 14px rgba(44, 123, 229, .35);
    transform: translateY(-1px);
}

.gdw-btn-ghost {
    background: transparent;
    color: var(--gdw-text-2);
    border-color: var(--gdw-border);
}
.gdw-btn-ghost:hover:not(:disabled) {
    background: var(--gdw-surface);
    color: var(--gdw-text);
}

.gdw-btn-block { width: 100%; }

/* ── Inputs ── */
.gdw-field { display: flex; flex-direction: column; gap: 0.375rem; }
.gdw-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gdw-navy);
    letter-spacing: 0.01em;
}
.gdw-input {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1.5px solid var(--gdw-border);
    border-radius: var(--gdw-radius-sm);
    background: #fff;
    color: var(--gdw-text);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color var(--gdw-fast), box-shadow var(--gdw-fast);
}
.gdw-input:focus {
    outline: none;
    border-color: var(--gdw-blue);
    box-shadow: 0 0 0 4px rgba(44, 123, 229, .12);
}
.gdw-input::placeholder { color: var(--gdw-text-3); }
.gdw-input.is-error {
    border-color: var(--gdw-danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

/* ── Cards ── */
.gdw-card {
    background: var(--gdw-card);
    border-radius: var(--gdw-radius);
    box-shadow: var(--gdw-shadow);
    border: 1px solid var(--gdw-border);
}

/* ── Banners de mensaje ── */
.gdw-msg {
    padding: 0.75rem 1rem;
    border-radius: var(--gdw-radius-sm);
    font-size: 0.875rem;
    border: 1px solid transparent;
    display: none;
}
.gdw-msg.is-visible { display: block; }
.gdw-msg.is-error    { background: var(--gdw-danger-bg);  color: #7F1D1D; border-color: rgba(239, 68, 68, .25); }
.gdw-msg.is-success  { background: var(--gdw-success-bg); color: #065F46; border-color: rgba(16, 185, 129, .25); }
.gdw-msg.is-info     { background: var(--gdw-info-bg);    color: #155E75; border-color: rgba(6, 182, 212, .25); }
.gdw-msg.is-warning  { background: var(--gdw-warning-bg); color: #78350F; border-color: rgba(245, 158, 11, .25); }

/* ── Layout auth (set-password, reset-password) — epico simple ── */
.gdw-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 75% 50% at 50% 0%, rgba(44, 123, 229, .25) 0%, transparent 60%),
        linear-gradient(135deg, #0B1530 0%, #122546 35%, #1B2A4A 65%, #2D4070 100%);
}
.gdw-auth-shell::before,
.gdw-auth-shell::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.gdw-auth-shell::before {
    width: 420px;
    height: 420px;
    top: -10%;
    left: -8%;
    background: rgba(44, 123, 229, .35);
    animation: authGlow1 18s ease-in-out infinite alternate;
}
.gdw-auth-shell::after {
    width: 480px;
    height: 480px;
    bottom: -12%;
    right: -10%;
    background: rgba(99, 102, 241, .25);
    animation: authGlow2 22s ease-in-out infinite alternate;
}
@keyframes authGlow1 { to { transform: translate(60px, 80px); } }
@keyframes authGlow2 { to { transform: translate(-80px, -60px); } }

.gdw-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--gdw-card);
    padding: 2.75rem 2.25rem 2.25rem;
    border-radius: 20px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 24px 48px -12px rgba(15, 23, 42, .25),
        0 0 0 1px rgba(255, 255, 255, .8) inset;
    border: 1px solid rgba(15, 23, 42, .06);
    animation: authCardEnter .8s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes authCardEnter {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .gdw-auth-shell::before, .gdw-auth-shell::after, .gdw-auth-card { animation: none !important; }
}

@media (max-width: 540px) {
    .gdw-auth-card { padding: 2rem 1.5rem 1.75rem; border-radius: 16px; }
}

.gdw-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.75rem;
    justify-content: center;
}
.gdw-brand-svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 4px 10px rgba(44, 123, 229, .25));
}
/* Isotipo local. Antes apuntaba al GIF viejo en appv3.godoworks.com: era el
   logo anterior y además se descargaba de otro dominio en cada visita, así que
   si ese servidor no respondía el header quedaba sin marca. */
.gdw-brand-logo {
    width: 34px;
    height: 34px;
    background: url('/assets/gdw-iso.svg') center / contain no-repeat;
    flex-shrink: 0;
}
.gdw-brand-name {
    font-weight: 700;
    color: var(--gdw-navy);
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}
.gdw-brand-sub {
    font-size: 0.8125rem;
    color: var(--gdw-text-2);
    margin-left: 0.25rem;
}

.gdw-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gdw-navy);
    margin-bottom: 0.375rem;
    text-align: center;
}
.gdw-auth-sub {
    text-align: center;
    color: var(--gdw-text-2);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.gdw-form { display: flex; flex-direction: column; gap: 1rem; }
.gdw-form-foot {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gdw-text-2);
}
