/* =========================================================
   Asere Affiliate Program — Public Styles
   ========================================================= */

/* ---- Notice messages ---- */
.asere-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid currentColor;
}

.asere-error   { background: #fce8e8; color: #8b0000; border-color: #d63638; }
.asere-success { background: #edfaed; color: #1a4f1a; border-color: #00a32a; }
.asere-info    { background: #e8f4fd; color: #0a3555; border-color: #0073aa; }
.asere-warning { background: #fff8e6; color: #5d3c00; border-color: #f0ad4e; }

/* ---- Registration form ---- */
.asere-register-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.asere-section-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.asere-section-desc {
    color: #555;
    margin-bottom: 24px;
}

.asere-form-row {
    display: flex;
    gap: 16px;
}

.asere-form-row--half > .asere-form-group {
    flex: 1;
}

.asere-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.asere-form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.asere-form-group input[type="text"],
.asere-form-group input[type="email"],
.asere-form-group input[type="tel"],
.asere-form-group input[type="url"],
.asere-form-group select,
.asere-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.asere-form-group input:focus,
.asere-form-group select:focus,
.asere-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}

.asere-form-group input.asere-field-error {
    border-color: #d63638;
    box-shadow: 0 0 0 2px rgba(214,54,56,.1);
}

.asere-field-hint {
    font-size: 0.8rem;
    color: #d63638;
    margin-top: 4px;
    display: none;
}

.asere-field-hint.visible {
    display: block;
}

.asere-required { color: #d63638; }

.asere-form-group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.asere-form-group--checkbox label {
    font-weight: normal;
    cursor: pointer;
}

.asere-terms-box {
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #555;
    margin-top: 6px;
    max-height: 120px;
    overflow-y: auto;
}

/* ---- Buttons ---- */
.asere-btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
    position: relative;
}

.asere-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.asere-btn--primary {
    background: #2271b1;
    color: #fff;
}

.asere-btn--primary:hover:not(:disabled) { background: #135e96; color: #fff; }

.asere-btn--loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: asere-spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes asere-spin {
    to { transform: rotate(360deg); }
}

.asere-btn--copy {
    background: #f0f0f0;
    color: #333;
    white-space: nowrap;
}

.asere-btn--copy:hover:not(:disabled) { background: #ddd; }
.asere-btn--copy.copied { background: #00a32a; color: #fff; }

/* ---- Dashboard ---- */
.asere-dashboard-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.asere-dashboard-title {
    font-size: 1.7rem;
    margin-bottom: 20px;
}

.asere-dashboard-status {
    padding: 14px 18px;
    border-radius: 6px;
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

.asere-dashboard-status.asere-status-pending  { background: #fff8e6; border-color: #f0ad4e; }
.asere-dashboard-status.asere-status-rejected { background: #fce8e8; border-color: #d63638; }
.asere-dashboard-status.asere-status-suspended{ background: #f6f7f7; border-color: #777; }

.asere-status-note {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: #555;
}

.asere-dashboard-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 22px;
    margin-bottom: 20px;
}

.asere-dashboard-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

/* ---- Copy group ---- */
.asere-copy-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.asere-copy-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #f9f9f9;
    cursor: text;
}

.asere-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 8px 0 0;
}

/* ---- Stats grid ---- */
.asere-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.asere-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px 12px;
    text-align: center;
}

.asere-stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 4px;
    color: #1d2327;
}

.asere-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asere-stat-card--warning .asere-stat-number { color: #d63638; }
.asere-stat-card--success .asere-stat-number { color: #00a32a; }
.asere-stat-card--info    .asere-stat-number { color: #0073aa; }

/* ---- Simple table ---- */
.asere-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
}

.asere-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 400px;
}

.asere-table th,
.asere-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.asere-table th {
    font-weight: 600;
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.asere-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Commission rate card ---- */
.asere-commission-rate-card {
    border-left: 4px solid #00a32a;
    background: #f0faf0;
}

.asere-commission-rate-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #00a32a;
    line-height: 1.2;
}

.asere-commission-rate-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: #555;
    margin-top: 4px;
}

/* ---- Status badge (public) ---- */
.asere-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Auth tabs ---- */
.asere-auth-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.asere-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 28px;
}

.asere-tab-btn {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.asere-tab-btn:hover {
    color: #2271b1;
}

.asere-tab-btn.is-active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.asere-tab-panel {
    display: none;
}

.asere-tab-panel.is-active {
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .asere-form-row        { flex-direction: column; gap: 0; }
    .asere-copy-group      { flex-direction: column; align-items: stretch; }
    .asere-btn--copy       { width: 100%; text-align: center; }
    .asere-stats-grid      { grid-template-columns: 1fr 1fr; }
    .asere-dashboard-title { font-size: 1.3rem; }
}

@media (max-width: 400px) {
    .asere-stats-grid { grid-template-columns: 1fr; }
}
