/* Visum CRM — Customer Portal Styles (vcp-* prefix) */

.vcp-wrap {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #1e293b;
}

/* ── Login ──────────────────────────────────────────────────────────────── */
.vcp-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.vcp-login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(15,23,42,.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
}

.vcp-login-logo {
    margin-bottom: 20px;
}
.vcp-login-logo .vcp-logo-img {
    height: 32px;
    width: auto;
}

.vcp-login-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.vcp-login-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 28px;
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.vcp-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}
.vcp-alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* ── Form fields ────────────────────────────────────────────────────────── */
.vcp-form .vcp-field {
    margin-bottom: 16px;
}
.vcp-form .vcp-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.vcp-form .vcp-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.vcp-form .vcp-field input:focus {
    border-color: #134686;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.vcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, border-color .2s, color .2s;
    text-decoration: none;
    white-space: nowrap;
}
.vcp-btn:active { transform: translateY(1px); }
.vcp-btn:disabled { opacity: .6; cursor: not-allowed; }

.vcp-btn-primary {
    background: #134686;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(19,70,134,.14);
}
.vcp-btn-primary:hover { background: #1a5bae; color: #fff; }

.vcp-btn-outline {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    padding: 8px 16px;
    font-size: 13px;
}
.vcp-btn-outline:hover { border-color: #94a3b8; color: #334155; }

.vcp-btn-sm {
    padding: 6px 14px;
    font-size: 12.5px;
    border-radius: 8px;
}

.vcp-btn-full {
    width: 100%;
    margin-top: 8px;
}

.vcp-btn-dl {
    background: #e8f1fd;
    color: #134686;
    border: 1px solid #d0e3fa;
    padding: 6px 14px;
    font-size: 12.5px;
    border-radius: 8px;
}
.vcp-btn-dl:hover { background: #d0e3fa; }

.vcp-btn-loader { display: none; }

/* ── Portal wrap ────────────────────────────────────────────────────────── */
.vcp-portal-wrap {
    max-width: 960px;
    margin: 36px auto;
    padding: 0 20px 60px;
}

/* ── Portal header ──────────────────────────────────────────────────────── */
.vcp-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.vcp-portal-greeting {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vcp-greeting-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.vcp-greeting-fin {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
}

/* ── Bonus card ─────────────────────────────────────────────────────────── */
.vcp-bonus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(130deg, #134686 0%, #1a5bae 100%);
    border-radius: 18px;
    padding: 22px 26px;
    box-shadow: 0 6px 24px rgba(19,70,134,.22);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.vcp-bonus-card::after {
    content: '';
    position: absolute;
    right: -30px; bottom: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}

.vcp-bonus-left { position: relative; z-index: 1; }

.vcp-bonus-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.65);
    margin-bottom: 6px;
}

.vcp-bonus-amount {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    margin-bottom: 10px;
}

.vcp-bonus-currency {
    font-size: 16px;
    font-weight: 600;
    opacity: .8;
}

.vcp-bonus-rate {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vcp-bonus-rate-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
}

.vcp-bonus-rate-badge.standard {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.vcp-bonus-rate-badge.loyal {
    background: #fbbf24;
    color: #78350f;
}

.vcp-bonus-hint {
    font-size: 12px;
    color: rgba(255,255,255,.6);
}

.vcp-bonus-icon {
    width: 56px;
    height: 56px;
    color: rgba(255,255,255,.4);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.vcp-bonus-icon svg {
    width: 100%;
    height: 100%;
}

/* ── ID cards + Bonus card row ──────────────────────────────────────────── */
.vcp-id-bonus-row {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.vcp-id-bonus-row .vcp-passports {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.vcp-id-bonus-row .vcp-bonus-card {
    flex: 1;
    min-width: 0;
    width: auto;
    flex-shrink: 1;
    margin-bottom: 0;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 700px) {
    .vcp-id-bonus-row {
        flex-direction: column;
    }
    .vcp-id-bonus-row .vcp-bonus-card {
        width: 100%;
    }
}

/* ── Passport cards ─────────────────────────────────────────────────────── */
.vcp-passports {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.vcp-pp-card {
    background: linear-gradient(145deg, #0f2a5e 0%, #1a3f8f 60%, #0f2a5e 100%);
    border-radius: 18px;
    padding: 22px 22px 14px;
    color: #e8f0fe;
    box-shadow: 0 8px 28px rgba(10,30,80,.25);
    position: relative;
    overflow: hidden;
}

.vcp-pp-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}

.vcp-pp-card.vcp-pp-main {
    background: linear-gradient(145deg, #0d2550 0%, #134686 60%, #0d2550 100%);
}

.vcp-pp-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.vcp-pp-logo svg {
    width: 36px;
    height: 36px;
    display: block;
    flex-shrink: 0;
}

.vcp-pp-brand {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #bfdbfe;
}

.vcp-pp-doc-type {
    font-size: 10px;
    color: rgba(200,220,255,.55);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.vcp-pp-name {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: .04em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.vcp-pp-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
    margin-bottom: 18px;
}

.vcp-pp-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vcp-pp-lbl {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(147,197,253,.75);
}

.vcp-pp-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.vcp-pp-mono {
    font-family: 'Courier New', monospace;
    letter-spacing: .06em;
    font-size: 13px;
}

.vcp-pp-exp-warn  { color: #fcd34d; }
.vcp-pp-exp-danger { color: #f87171; }

.vcp-pp-mrz {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 8.5px;
    color: rgba(200,220,255,.45);
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    letter-spacing: .05em;
}

/* ── Pipeline card ──────────────────────────────────────────────────────── */
.vcp-pipeline-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(15,23,42,.04);
}

.vcp-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 16px;
}

/* Per-app row inside pipeline card */
.vcp-pl-app {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}
.vcp-pl-app:last-child { border-bottom: 0; padding-bottom: 0; }
.vcp-pl-app:first-child { padding-top: 0; }

.vcp-pl-app-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.vcp-pl-app-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* Step row */
.vcp-pl-steps {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.vcp-pl-steps::-webkit-scrollbar { display: none; }

/* Connector line between steps */
.vcp-pl-line {
    flex: 1;
    min-width: 16px;
    height: 2px;
    background: #e2e8f0;
    margin-top: 13px;
    flex-shrink: 0;
}
.vcp-pl-line.done { background: #16a34a; }

/* Step circle + label */
.vcp-pl-step-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    max-width: 80px;
    flex-shrink: 0;
}

.vcp-pl-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    flex-shrink: 0;
}
.vcp-pl-dot.done { background: #16a34a; }

.vcp-pl-step-lbl {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
    word-break: break-word;
    max-width: 72px;
}

.vcp-pl-step-date {
    font-size: 9.5px;
    color: #16a34a;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.vcp-badge, .vcp-badge-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.vcp-badge-status { background: #f1f5f9; color: #475569; }
.vcp-badge-green  { background: #dcfce7; color: #15803d; }
.vcp-badge-red    { background: #fee2e2; color: #dc2626; }
.vcp-badge-yellow { background: #fef9c3; color: #a16207; }
.vcp-badge-gray   { background: #f1f5f9; color: #475569; }
.vcp-badge-warn   { background: #ffedd5; color: #c2410c; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.vcp-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-height: 46px;
}
.vcp-tabs::-webkit-scrollbar { display: none; }

.vcp-tab {
    padding: 10px 18px;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: transparent;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.vcp-tab:hover { color: #134686; }

.vcp-tab.active {
    color: #134686;
    border-bottom-color: #134686;
}

.vcp-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    background: #e2e8f0;
    color: #475569;
}

.vcp-tab-badge.vcp-badge-warn { background: #ffedd5; color: #c2410c; }

.vcp-tab-content { display: none; }
.vcp-tab-content.active { display: block; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.vcp-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.04);
}

.vcp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.vcp-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.vcp-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}

.vcp-table tbody tr:last-child { border-bottom: 0; }
.vcp-table tbody tr:hover { background: #f8fafc; }

.vcp-table tbody td {
    padding: 12px 16px;
    color: #334155;
    vertical-align: middle;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.vcp-empty {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* ── Contracts list ─────────────────────────────────────────────────────── */
.vcp-contracts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vcp-contract-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 1px 4px rgba(15,23,42,.04);
}

.vcp-contract-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vcp-contract-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.vcp-contract-date {
    font-size: 12px;
    color: #64748b;
}

.vcp-contract-signed-date {
    font-size: 12px;
    color: #15803d;
    font-weight: 600;
}

.vcp-contract-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.vcp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vcp-modal-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15,23,42,.18);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vcp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.vcp-modal-ttl {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.vcp-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    font-family: inherit;
}
.vcp-modal-close:hover { background: #e2e8f0; }

.vcp-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.vcp-contract-preview {
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    max-height: 220px;
    overflow-y: auto;
    background: #f8fafc;
    margin-bottom: 20px;
}

.vcp-contract-loading {
    color: #94a3b8;
    font-style: italic;
    font-size: 13px;
}

.vcp-contract-body h3.vcp-contract-h {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
}

.vcp-sig-section {
    margin-bottom: 16px;
}

.vcp-sig-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.vcp-sig-canvas-wrap {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    cursor: crosshair;
    overflow: hidden;
}

#vcp-sig-canvas {
    display: block;
    width: 100%;
    height: 150px;
    touch-action: none;
}

.vcp-sig-actions {
    margin-top: 8px;
}

/* ── Success alert ──────────────────────────────────────────────────────── */
.vcp-alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

/* ── Country link in tables ─────────────────────────────────────────────── */
.vcp-country-link {
    color: #134686;
    text-decoration: none;
    font-weight: 600;
}
.vcp-country-link:hover { text-decoration: underline; }

/* ── Profile / Employment card ──────────────────────────────────────────── */
.vcp-profile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(15,23,42,.04);
}

.vcp-form-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .vcp-form-grid2 { grid-template-columns: 1fr; }
}

/* ── Contract doc preview (embedded in modal) ───────────────────────────── */
.vcp-contract-preview .vcp-cdoc {
    font-size: 10pt;
    line-height: 1.15;
}
.vcp-contract-preview .vcp-cdoc .signatures {
    display: block;
}
.vcp-contract-preview .vcp-cdoc .sig-block {
    margin-bottom: 16px;
}
