/* Moon Affiliation System — Public styles (minimal, black & white) */

:root {
    --mas-bg: #ffffff;
    --mas-surface: #fafafa;
    --mas-border: #e6e6e6;
    --mas-text: #111111;
    --mas-muted: #6b6b6b;
    --mas-accent: #111111;
    --mas-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --mas-radius: 10px;
}

.mas-dashboard,
.mas-registration {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
    color: var(--mas-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mas-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.mas-subtitle {
    color: var(--mas-muted);
    margin: 0 0 20px;
    font-size: 14px;
}

.mas-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.mas-stat-card {
    background: var(--mas-surface);
    border: 1px solid var(--mas-border);
    border-radius: var(--mas-radius);
    padding: 16px;
    box-shadow: var(--mas-shadow);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mas-stat-card__label {
    font-size: 12px;
    color: var(--mas-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mas-stat-card__value {
    font-size: 22px;
    font-weight: 600;
}

.mas-card {
    background: var(--mas-bg);
    border: 1px solid var(--mas-border);
    border-radius: var(--mas-radius);
    padding: 20px;
    box-shadow: var(--mas-shadow);
    margin-bottom: 20px;
}

.mas-card__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

.mas-referral {
    display: flex;
    gap: 8px;
}

.mas-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mas-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--mas-bg);
    color: var(--mas-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mas-input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.mas-textarea {
    min-height: 90px;
    resize: vertical;
}

.mas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--mas-border);
    background: var(--mas-bg);
    color: var(--mas-text);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.mas-btn:hover {
    background: var(--mas-surface);
}

.mas-btn:active {
    transform: translateY(1px);
}

.mas-btn--primary {
    background: var(--mas-accent);
    color: #fff;
    border-color: var(--mas-accent);
}

.mas-btn--primary:hover {
    background: #000;
}

.mas-btn--block {
    width: 100%;
}

.mas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mas-table th,
.mas-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--mas-border);
}

.mas-table th {
    font-weight: 600;
    color: var(--mas-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mas-empty {
    text-align: center;
    color: var(--mas-muted);
    padding: 24px !important;
}

.mas-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mas-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mas-field label {
    font-size: 13px;
    font-weight: 500;
}

.mas-form__message {
    font-size: 13px;
    color: var(--mas-muted);
    min-height: 18px;
}

.mas-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: var(--mas-surface);
    border: 1px solid var(--mas-border);
    color: var(--mas-muted);
}

.mas-badge--approved,
.mas-badge--paid {
    background: #111;
    border-color: #111;
    color: #fff;
}

.mas-badge--pending {
    background: var(--mas-surface);
    border-color: var(--mas-border);
    color: var(--mas-muted);
}

.mas-badge--refunded,
.mas-badge--cancelled {
    background: #fff;
    border-color: #000;
    color: #000;
    text-decoration: line-through;
}

.mas-field__hint {
    font-size: 12px;
    color: var(--mas-muted);
    margin: 0;
}

@media (max-width: 600px) {
    .mas-referral {
        flex-direction: column;
    }
}

/* RTL support */
[dir="rtl"] .mas-table th,
[dir="rtl"] .mas-table td {
    text-align: right;
}
[dir="rtl"] .mas-referral {
    flex-direction: row-reverse;
}
[dir="rtl"] .mas-floating-widget {
    right: auto;
    left: 20px;
}

.mas-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    text-decoration: none;
}