/* Login unificado PDV — portal, painel, mestre, garcom */
:root {
    --portal-bg-1: #050816;
    --portal-bg-2: #0c1a3a;
    --portal-accent: #e8b923;
    --portal-accent-2: #14b8a6;
    --portal-text: #f1f5f9;
    --portal-muted: #94a3b8;
    --portal-card: rgba(15, 23, 42, 0.72);
    --portal-border: rgba(148, 163, 184, 0.18);
    --portal-danger: #fca5a5;
    --portal-radius: 20px;
    --portal-shadow: 0 32px 80px rgba(2, 6, 23, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.portal-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: var(--portal-text);
    background: var(--portal-bg-1);
}

.portal-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(20, 184, 166, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 75%, rgba(232, 185, 35, 0.16), transparent 50%),
        linear-gradient(155deg, var(--portal-bg-1) 0%, var(--portal-bg-2) 52%, #0a1628 100%);
}

.portal-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
}

.portal-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.portal-card {
    width: min(440px, 100%);
    padding: 36px 32px 28px;
    border-radius: var(--portal-radius);
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    box-shadow: var(--portal-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.portal-card-head {
    text-align: center;
    margin-bottom: 28px;
}

.portal-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: #0f172a;
    background: linear-gradient(135deg, var(--portal-accent) 0%, #f5d76e 45%, var(--portal-accent-2) 100%);
    box-shadow: 0 8px 24px rgba(232, 185, 35, 0.25);
}

.portal-card-head h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.portal-card-head p {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: var(--portal-muted);
    line-height: 1.45;
}

.portal-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--portal-accent);
    background: rgba(232, 185, 35, 0.1);
    border: 1px solid rgba(232, 185, 35, 0.22);
}

.portal-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-label {
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.portal-label:first-of-type {
    margin-top: 0;
}

.portal-input,
.portal-select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.65);
    color: var(--portal-text);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.portal-input::placeholder {
    color: #64748b;
}

.portal-password-wrap {
    position: relative;
}

.portal-password-wrap .portal-input {
    padding-right: 76px;
}

.portal-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(30, 41, 59, 0.85);
    color: var(--portal-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.portal-password-toggle:hover {
    color: var(--portal-text);
    background: rgba(51, 65, 85, 0.95);
}

.portal-input:focus,
.portal-select:focus {
    outline: none;
    border-color: rgba(232, 185, 35, 0.55);
    box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.12);
    background: rgba(15, 23, 42, 0.9);
}

.portal-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.portal-select option {
    color: #0f172a;
    background: #fff;
}

.portal-error {
    margin: 12px 0 0;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--portal-danger);
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.portal-submit {
    margin-top: 20px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    color: #0f172a;
    background: linear-gradient(135deg, var(--portal-accent) 0%, #f0c94a 50%, #d4a017 100%);
    box-shadow: 0 10px 28px rgba(232, 185, 35, 0.28);
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.portal-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(232, 185, 35, 0.35);
}

.portal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.portal-pick {
    margin: 10px 0 4px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid var(--portal-border);
}

.portal-pick-title {
    margin: 0 0 10px;
    font-size: 0.86rem;
    color: var(--portal-muted);
}

.portal-pick-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-pick-btn,
.portal-pick-cancel {
    font: inherit;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--portal-border);
    background: rgba(15, 23, 42, 0.8);
    color: var(--portal-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.12s, background 0.12s;
}

.portal-pick-btn:hover {
    border-color: rgba(232, 185, 35, 0.45);
    background: rgba(30, 41, 59, 0.9);
}

.portal-pick-cancel {
    color: var(--portal-muted);
    background: transparent;
    text-align: center;
}

.portal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--portal-border);
}

.portal-chips span {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.portal-foot {
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--portal-muted);
    text-align: center;
}

.portal-foot a {
    color: var(--portal-accent);
    text-decoration: none;
}

.portal-foot a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .portal-card {
        padding: 28px 20px 22px;
    }

    .portal-card-head h1 {
        font-size: 1.35rem;
    }
}
