/* ============================================================
   LLC Reseller Dashboard – Front-End Styles
   Target: [llc_reseller_dashboard] shortcode output
   ============================================================ */

/* ── Base ─────────────────────────────────────────────────── */
.llc-dashboard,
.llc-login-notice {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 0 40px;
    color: #1a1a2e;
}

/* ── Cards ────────────────────────────────────────────────── */
.llc-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.llc-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.llc-card--header {
    background: linear-gradient(135deg, #0c2461 0%, #1e3a8a 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.llc-card--info {
    background: #f0f9ff;
    border-color: #bae6fd;
    font-size: .92rem;
    color: #0c4a6e;
    padding: 14px 20px;
}

.llc-card--info p { margin: 0; }

/* ── Header card content ───────────────────────────────────── */
.llc-header-info { flex: 1; min-width: 0; }
.llc-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #ffffff;
}
.llc-biz {
    font-size: .9rem;
    color: #bfdbfe;
    margin: 0 0 10px;
}
.llc-badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.llc-header-qr {
    text-align: center;
    flex-shrink: 0;
}
.llc-header-qr img {
    display: block;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    margin-bottom: 8px;
}

/* ── Referral link copy ────────────────────────────────────── */
.llc-copy-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.llc-copy-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: .85rem;
    color: #374151;
    background: #f9fafb;
    min-width: 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.llc-btn {
    display: inline-block;
    background: #1e3a8a;
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}
.llc-btn:hover { background: #1e40af; color: #fff !important; }
.llc-btn--sm { padding: 5px 12px; font-size: .78rem; }

/* ── Stats grid ────────────────────────────────────────────── */
.llc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.llc-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.llc-stat-card--warn  { border-top: 3px solid #f59e0b; }
.llc-stat-card--success { border-top: 3px solid #10b981; }

.llc-stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.2;
    margin-bottom: 4px;
}
.llc-stat-label {
    display: block;
    font-size: .75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Table ────────────────────────────────────────────────── */
.llc-table-wrap { overflow-x: auto; }
.llc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.llc-table th,
.llc-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.llc-table th {
    font-weight: 600;
    color: #374151;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #f9fafb;
}
.llc-table tr:last-child td { border-bottom: none; }

/* Status badges */
.llc-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
}
.llc-status--unpaid  { background: #fef3c7; color: #92400e; }
.llc-status--paid    { background: #d1fae5; color: #065f46; }

.llc-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px 0;
    font-size: .92rem;
}

/* ── Login notice ─────────────────────────────────────────── */
.llc-login-notice {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}
.llc-login-notice p { color: #6b7280; margin-bottom: 16px; }

/* ── Responsive ───────────────────────────────────────────── */
@media ( max-width: 640px ) {
    .llc-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .llc-card--header { flex-direction: column; align-items: flex-start; }
    .llc-header-qr { display: flex; align-items: center; gap: 12px; }
    .llc-header-qr img { width: 70px; height: 70px; margin-bottom: 0; }
    .llc-copy-wrap { flex-direction: column; align-items: stretch; }
    .llc-btn { text-align: center; }
}

/* ============================================================
   Admin Styles (only load in wp-admin)
   ============================================================ */
.llc-admin-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0 28px;
}
.llc-admin-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 24px;
    min-width: 140px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.llc-admin-stat--warn  { border-top: 3px solid #f59e0b; }
.llc-admin-stat--ok    { border-top: 3px solid #10b981; }
.llc-admin-stat__val   { display: block; font-size: 1.5rem; font-weight: 700; color: #1e3a8a; }
.llc-admin-stat__lbl   { display: block; font-size: .75rem; color: #64748b; margin-top: 2px; }

.llc-url-field  { width: 220px; font-size: .8rem; padding: 3px 6px; }

.llc-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
}
.llc-status-badge--unpaid { background: #fef3c7; color: #92400e; }
.llc-status-badge--paid   { background: #d1fae5; color: #065f46; }

.llc-reseller-list td { vertical-align: middle; }
