* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f4f6fa; color: #1a1f36; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: #3b5bdb; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
    background: #1a1f36;
    color: #fff;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header h1 { font-size: 20px; margin: 0; font-weight: 600; }
header nav a { color: #cdd4ff; margin-left: 18px; font-size: 14px; }
header nav a:hover { color: #fff; }
header .partner-badge { color: #a8b4ff; font-size: 13px; margin-left: 18px; padding-left: 18px; border-left: 1px solid #3a4370; }
header .partner-badge.empty { display: none; }

main { max-width: 960px; margin: 28px auto; padding: 0 20px; }

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(30, 41, 87, 0.08);
}
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card .subtitle { color: #5a6382; font-size: 13px; margin-bottom: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: #2a3050; }
label .req { color: #e03131; }
input[type="text"], input[type="tel"], textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4d9e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fdfdff;
    transition: border-color 0.15s;
}
input:focus, textarea:focus { border-color: #3b5bdb; outline: none; background: #fff; }
textarea { resize: vertical; min-height: 72px; }

.form-row { margin-bottom: 14px; }

button {
    background: #3b5bdb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
button:hover:not(:disabled) { background: #2d48b8; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
button.secondary { background: #eef1fb; color: #3b5bdb; }
button.secondary:hover:not(:disabled) { background: #dde3f8; }

.result { margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13px; display: none; }
.result.ok { background: #e6f7ec; color: #1c7837; display: block; }
.result.err { background: #fdecec; color: #b82626; display: block; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid #e3e7f3; }
.tab { padding: 10px 16px; cursor: pointer; font-size: 14px; color: #5a6382; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: #3b5bdb; border-bottom-color: #3b5bdb; font-weight: 500; }

.drop-zone {
    border: 2px dashed #c5ccdf;
    border-radius: 10px;
    padding: 28px;
    text-align: center;
    color: #5a6382;
    font-size: 14px;
    transition: all 0.15s;
    cursor: pointer;
}
.drop-zone:hover, .drop-zone.dragover { border-color: #3b5bdb; background: #f5f7ff; color: #3b5bdb; }
.drop-zone input[type="file"] { display: none; }

.bulk-summary { font-size: 13px; color: #2a3050; margin: 10px 0; }
.bulk-log {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e3e7f3;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-family: "SF Mono", Monaco, Menlo, monospace;
    background: #fafbfc;
    margin-top: 12px;
    display: none;
}
.bulk-log .ln-ok { color: #1c7837; }
.bulk-log .ln-err { color: #b82626; }

code, pre { font-family: "SF Mono", Monaco, Menlo, Consolas, monospace; }
pre {
    background: #1a1f36;
    color: #e3e7f3;
    padding: 14px 18px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.55;
}
code.inline {
    background: #eef1fb;
    color: #2a3050;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e3e7f3; }
th { color: #5a6382; font-weight: 500; background: #f9fafd; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.dashboard {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 14px 0 18px;
}
.dashboard .kpi-total {
    background: #1a1f36;
    color: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 140px;
}
.dashboard .kpi-total .num {
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
}
.dashboard .kpi-total .lbl {
    color: #a8b4ff;
    font-size: 12px;
    margin-top: 4px;
}
.dashboard .kpi {
    background: #fff;
    border: 1px solid #e3e7f3;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dashboard .kpi .num {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f36;
}
.dashboard .kpi .lbl {
    font-size: 12px;
    color: #5a6382;
}
.dashboard .kpi .pipe {
    font-size: 11px;
    color: #8791ab;
}
.dashboard .kpi .color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.08);
}
.dashboard .pipeline-group {
    flex-basis: 100%;
    color: #5a6382;
    font-size: 12px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed #e3e7f3;
}

.progress {
    height: 6px;
    background: #e3e7f3;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
    display: none;
}
.progress .bar { height: 100%; background: #3b5bdb; width: 0%; transition: width 0.2s; }

footer { text-align: center; color: #8791ab; font-size: 12px; padding: 20px 0 30px; }
footer .legal { display: block; margin-top: 6px; color: #6b7390; font-size: 12px; }
footer .legal strong { color: #2a3050; font-weight: 600; }
