/* Exam Mitra — Partner Portal premium UI */

.ap-shell {
    min-height: 100vh;
    background: #f1f5f9;
    font-family: 'Inter', system-ui, sans-serif;
}

.ap-topbar {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.ap-topbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.ap-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.ap-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.ap-brand-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.ap-brand-sub {
    font-size: 0.68rem;
    opacity: 0.75;
    display: block;
}

.ap-nav-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.35rem 0.65rem;
    margin-left: auto;
}

.ap-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
}

.ap-nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.ap-nav a:hover,
.ap-nav a.active {
    background: rgba(13, 148, 136, 0.35);
    color: #fff;
}

.ap-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.ap-commission-pill {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.ap-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.ap-page-head {
    margin-bottom: 1.5rem;
}

.ap-page-head h1 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem;
}

.ap-page-head p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.ap-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ap-stat {
    background: #fff;
    border-radius: 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.ap-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.ap-stat-value {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.ap-stat-value.accent { color: #0d9488; }
.ap-stat-value.gold { color: #b45309; }
.ap-stat-value.success { color: #059669; }

.ap-stat-highlight {
    background: linear-gradient(145deg, #0f766e, #0d9488);
    border: none;
    color: #fff;
}

.ap-stat-highlight .ap-stat-label { color: rgba(255, 255, 255, 0.85); }
.ap-stat-highlight .ap-stat-value { color: #fff; font-size: 2rem; }

.ap-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.ap-card-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ap-card-body { padding: 1.25rem; }

.ap-verify-banner {
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.ap-verify-banner.pending {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.ap-verify-banner.verified {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.ap-verify-banner.rejected {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.ap-verify-banner i { font-size: 1.5rem; flex-shrink: 0; }

.ap-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ap-quick-link {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.ap-quick-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12);
    border-color: #99f6e4;
    color: inherit;
}

.ap-quick-link .icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.ap-quick-link .icon.teal { background: #ccfbf1; color: #0f766e; }
.ap-quick-link .icon.blue { background: #dbeafe; color: #1d4ed8; }
.ap-quick-link .icon.amber { background: #fef3c7; color: #b45309; }

.ap-ref-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ap-ref-box input {
    flex: 1;
    min-width: 200px;
    border-radius: 0.65rem;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    background: #f8fafc;
}

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.65rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: filter 0.15s;
}

.ap-btn-primary {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
}

.ap-btn-primary:hover { filter: brightness(1.06); color: #fff; }

.ap-btn-outline {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.ap-btn-lg { padding: 0.75rem 1.25rem; font-size: 1rem; width: 100%; }

.ap-table-wrap { overflow-x: auto; }

.ap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ap-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ap-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
}

.ap-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ap-badge.success { background: #dcfce7; color: #166534; }
.ap-badge.warning { background: #fef3c7; color: #92400e; }
.ap-badge.danger { background: #fee2e2; color: #991b1b; }
.ap-badge.neutral { background: #f1f5f9; color: #475569; }

/* Apply form */
.ap-apply-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .ap-apply-grid { grid-template-columns: 320px 1fr; }
}

.ap-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 0.75rem;
}

.ap-type-card:hover { border-color: #99f6e4; background: #f0fdfa; }
.ap-type-card.selected { border-color: #0d9488; background: #f0fdfa; }

.ap-type-card input { display: none; }

.ap-type-card .rate {
    float: right;
    background: #0d9488;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.ap-verify-panel {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-top: 1rem;
}

.ap-verify-panel h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f766e;
}

.ap-verify-checks {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.ap-verify-checks li {
    padding: 0.25rem 0 0.25rem 1.25rem;
    position: relative;
}

.ap-verify-checks li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #0d9488;
    font-weight: 700;
}

.ap-form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.ap-form-control {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    background: #fff;
}

.ap-form-control:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.ap-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Partner login — auth shell variant */
.auth-shell-partner .auth-shell-brand {
    background: linear-gradient(145deg, #0f172a 0%, #134e4a 45%, #0f766e 100%);
}

.auth-shell-partner .auth-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.auth-shell-partner .auth-card {
    max-width: 420px;
    width: 100%;
}

.auth-shell-partner .auth-shell-form {
    background: #f8fafc;
    flex: 1;
    max-width: none;
}

@media (max-width: 991px) {
    .ap-nav-toggle { display: inline-flex; }
    .ap-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 0.5rem;
    }
    .ap-nav.open { display: flex; }
    .ap-topbar-inner { flex-wrap: wrap; }
    .ap-topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    .ap-commission-pill { font-size: 0.72rem; }
}

@media (max-width: 575px) {
    .ap-stat-grid { grid-template-columns: 1fr 1fr; }
    .ap-stat-highlight { grid-column: 1 / -1; }
}
