* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: #F0F4FF;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 0;
}

.header {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.header h1 {
    color: #00479d;
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 14px;
}

.header .version-badge {
    display: inline-block;
    /* background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); */
    background: #24a9be;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}



.calc-nav {
    background: #fff;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

.calc-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calc-nav-logo {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff, #22D3EE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calc-nav-title {
    font-size: 14px;
    color: var(--text);
    padding-left: 16px;
    border-left: 1px solid var(--text);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00479d;
    font-size: 13px;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .2);
    transition: all .2s;
}

.back-btn:hover {
    background: #00479d;
    color: #fff;
}

.main-grid {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.unlock-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    /* background: linear-gradient(135deg, #2563eb, #3B82F6); */
    background: #00479d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .35);
    margin: 30px auto 0;
}

.unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, .45);
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex: 1;
    height: min-content;
}

.panel-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 3px solid #667eea; */
    border-bottom: 3px solid #00479d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title .icon {
    font-size: 24px;
    width: auto;
    height: auto;
    margin: 0;
}

.input-section {
    margin-bottom: 25px;
}

.input-section-title {
    font-size: 13px;
    font-weight: 600;
    /* color: #667eea; */
    /* color: #00479d; */
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #00479d;
    padding: 6px 10px;
    border-radius: 6px;
}

.title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fa-chevron-down {
    transition: all .5s;
    cursor: pointer;
}

.fa-chevron-down.active {
    transform: rotate(180deg);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    grid-auto-rows: auto;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group input,
.input-group select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    /* border-color: #667eea; */
    border-color: #00479d;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-unit {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.result-card .label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.result-card .value {
    font-size: 28px;
    font-weight: bold;
}

.result-card .unit {
    font-size: 14px;
    opacity: 0.8;
    margin-left: 5px;
}

.chart-container {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 280px;
}

.status-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.full-width {
    grid-column: 1 / -1;
}

.input-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.input-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1600px) {
    .main-grid {
        flex-wrap: wrap;
    }

    .input-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel {
        width: 100%;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }
}

.k0-audit {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.k0-audit-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 10px;
}

.k0-audit-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #ffc107;
    font-size: 13px;
}

.k0-audit-item:last-child {
    border-bottom: none;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.info-box {
    background: #e7f3ff;
    border: 1px solid #b6d4fe;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 12px;
    /* color: #084298; */
    color: #00479d;
}


.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
    animation: modalIn .35s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: #00479d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .35);
}

.modal-box h3 {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.modal-box p {
    font-size: 14px;
    color: #64748B;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 28px;
}

.modal-form-group {
    margin-bottom: 16px;
}

.modal-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all .2s;
}

.modal-input:focus {
    outline: none;
    border-color: #00479d;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.modal-input.error {
    border-color: #DC2626;
}

.modal-submit-btn {
    width: 100%;
    padding: 13px;
    background: #00479d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .35);
    margin-top: 8px;
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, .45);
}

.modal-privacy {
    text-align: center;
    font-size: 11.5px;
    color: #64748B;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.send-code-btn {
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: #00479d;
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    min-width: 100px;
}

.send-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
}

.code-row {
    display: flex;
    gap: 10px;
}

.code-row .modal-input {
    flex: 1;
}

.unlock-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
}

.unlock-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #00479d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .3);
}

.unlock-prompt h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.unlock-prompt p {
    color: #00479d;
    font-size: 14px;
    max-width: 320px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.results-area {
    display: none;
}