/* PayPal Link Generator v2 — Frontend Styles */

*, *::before, *::after { box-sizing: border-box; }

.plg-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
    color: #2d3748;
}

.plg-wrap-full {
    max-width: 1100px;
    margin: 20px auto;
}

/* ── Login ─────────────────────────────────────── */
.plg-login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    max-width: 420px;
    margin: 60px auto;
}

/* ── Top Bar ────────────────────────────────────── */
.plg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.plg-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
}

.plg-logo-sm { font-size: 22px; }

/* ── Layout ─────────────────────────────────────── */
.plg-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 820px) {
    .plg-layout { grid-template-columns: 1fr; }
}

/* ── Panels ─────────────────────────────────────── */
.plg-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.plg-panel-title {
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

/* ── Form Fields ────────────────────────────────── */
.plg-header { text-align: center; margin-bottom: 24px; }
.plg-logo   { font-size: 44px; margin-bottom: 10px; }
.plg-header h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #1a202c; }
.plg-header p  { margin: 0; color: #718096; font-size: 13px; }

.plg-field { margin-bottom: 16px; }
.plg-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.plg-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #f7fafc;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.plg-field input:focus {
    border-color: #0070ba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,112,186,.12);
}

.plg-amount-wrap { position: relative; }
.plg-currency-symbol {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: #718096; font-size: 14px; font-weight: 600;
    pointer-events: none;
}
.plg-amount-wrap input { padding-left: 28px !important; }

.plg-required { color: #e53e3e; }
.plg-optional  { color: #a0aec0; font-weight: 400; text-transform: none; }

/* ── Buttons ────────────────────────────────────── */
.plg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .2s; padding: 10px 18px;
    line-height: 1;
}

.plg-btn-primary {
    width: 100%; background: #0070ba; color: #fff; margin-top: 4px; padding: 12px;
}
.plg-btn-primary:hover  { background: #005a94; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,112,186,.3); }
.plg-btn-primary:disabled { background: #a0aec0; cursor: not-allowed; transform: none; box-shadow: none; }

.plg-btn-secondary { width: 100%; background: #edf2f7; color: #4a5568; margin-top: 10px; padding: 10px; }
.plg-btn-secondary:hover { background: #e2e8f0; }

.plg-btn-copy { background: #2d3748; color: #fff; white-space: nowrap; flex-shrink: 0; padding: 9px 14px; font-size: 12px; border-radius: 6px; }
.plg-btn-copy:hover { background: #1a202c; }

.plg-btn-logout { background: none; color: #a0aec0; font-size: 12px; padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 6px; }
.plg-btn-logout:hover { color: #718096; background: #f7fafc; }

.plg-btn-refresh { background: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.plg-btn-refresh:hover { background: #edf2f7; }

/* ── Badges ─────────────────────────────────────── */
.plg-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.plg-badge-sandbox { background: #fef3c7; color: #92400e; }
.plg-badge-live    { background: #d1fae5; color: #065f46; }

/* ── Alerts ─────────────────────────────────────── */
.plg-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.plg-alert-error   { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; }
.plg-alert-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }

/* ── Result Box ─────────────────────────────────── */
.plg-result {
    margin-top: 20px; background: #f0fff4;
    border: 1.5px solid #9ae6b4; border-radius: 12px; padding: 18px;
}
.plg-result-header { font-size: 14px; font-weight: 700; color: #276749; margin-bottom: 8px; }
.plg-result-meta { font-size: 12px; color: #4a5568; margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.plg-result-meta strong { font-size: 17px; color: #2d3748; margin-top: 4px; }

.plg-link-box { display: flex; gap: 8px; align-items: center; }
.plg-link-box input {
    flex: 1; padding: 8px 10px; border: 1.5px solid #9ae6b4; border-radius: 6px;
    font-size: 11px; background: #fff; color: #2d3748; outline: none;
    overflow: hidden; text-overflow: ellipsis;
}
.plg-link-note { font-size: 11px; color: #718096; margin: 8px 0 0; }

/* ── Payments Table ─────────────────────────────── */
.plg-table-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.plg-table-header .plg-panel-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.plg-table-loading { text-align: center; padding: 30px; color: #718096; font-size: 13px; }

.plg-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}

.plg-table th {
    background: #f7fafc; border-bottom: 2px solid #e2e8f0;
    padding: 10px 12px; text-align: left;
    font-size: 11px; font-weight: 700; color: #718096;
    text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}

.plg-table td {
    padding: 11px 12px; border-bottom: 1px solid #f0f4f8;
    color: #2d3748; vertical-align: middle;
}

.plg-table tr:last-child td { border-bottom: none; }
.plg-table tr:hover td { background: #f7fafc; }

.plg-table .plg-amount-cell { font-weight: 700; font-family: monospace; font-size: 13px; }
.plg-table .plg-link-cell a  { color: #0070ba; font-size: 11px; text-decoration: none; word-break: break-all; }
.plg-table .plg-link-cell a:hover { text-decoration: underline; }

.plg-table .plg-date-cell { font-size: 11px; color: #718096; white-space: nowrap; }

.plg-table .plg-no-data { text-align: center; color: #a0aec0; padding: 30px; }

/* ── Status Badges ──────────────────────────────── */
.plg-status {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
}
.plg-status-pending   { background: #fef3c7; color: #92400e; }
.plg-status-approved  { background: #bee3f8; color: #2a69ac; }
.plg-status-completed { background: #c6f6d5; color: #276749; }
.plg-status-denied    { background: #fed7d7; color: #c53030; }
.plg-status-refunded  { background: #e9d8fd; color: #6b46c1; }
.plg-status-reversed  { background: #feebc8; color: #c05621; }
.plg-status-expired   { background: #edf2f7; color: #718096; }
.plg-status-cancelled { background: #edf2f7; color: #718096; }

/* ── Pagination ─────────────────────────────────── */
.plg-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.plg-page-btn {
    padding: 5px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
    background: #fff; color: #4a5568; font-size: 12px; cursor: pointer; font-weight: 600;
}
.plg-page-btn:hover    { background: #edf2f7; }
.plg-page-btn.active   { background: #0070ba; color: #fff; border-color: #0070ba; }
.plg-page-btn:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 480px) {
    .plg-login-card { padding: 24px 18px; }
    .plg-link-box   { flex-direction: column; }
    .plg-btn-copy   { width: 100%; }
}
