/* ============================================================
   MIN Smart Affiliate System — Frontend Styles v1.1
   ============================================================ */

/* ---- Shared form elements ---- */
.min-aff-login-wrap label,
.min-aff-wd-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 12px 0 4px;
    color: #333;
}

.min-aff-login-wrap input[type="text"],
.min-aff-login-wrap input[type="password"],
.min-aff-wd-form input[type="text"],
.min-aff-wd-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.min-aff-login-wrap input:focus,
.min-aff-wd-form input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}

.min-aff-inline-label {
    display: flex !important;
    align-items: center;
    gap: 7px;
    font-weight: 500 !important;
    color: #555 !important;
    margin-top: 10px !important;
}
.min-aff-inline-label input[type="checkbox"] { width: auto; margin: 0; }

/* ---- Buttons ---- */
.min-aff-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
}
.min-aff-btn:hover  { background: #333; color: #fff; }
.min-aff-btn:active { transform: scale(.98); }

.min-aff-btn-full {
    width: 100%;
    margin-top: 16px;
    text-align: center;
    box-sizing: border-box;
}

/* ---- Links row (login page) ---- */
.min-aff-login-links {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
    text-align: center;
}
.min-aff-login-links a { color: #111; text-decoration: underline; }
.min-aff-login-links a:hover { color: #555; }

/* ---- Standalone login wrap ---- */
.min-aff-login-wrap {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 32px 36px 28px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
    font-family: 'Inter', system-ui, sans-serif;
}

/* ---- Alerts ---- */
.min-aff-alert {
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.min-aff-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.min-aff-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ---- Affiliate Dashboard shell ---- */
.min-aff-dashboard {
    font-family: 'Inter', system-ui, sans-serif;
    max-width: 920px;
}

/* ---- Stats row ---- */
.min-aff-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.min-aff-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

.min-aff-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    font-weight: 600;
}

.min-aff-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    word-break: break-all;
}

.min-aff-stat-sub { font-size: 12px; color: #6b7280; }

.min-aff-stat .min-aff-copy {
    margin-top: 10px;
    align-self: flex-start;
    background: #f3f4f6;
    color: #111;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.min-aff-stat .min-aff-copy:hover { background: #e5e7eb; }

/* ---- Referral link box ---- */
.min-aff-link-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 28px;
}
.min-aff-link-box h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }

.min-aff-link-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.min-aff-link-row input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #111;
}

/* ---- Generic section ---- */
.min-aff-section {
    margin-bottom: 36px;
}
.min-aff-section h3 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }

/* ---- Referral / withdrawal tables ---- */
.min-aff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 4px;
}
.min-aff-table th,
.min-aff-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
}
.min-aff-table thead th {
    background: #f9fafb;
    font-weight: 700;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.min-aff-table tbody tr:hover { background: #fafafa; }

/* ---- Status badges ---- */
.min-aff-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.min-aff-badge-pending  { background: #fef9c3; color: #854d0e; }
.min-aff-badge-paid     { background: #d1fae5; color: #065f46; }
.min-aff-badge-approved { background: #dbeafe; color: #1e40af; }
.min-aff-badge-rejected { background: #fee2e2; color: #991b1b; }
.min-aff-badge-cancelled{ background: #f3f4f6; color: #374151; }

.min-aff-empty {
    color: #6b7280;
    font-style: italic;
    padding: 12px 0;
}

/* ---- Notices ---- */
.min-aff-notice {
    padding: 14px 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 15px;
}
.min-aff-notice-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* ---- Withdrawal section ---- */
.min-aff-withdrawal {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px 26px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}
.min-aff-withdrawal h3 { margin: 0 0 18px; font-size: 16px; font-weight: 700; }
.min-aff-withdrawal h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #374151; }

/* Balance progress bar */
.min-aff-balance-bar-wrap {
    margin-bottom: 16px;
}
.min-aff-balance-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}
.min-aff-balance-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}
.min-aff-balance-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 99px;
    transition: width .4s ease;
}

/* Locked state */
.min-aff-locked-msg {
    padding: 14px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
    margin-top: 8px;
}

/* Withdrawal form */
.min-aff-wd-form {
    margin-top: 20px;
}
.min-aff-wd-intro {
    font-size: 14px;
    color: #555;
    margin-bottom: 4px;
}
.min-aff-wd-max {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Bank details display */
.min-aff-bank-display {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.min-aff-bank-display p { margin: 0 0 8px; font-size: 14px; }
.min-aff-bank-display a { font-size: 13px; color: #2563eb; }

.min-aff-bank-table {
    border-collapse: collapse;
    font-size: 14px;
    width: 100%;
    margin-bottom: 8px;
}
.min-aff-bank-table th {
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    padding: 3px 12px 3px 0;
    width: 140px;
}
.min-aff-bank-table td { color: #111; padding: 3px 0; }

.min-aff-bank-fields label { margin-top: 10px; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .min-aff-stats-row       { grid-template-columns: 1fr 1fr; }
    .min-aff-login-wrap      { padding: 24px 18px; }
    .min-aff-withdrawal      { padding: 18px 16px; }
    .min-aff-link-row        { flex-direction: column; align-items: stretch; }
    .min-aff-link-row .min-aff-btn { width: 100%; text-align: center; }
}
