/* Portal CSS — dùng chung cho login, register, dashboard */

/* --- Wrap --- */
.cp-portal-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #f5f7fa;
    font-family: "Exo 2", Sans-serif;
}

.cp-portal-wrap__dashborad {
    align-items: flex-start;
    padding-top: 32px;
}

.cp-portal-wrap__dashborad .cp-info-card label {
    font-size: 11px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.cp-info-card__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cp-info-card__item:last-child {
    grid-column:1/-1;
}

.cp-info-card__text {
    margin: 10px 0 0;
}

.cp-portal-wrap__dashborad__inr {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.cp-portal-wrap__dashborad__policies {
    font-size: 1em;
    font-weight: 700;
    color: #444;
    margin: 0 0 12px;
}

/* --- Box --- */
.cp-portal-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    padding: 40px 48px;
    width: 100%;
    max-width: 440px;
}

@media (max-width: 480px) {
    .cp-portal-box { padding: 28px 20px; }
}

/* --- Logo --- */
.cp-portal-logo {
    text-align: center;
    margin-bottom: 24px;
}
.cp-portal-logo img { max-height: 60px; width: auto; }
.cp-portal-logo h2  { font-size: 1.4em; margin: 0; color: #333; }

/* --- Title --- */
.cp-portal-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 12px;
}
.cp-portal-subtitle {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 0 0 24px;
}

/* --- Steps (register) --- */
.cp-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}
.cp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cp-step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    background: #e9ecef; color: #aaa;
    transition: background .2s, color .2s;
}
.cp-step.active .cp-step-num { background: #1b3281; color: #fff; }
.cp-step.done   .cp-step-num { background: #00a32a; color: #fff; }
.cp-step-label { font-size: 11px; color: #888; white-space: nowrap; }
.cp-step.active .cp-step-label { color: #1b3281; font-weight: 600; }
.cp-step-line {
    flex: 1; height: 2px;
    background: #e9ecef;
    min-width: 40px; margin: 0 8px 16px;
}

/* --- Alert --- */
.cp-alert {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.cp-alert a { font-weight: 600; }
.cp-alert-error   { background: #fce4ec; color: #b71c1c; border-left: 3px solid #e53935; }
.cp-alert-success { background: #e8f5e9; color: #2e7d32; border-left: 3px solid #43a047; }
.cp-alert-info    { background: #e3f2fd; color: #1565c0; border-left: 3px solid #1e88e5; }

/* --- Form --- */
.cp-portal-form { margin-top: 8px; }

.cp-form-group {
    margin-bottom: 16px;
}
.cp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
}
.cp-form-group input[type="tel"],
.cp-form-group input[type="text"],
.cp-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.cp-form-group input:focus {
    outline: none;
    border-color: #1b3281;
    box-shadow: 0 0 0 3px rgba(34,113,177,.12);
}

/* PIN input wrap */
.cp-input-pin-wrap {
    position: relative;
}
.cp-input-pin-wrap input {
    padding-right: 44px !important;
    letter-spacing: 4px;
    font-size: 18px !important;
}
.cp-toggle-pin {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; font-size: 16px;
    padding: 4px; line-height: 1;
}

.cp-field-hint {
    font-size: 11px;
    color: #999;
    margin: 4px 0 0;
}

.cp-form-row {
    margin-bottom: 16px;
}
.cp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

/* --- Button --- */
.cp-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-align: center;
    text-decoration: none;
}
.cp-btn:active { transform: scale(.98); }
.cp-btn-primary {
    background: #1b3281;
    color: #fff;
}
.cp-btn-primary:hover { background: #ED9D19; color: #fff; }
.cp-btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.cp-btn-secondary:hover { background: #e0e0e0; }

/* --- Footer link --- */
.cp-portal-footer-link {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 20px;
    margin-bottom: 0;
}
.cp-portal-footer-link a { color: #1b3281; font-weight: 600; text-decoration: none; }
.cp-portal-footer-link a:hover { text-decoration: underline; }

/* --- Dashboard --- */
.cp-dashboard-header {
    background: linear-gradient(135deg, #1b3281 0%, #135e96 100%);
    color: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.cp-dashboard-header h2 { margin: 0; font-size: 1.3em; }
.cp-dashboard-header p  { margin: 4px 0 0; font-size: 13px; opacity: .85; }
.cp-logout-btn {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.cp-logout-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

.cp-info-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.cp-info-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.cp-policy-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.cp-policy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.cp-policy-title { font-size: 1.1em; font-weight: 700; color: #1a1a1a; margin: 0; }
.cp-policy-number { font-size: 12px; color: #999; margin: 10px 0 0; }

.cp-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.cp-status-Active    { background: #e8f5e9; color: #2e7d32; }
.cp-status-Inactive  { background: #e3f2fd; color: #1565c0; }
.cp-status-Expired   { background: #fce4ec; color: #b71c1c; }
.cp-status-Cancelled { background: #f5f5f5; color: #616161; }

.cp-policy-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.cp-meta-item label {
    display: block;
    font-size: 11px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.cp-meta-item span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.cp-doc-list { list-style: none; padding: 0; margin: 0; }
.cp-doc-list li {
    border-top: 1px solid #f0f0f0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cp-doc-list li:first-child { border-top: none; }
.cp-doc-icon { font-size: 18px; }
.cp-doc-title { flex: 1; font-size: 14px; color: #333; }
.cp-doc-download {
    background: #1b3281;
    color: #fff;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.cp-doc-download:hover { background: #135e96; color: #fff; }

.cp-no-policy {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
.cp-no-policy .cp-no-policy-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.cp-no-policy__contact {
    font-size: 13px;
    margin-top: 10px;
}