/* W&W TECH - LOGIN PROFISSIONAL + SISTEMA MOBILE */

:root {
    --dark: #0f172a;
    --dark2: #111827;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --green: #16a34a;
    --red: #dc2626;
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --border: #d8e0ec;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

/* LOGIN */

.login-screen {
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .34), transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(6, 182, 212, .30), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #111827 48%, #1e3a8a 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 980px;
    min-height: 580px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 38px 120px rgba(0, 0, 0, .35);
    backdrop-filter: blur(18px);
}

.login-brand-side {
    position: relative;
    padding: 46px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-brand-side::before {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,99,235,.45), rgba(6,182,212,.24));
    right: -120px;
    top: -80px;
}

.login-brand-side::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 58px 58px;
    opacity: .5;
}

.brand-glass,
.brand-text,
.brand-badges {
    position: relative;
    z-index: 1;
}

.brand-glass {
    width: 210px;
    min-height: 110px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.brand-logo {
    max-width: 170px;
    max-height: 90px;
    object-fit: contain;
}

.brand-text span {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-text h1 {
    margin: 10px 0 12px;
    font-size: 46px;
    line-height: 1;
}

.brand-text p {
    margin: 0;
    max-width: 400px;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.6;
}

.brand-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.brand-badges div {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    padding: 14px;
}

.brand-badges strong {
    display: block;
    font-size: 18px;
}

.brand-badges small {
    color: #cbd5e1;
    font-weight: 700;
}

/* CARD LOGIN */

.login-card {
    background: #ffffff;
    padding: 54px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-logo {
    display: none;
    justify-content: center;
    margin-bottom: 18px;
}

.mobile-logo img {
    max-width: 180px;
    max-height: 95px;
    object-fit: contain;
}

.login-title {
    margin-bottom: 24px;
}

.login-title span {
    display: inline-block;
    color: var(--blue);
    background: #eff6ff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.login-title h2 {
    margin: 14px 0 0;
    color: var(--dark);
    font-size: 31px;
    line-height: 1.1;
}

label {
    display: block;
    margin: 14px 0 7px;
    color: var(--dark);
    font-weight: 900;
    font-size: 14px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0 14px;
    transition: .15s;
}

.input-group:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
    background: white;
}

.input-group span {
    width: 24px;
    text-align: center;
    opacity: .82;
}

.input-group input {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 16px 0;
    font: inherit;
    outline: none;
}

.btn-login {
    margin-top: 24px;
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, .28);
    transition: .18s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, .34);
}

.login-footer {
    text-align: center;
    margin-top: 18px;
    color: var(--muted);
    font-weight: 800;
}

/* BOTÕES SISTEMA */

.btn {
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    font-weight: 900;
    cursor: pointer;
    background: #e8edf5;
    color: var(--text);
    font-size: 15px;
}

.btn.primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
}

.btn.success {
    background: var(--green);
    color: white;
}

.btn.small {
    padding: 9px 12px;
    font-size: 13px;
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* APP */

.app {
    min-height: 100vh;
    padding-bottom: 34px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--dark);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header strong {
    display: block;
    font-size: 18px;
}

.app-header span {
    color: #cbd5e1;
    font-size: 13px;
}

.tabs {
    position: sticky;
    top: 62px;
    z-index: 9;
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 10px 12px;
    background: white;
    border-bottom: 1px solid var(--border);
}

.tabs button {
    min-width: max-content;
    border: 0;
    background: #eef4ff;
    color: var(--blue);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
}

.screen {
    display: none;
    padding: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.screen.active {
    display: block;
}

.welcome-card {
    background: linear-gradient(135deg, var(--dark), #1e3a8a);
    color: white;
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin: 10px 0 14px;
}

.welcome-card span {
    color: #93c5fd;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
}

.welcome-card h2 {
    margin: 8px 0;
    font-size: 28px;
}

.welcome-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.55;
}

.page-title {
    margin: 8px 0 16px;
}

.page-title h2 {
    margin: 0;
    color: var(--dark);
    font-size: 25px;
}

.page-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.card,
.ponto-card,
.report-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

.check-info {
    padding: 13px;
    background: #ecfeff;
    color: #155e75;
    border: 1px solid #a5f3fc;
    border-radius: 16px;
    margin-bottom: 14px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    font: inherit;
    background: white;
    outline: none;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.ponto-card.confirmed {
    opacity: 0.68;
}

.ponto-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.ponto-head h3 {
    margin: 0;
    color: var(--dark);
    font-size: 19px;
}

.ponto-card p,
.report-card p {
    color: var(--muted);
    margin: 8px 0;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.badge.photo {
    background: #fff7ed;
    color: #9a3412;
}

.badge.ok {
    background: #dcfce7;
    color: #166534;
}

.ref-img,
.ref-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin: 12px 0;
}

.ref-img {
    object-fit: cover;
}

.ref-placeholder {
    display: grid;
    place-items: center;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
    padding: 12px;
}

.preview {
    width: 100%;
    border-radius: 16px;
    margin-top: 10px;
    border: 1px solid var(--border);
}

.report-card h3 {
    margin: 0 0 6px;
}

.report-item {
    border-top: 1px solid var(--border);
    padding: 12px 0;
}

.report-item img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-top: 8px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(15, 23, 42, .75);
    padding: 16px;
    overflow: auto;
}

.modal-card {
    background: white;
    max-width: 760px;
    margin: 20px auto;
    border-radius: 22px;
    padding: 18px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    font-size: 24px;
    font-weight: 900;
}

/* RESPONSIVO */

@media (max-width: 820px) {
    .login-screen {
        padding: 18px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .login-wrapper {
        max-width: 430px;
        min-height: auto;
        display: block;
        border-radius: 28px;
        background: white;
        overflow: hidden;
    }

    .login-brand-side {
        display: none;
    }

    .login-card {
        padding: 30px 24px;
    }

    .mobile-logo {
        display: flex;
    }

    .login-title {
        text-align: center;
    }

    .login-title h2 {
        font-size: 28px;
    }
}

@media (min-width: 760px) {
    .screen {
        padding: 24px;
    }

    .app-header {
        padding: 16px 28px;
    }
}


/* BOTÃO TIRAR FOTO */

.camera-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.btn.camera {
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: white;
    margin-top: 12px;
}

.local-foto {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #155e75;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}


.camera-label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
}

.report-card .btn {
    margin-top: 10px;
}


/* CÂMERA DIRETA - SEM GALERIA */

.camera-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.camera-box {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}

.camera-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #0f172a;
}

.camera-top button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    font-size: 24px;
    font-weight: 900;
}

#cameraVideo {
    width: 100%;
    max-height: 68vh;
    background: #000;
    border-radius: 16px;
    object-fit: cover;
}

.btn.danger {
    background: #dc2626;
    color: white;
}

.report-card .btn.danger {
    margin-top: 8px;
}
