/* Portal Capicilin & Mutari — estilos públicos (login / recuperar senha)
   Paleta: roxo profundo + dourado + vidro; tipografia Inter */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

html,
body {
    margin: 0;
    min-height: 100%;
}

:root {
    --ap-purple-deep: #3d1b5d;
    --ap-purple-mid: #5c2d82;
    --ap-purple-soft: #7b4aa0;
    --ap-gold: #b89551;
    --ap-gold-light: #d4b978;
    --ap-bg-page: #f4f2f7;
    --ap-glass: rgba(255, 255, 255, 0.72);
    --ap-glass-border: rgba(255, 255, 255, 0.55);
    --ap-shadow: 0 24px 48px -12px rgba(61, 27, 93, 0.28), 0 12px 24px -8px rgba(0, 0, 0, 0.12);
}

.ap-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--ap-bg-page);
    animation: ap-fade-in 0.55s ease-out;
}

@keyframes ap-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Painel esquerdo — hero com foto + vinheta roxa */
.ap-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0;
    color: #fff;
    background: #2d1248;
}

/* Banner Capicilin Antiqueda (wide): na coluna 50% prioriza modelo + linha de produtos à esquerda da arte. */
.ap-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/img/login-hero.png?v=4');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 22% 42%;
    transform: scale(1.01);
    animation: ap-hero-ken 28s ease-in-out infinite alternate;
}

@keyframes ap-hero-ken {
    0% { transform: scale(1.01) translate(0, 0); }
    100% { transform: scale(1.035) translate(-0.6%, 0.35%); }
}

.ap-hero-vignette {
    position: absolute;
    inset: 0;
    /* Vinheta mais leve para preservar ouro/detalhes da nova arte; mantém legibilidade do texto. */
    background:
        linear-gradient(105deg, rgba(28, 10, 48, 0.82) 0%, rgba(61, 27, 93, 0.55) 38%, rgba(18, 8, 38, 0.82) 100%),
        radial-gradient(ellipse 95% 75% at 38% 42%, rgba(184, 149, 81, 0.12), transparent 55%),
        radial-gradient(circle at 12% 78%, rgba(184, 149, 81, 0.09), transparent 42%);
    pointer-events: none;
}

.ap-hero-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23ffffff' stroke-width='0.5'/%3E%3C/svg%3E");
    pointer-events: none;
}

.ap-hero-top-brand {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    padding: 1.85rem 1.5rem 0.35rem;
}

.ap-hero-mutari-logo {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.4));
}

.ap-hero-center {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 1.75rem 2rem;
    max-width: 26rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.ap-hero-kicker {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ap-gold-light);
    margin: 0 0 1rem;
}

.ap-hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.05rem, 3.5vw, 2.85rem);
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 1rem;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
}

.ap-hero-title-main {
    color: #fff;
}

.ap-hero-title-accent {
    color: var(--ap-gold);
    font-style: italic;
    font-weight: 700;
}

.ap-hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.85rem;
}

.ap-hero-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    max-width: 22rem;
}

.ap-hero-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem 0.85rem;
    align-items: start;
    padding: 1.15rem 1.25rem 2rem;
    margin: 0 auto;
    width: 100%;
    max-width: 34rem;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ap-hero-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
}

.ap-hero-pillar-icon {
    color: var(--ap-gold);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-hero-pillar-icon svg {
    width: 100%;
    height: 100%;
}

.ap-hero-pillar-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ap-gold-light);
    line-height: 1.25;
}

/* Painel direito — card */
.ap-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.ap-card {
    width: 100%;
    max-width: 440px;
    padding: 2rem 2rem 1.75rem;
    border-radius: 22px;
    background: var(--ap-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--ap-glass-border);
    box-shadow: var(--ap-shadow);
    animation: ap-slide-up 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ap-slide-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ap-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ap-logos img {
    height: 40px;
    width: auto;
}

.ap-logo-mutari-card {
    height: 34px;
    width: auto;
}

.ap-logos-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, rgba(61, 27, 93, 0.35), transparent);
}

.ap-brand-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ap-purple-deep);
    text-align: center;
    margin: 0 0 0.25rem;
}

.ap-brand-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ap-gold);
    text-align: center;
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.ap-intro {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.52);
    text-align: center;
    margin: 0 0 1.35rem;
}

.ap-hidden-field {
    display: none;
}

/* Inputs nativos estilo premium */
.ap-field {
    margin-bottom: 1rem;
}

.ap-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(61, 27, 93, 0.85);
    margin-bottom: 0.4rem;
}

.ap-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ap-input-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: rgba(61, 27, 93, 0.45);
    pointer-events: none;
    z-index: 1;
}

.ap-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.72rem 0.85rem 0.72rem 2.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    border-radius: 12px;
    border: 1px solid rgba(61, 27, 93, 0.14);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ap-input:focus {
    outline: none;
    border-color: var(--ap-purple-soft);
    box-shadow: 0 0 0 3px rgba(124, 58, 180, 0.15);
}

.ap-input-wrap.ap-password .ap-input {
    padding-right: 2.75rem;
}

.ap-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 16px;
    color: rgba(61, 27, 93, 0.45);
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}

.ap-eye:hover {
    background: rgba(61, 27, 93, 0.06);
    color: var(--ap-purple-deep);
}

.ap-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
    flex-wrap: wrap;
}

.ap-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: rgba(0, 0, 0, 0.58);
    cursor: pointer;
    user-select: none;
}

.ap-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--ap-purple-deep);
}

.ap-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ap-purple-mid);
    text-decoration: none;
    transition: color 0.2s;
}

.ap-link:hover {
    color: var(--ap-purple-deep);
    text-decoration: underline;
}

.ap-alert {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.35);
    background: rgba(220, 53, 69, 0.08);
    color: #842029;
}

.ap-alert-success {
    border-color: rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.08);
    color: #0f5132;
}

.ap-btn-primary {
    width: 100%;
    padding: 0.82rem 1rem;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--ap-purple-deep) 0%, var(--ap-purple-mid) 55%, var(--ap-purple-soft) 100%);
    box-shadow: 0 12px 28px -10px rgba(61, 27, 93, 0.65);
    transition: transform 0.18s, box-shadow 0.18s;
    margin-bottom: 0.65rem;
}

.ap-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px -10px rgba(61, 27, 93, 0.72);
}

.ap-btn-secondary {
    width: 100%;
    padding: 0.72rem 1rem;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--ap-purple-deep);
    background: transparent;
    border: 2px solid rgba(61, 27, 93, 0.35);
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 1.15rem;
}

.ap-btn-secondary:hover {
    border-color: var(--ap-purple-deep);
    background: rgba(61, 27, 93, 0.04);
}

.ap-footer-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.42);
    text-align: center;
    margin: 0;
}

.ap-footer-note strong {
    color: rgba(61, 27, 93, 0.65);
}

/* Recuperar senha — card único central */
.ap-shell-single {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(160deg, #f4f2f7 0%, #ebe4f2 45%, #f8f6fb 100%);
}

.ap-card-narrow {
    max-width: 420px;
}

/* Redefinir senha (Razor view MVC) — utilitários */
.ap-redefinir-hint {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.48);
    margin: 0 0 1rem;
}

.ap-field-error {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #842029;
    margin-top: 0.35rem;
}

.ap-forca-senha {
    min-height: 8px;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
}

.ap-forca-senha .fraca {
    color: #c45c26;
}

.ap-forca-senha .media {
    color: #b8860b;
}

.ap-forca-senha .forte {
    color: #198754;
}

/* Responsivo */
@media (max-width: 991px) {
    .ap-shell {
        grid-template-columns: 1fr;
    }

    .ap-hero {
        min-height: 280px;
    }

    /* Faixa mobile: composição central do banner (produtos + gota + ciência). */
    .ap-hero-bg {
        background-position: center 36%;
    }

    .ap-hero-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 22rem;
        gap: 1rem 0.75rem;
        padding-bottom: 1.5rem;
    }

    .ap-hero-title {
        font-size: clamp(1.65rem, 6vw, 2.25rem);
    }

    .ap-hero-body {
        font-size: 0.88rem;
    }
}

@media (max-width: 576px) {
    .ap-card {
        padding: 1.5rem 1.25rem;
        border-radius: 18px;
    }

    .ap-brand-title {
        font-size: 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ap-shell,
    .ap-card,
    .ap-hero-bg {
        animation: none !important;
    }
}
