@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    font-family: 'Poppins', sans-serif;
    --bg-dark: #0f0f0f;
    --bg-panel: rgba(20, 20, 20, 0.96);
    --bg-panel-soft: rgba(255, 255, 255, 0.04);
    --border: rgba(212, 175, 55, 0.18);
    --gold: #d4af37;
    --gold-soft: #f4c542;
    --gold-light: #ffd700;
    --text: #f1f1f1;
    --text-muted: #bdbdbd;
    --surface: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: radial-gradient(circle at top left, rgba(255, 211, 117, 0.06), transparent 18%),
                radial-gradient(circle at 80% 10%, rgba(212, 175, 55, 0.16), transparent 20%),
                linear-gradient(135deg, #0f0f0f 0%, #111111 45%, #141414 100%);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

body {
    -webkit-user-select: none;
    user-select: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 25%),
                radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.06), transparent 18%);
    pointer-events: none;
    z-index: 0;
}

input, select, textarea, button {
    -webkit-user-select: text;
    user-select: text;
}

input[type="text"],
input[type="number"],
select,
textarea {
    font-size: 16px;
}

.header {
    position: relative;
    overflow: hidden;
    margin: 24px auto 32px;
    padding: 40px 32px 48px;
    max-width: 1180px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    z-index: 1;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.14), transparent 22%),
                radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.05), transparent 16%);
}

.header::after {
    content: '';
    position: absolute;
    right: -10%;
    top: 10%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 52%);
    filter: blur(22px);
    pointer-events: none;
}

.logo-container {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.logo {
    width: 110px;
    height: 110px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 800;
    color: #0f0f0f;
    background: linear-gradient(135deg, #f4c542 0%, #ffd700 40%, #f7d55d 100%);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.header h1 {
    font-size: clamp(3rem, 4vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: 0.28rem;
    color: #ffffff;
    margin-bottom: 16px;
}

.header .tagline {
    color: var(--gold-soft);
    font-size: 1rem;
    letter-spacing: 0.08em;
    max-width: 780px;
    margin: 0 auto;
    font-weight: 500;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.main-screen {
    max-width: 760px;
    margin: 0 auto 44px;
    text-align: center;
    padding: 42px 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
}

.main-screen h2 {
    color: #ffffff;
    font-size: clamp(2.8rem, 4vw, 4.2rem);
    margin-bottom: 18px;
    letter-spacing: 0.08em;
}

.main-screen p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.menu-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.btn-main {
    min-width: 220px;
    border: none;
    border-radius: 999px;
    padding: 16px 30px;
    font-size: 1rem;
    font-weight: 700;
    color: #0d0d0d;
    background: linear-gradient(135deg, #d4af37 0%, #f4c542 45%, #ffd700 100%);
    box-shadow: 0 20px 45px rgba(212, 175, 55, 0.32);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 54px rgba(212, 175, 55, 0.42);
    filter: brightness(1.03);
}

.btn-contact {
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 16px 30px;
    font-weight: 600;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.menu-button-header {
    text-align: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 255, 255, 0.08));
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    margin: 24px auto;
    width: fit-content;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-button-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34);
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.form-section, .result-section {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 34px;
}

.form-section::before, .result-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 60%);
    border-radius: 28px;
}

.form-section h2, .result-section h2 {
    position: relative;
    color: #ffffff;
    font-size: 1.85rem;
    margin-bottom: 26px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #e6e6e6;
    font-weight: 600;
    font-size: 0.96rem;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #f1f1f1;
    font-family: inherit;
    font-size: 0.97rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.24);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.75);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.11);
    transform: translateY(-1px);
}

textarea {
    min-height: 110px;
}

select {
    cursor: pointer;
    appearance: none;
    color: #ffffff;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 18px;
    padding: 16px 48px 16px 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f1f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 20px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.05);
}

option {
    color: #ffffff;
    background: #121212;
}

select option {
    opacity: 1;
}

optgroup {
    color: #ffd700;
    font-weight: 700;
}

option:disabled {
    color: #ffffff;
    background: rgba(244, 197, 66, 0.18);
    font-weight: 700;
}

option:hover,
option:focus {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-group {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.checkbox-group label {
    display: block;
    color: #dcdcdc;
    font-size: 0.94rem;
    line-height: 1.55;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--gold);
}

.btn-calcular {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4af37 0%, #f4c542 40%, #ffd700 100%);
    color: #0f0f0f;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 24px 60px rgba(212, 175, 55, 0.32);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-calcular:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 68px rgba(212, 175, 55, 0.42);
    filter: brightness(1.02);
}

.btn-calcular:active {
    transform: translateY(-1px);
}

.medicao-header {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.lista-medicao {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.medicao-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 18px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.06);
}

.medicao-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.btn-remove-medicao {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-remove-medicao:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.medicao-empty {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.resultado-box {
    background: rgba(255, 255, 255, 0.06);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.06);
}

.resultado-box p {
    color: var(--gold-soft);
    font-size: 1rem;
    margin-bottom: 12px;
}

#resultado {
    font-size: clamp(2.2rem, 3vw, 3rem);
    color: var(--gold);
    font-weight: 800;
    margin-bottom: 12px;
}

#detalhes {
    font-size: 0.95rem;
    color: #d9d9d9;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 16px;
    margin-top: 16px;
}

#detalhes p {
    margin: 10px 0;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-pdf, .btn-whats {
    border-radius: 18px;
    padding: 16px 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-weight: 700;
    border: 1px solid transparent;
}

.btn-pdf {
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(255,255,255,0.08));
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(0,0,0,0.28);
}

.btn-whats {
    background: linear-gradient(135deg, rgba(37,211,102,0.2), rgba(18,140,126,0.15));
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.btn-whats:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(0,0,0,0.28);
}

.report-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.report-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.report-header {
    margin-bottom: 16px;
}

.status {
    background: rgba(255,255,255,0.08);
    color: #f1f1f1;
}

.btn-status {
    border-radius: 14px;
}

p, label, button, input, select, textarea {
    font-family: 'Poppins', sans-serif;
}

footer {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0 40px;
    font-size: 0.95rem;
}

@media (max-width: 1200px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px 40px;
    }
}

@media (max-width: 860px) {
    .header {
        padding: 32px 22px 36px;
    }

    .main-screen {
        padding: 32px 22px;
    }

    .form-section, .result-section {
        padding: 28px 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .header h1 {
        font-size: 2.6rem;
        letter-spacing: 0.14rem;
    }

    .btn-main, .btn-contact {
        width: 100%;
    }

    .menu-button-header {
        width: 100%;
    }
}

.btn-pdf:active, .btn-whats:active {
    transform: translateY(0);
}

footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 2px solid #f1c40f;
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-section, .result-section {
        padding: 20px;
        border-radius: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .header h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .header .tagline {
        font-size: 12px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
        padding: 14px;
    }
    
    .btn-calcular, .btn-pdf, .btn-whats {
        padding: 14px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    #resultado {
        font-size: 28px;
    }
}

/* Smartphones - Até 480px */
@media (max-width: 480px) {
    body {
        background: #1a1a1a;
    }
    
    .container {
        margin: 15px auto;
        padding: 0 10px;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section, .result-section {
        padding: 18px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .form-section h2, .result-section h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    
    .header {
        padding: 25px 12px;
        border-bottom: 3px solid #f1c40f;
    }
    
    .header h1 {
        font-size: 22px;
        margin: 12px 0 8px;
        letter-spacing: 1px;
    }
    
    .header .tagline {
        font-size: 11px;
        margin: 5px 0;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 7px;
    }
    
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
        padding: 14px;
        border: 2px solid #e0e0e0;
        border-radius: 6px;
        width: 100%;
    }
    
    input[type="text"]::placeholder,
    input[type="number"]::placeholder,
    textarea::placeholder {
        color: #999;
    }
    
    .btn-calcular, .btn-pdf, .btn-whats {
        padding: 14px;
        font-size: 14px;
        border-radius: 6px;
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .action-buttons {
        gap: 10px;
    }
    
    .resultado-box {
        padding: 18px;
        min-height: 140px;
    }
    
    #resultado {
        font-size: 26px;
        margin-bottom: 10px;
    }
    
    #detalhes {
        font-size: 12px;
    }
    
    #detalhes p {
        margin: 6px 0;
    }
    
    footer {
        padding: 15px;
        font-size: 12px;
    }
}

/* Ultra pequenos - Até 360px */
@media (max-width: 360px) {
    .header h1 {
        font-size: 18px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-section h2, .result-section h2 {
        font-size: 18px;
    }
    
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        padding: 12px;
        font-size: 15px;
    }
    
    #resultado {
        font-size: 24px;
    }
}

/* Landscapes - máximo de altura */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: 15px 12px;
    }
    
    .header h1 {
        margin: 8px 0 5px;
        font-size: 20px;
    }
    
    .container {
        margin: 10px auto;
        gap: 10px;
    }
    
    .form-section, .result-section {
        padding: 15px;
    }
}

/* iPad e tablets em modo landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
        gap: 25px;
    }
    
    .header h1 {
        font-size: 32px;
    }
}