/* RemotoSisbot - Tema TI / Rede */

:root {
    --bg-deep: #060d18;
    --bg-panel: rgba(10, 22, 40, 0.85);
    --bg-card: rgba(15, 30, 55, 0.9);
    --border: rgba(0, 212, 255, 0.2);
    --border-focus: rgba(0, 212, 255, 0.6);
    --cyan: #00d4ff;
    --cyan-dim: #0099bb;
    --green: #00ff88;
    --text: #e8f4fc;
    --text-muted: #7a9bb8;
    --danger: #ff4d6a;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    --radius: 14px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --header-h: 58px;
    --footer-h: 42px;
}

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

html, body {
    height: 100%;
}

body.page-app {
    height: 100vh;
    overflow: hidden;
}

/* Shell: topo + corpo rolável + rodapé fixos */
.site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
}

.site-header {
    flex: 0 0 var(--header-h);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(6, 13, 24, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 40;
}

.site-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.site-header-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 0;
}

.site-header-user {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-right: 0.25rem;
    max-width: min(38vw, 260px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.site-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.22) transparent;
}

.site-body::-webkit-scrollbar {
    width: 6px;
}

.site-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.22);
    border-radius: 4px;
}

.site-footer {
    flex: 0 0 var(--footer-h);
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(6, 13, 24, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    z-index: 40;
}

.site-footer-meta {
    color: var(--cyan-dim);
    font-variant-numeric: tabular-nums;
}

.brand-icon-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--cyan), #0066aa);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
    flex-shrink: 0;
}

.brand-icon-sm svg {
    width: 20px;
    height: 20px;
}

.brand-icon-sm svg path {
    fill: #fff;
}

.site-header-brand .brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-header-brand .brand-name span {
    color: var(--cyan);
}

.btn-sm {
    width: auto;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
}

body.page-login {
    height: 100vh;
    overflow: hidden;
}

body.page-signup .site-body {
    overflow-y: auto;
}

body.page-signup .page {
    height: auto;
    min-height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text);
    overflow-x: hidden;
}

/* Fundo animado */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(0, 100, 180, 0.15), transparent),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(0, 212, 255, 0.08), transparent),
        radial-gradient(ellipse 50% 40% at 60% 80%, rgba(0, 255, 136, 0.05), transparent),
        var(--bg-deep);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}

/* Layout principal */
.page {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: grid;
    grid-template-columns: 1fr minmax(340px, 400px);
}

/* Hero / imagem */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.75rem;
    flex-shrink: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--cyan), #0066aa);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
}

.brand-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-name span {
    color: var(--cyan);
}

.hero-image-wrap {
    position: relative;
    max-width: 580px;
    max-height: 38vh;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow), 0 0 80px rgba(0, 212, 255, 0.08);
    flex-shrink: 0;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(0, 212, 255, 0.06));
    pointer-events: none;
}

.hero-text {
    margin-top: 1.5rem;
    max-width: 520px;
    flex-shrink: 1;
    min-height: 0;
}

.hero-text h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-text h1 em {
    font-style: normal;
    color: var(--cyan);
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.features {
    display: flex;
    gap: 1rem 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* Painel de acesso (canto direito) */
.access-panel {
    background: linear-gradient(180deg, rgba(8, 18, 32, 0.95), rgba(6, 13, 24, 0.98));
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    position: relative;
    min-height: 100%;
    overflow: visible;
}

.access-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--cyan), transparent 40%, var(--cyan-dim));
    opacity: 0.5;
    pointer-events: none;
}

.access-card {
    width: 100%;
    max-width: 340px;
    padding: 0.25rem 0;
    overflow: visible;
}

.access-header {
    margin-bottom: 1.25rem;
}

.access-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.access-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Formulário */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    pointer-events: none;
    transition: fill 0.2s;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.65rem;
    background: rgba(0, 20, 40, 0.75);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 28, 52, 0.95) inset;
    box-shadow: 0 0 0 1000px rgba(0, 28, 52, 0.95) inset;
    border: 1px solid var(--border-focus);
    transition: background-color 9999s ease-out;
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.form-group input:focus + svg,
.input-wrap:focus-within svg {
    fill: var(--cyan);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #0088cc);
    color: #001020;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--border-focus);
    margin-top: 0.75rem;
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.08);
}

.btn-danger {
    background: rgba(255, 77, 106, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 77, 106, 0.4);
}

.btn-danger:hover {
    background: rgba(255, 77, 106, 0.25);
}

/* Botões compactos — depois de .btn para vencer width:100% */
.btn-sm,
.site-header-nav .btn,
.painel-toolbar .btn,
.pc-actions .btn,
.viewer-actions .btn,
.modal-box .btn {
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.site-header-nav .btn-danger {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.form-footer {
    margin-top: 1.15rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.form-footer a {
    color: var(--cyan);
    text-decoration: none;
}

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

.label-opt {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: 0.7;
}

.access-panel-scroll {
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    overflow: visible;
}

/* Alertas */
.alert {
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(255, 77, 106, 0.12);
    border: 1px solid rgba(255, 77, 106, 0.35);
    color: #ff8fa3;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--green);
}

/* Sessão logada */
.user-session {
    text-align: center;
}

.user-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #0066aa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #001020;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.user-session .user-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-session .user-email {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--green);
    margin-bottom: 1.75rem;
}

/* Responsivo */
@media (max-width: 960px) {
    .page {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .access-panel {
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .access-panel::before {
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--cyan), transparent, var(--cyan-dim));
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .site-header,
    .site-footer {
        padding: 0 1rem;
    }

    .site-header-nav {
        gap: 0.45rem;
    }

    .site-header-user {
        display: none;
    }
}
