/* Clean reusable UI components: buttons, forms, cards, tables, feedback. */
button,
.button,
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-warning,
.auth-button,
.login-btn,
.register-btn,
.forgot-btn,
.action-btn,
.btn-sm,
.btn-small,
a.button,
input[type="button"],
input[type="submit"] {
    max-width: 100%;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #ffffff;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
    cursor: pointer;
    text-decoration: none;
    transition: filter 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover,
.button:hover,
.btn:hover,
a.button:hover {
    filter: brightness(1.06);
    text-decoration: none;
}

button:disabled,
.btn:disabled,
.button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.btn-secondary,
.button.btn-secondary,
.login-button,
.btn-login {
    color: var(--color-text);
    border-color: var(--color-border);
    background: var(--color-surface);
}

.btn-danger,
button.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, var(--color-danger), #b92f2f);
}

.btn-success,
button.btn-success {
    color: #fff;
    background: linear-gradient(180deg, var(--color-success), #0e8745);
}

.btn-warning,
button.btn-warning {
    color: #201400;
    background: linear-gradient(180deg, var(--color-warning), #d78700);
}

.btn-sm,
.btn-small,
.modal-close,
.toggle-password,
.notification-close,
.clean-drawer-close,
.search-button,
.notification-bell,
.mobile-menu-toggle {
    width: auto;
    white-space: nowrap;
    overflow-wrap: normal;
}

.form-group,
.input-group {
    min-width: 0;
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select,
textarea,
.input-field,
.referral-link-input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    background: var(--color-surface);
    font-size: 16px;
    line-height: 1.25;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-dim);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.password-wrapper,
.referral-wrapper,
.referral-link-container,
.referral-code-display,
.referral-actions,
.auth-links,
.search-filters,
.action-buttons,
.special-bid-actions,
.admin-actions,
.users-header,
.bids-header,
.special-bid-header,
.dashboard-user-strip,
.user-controls,
.session-times {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.password-wrapper {
    flex-wrap: nowrap;
    align-items: stretch;
}

.password-wrapper input {
    flex: 1 1 auto;
}

.password-wrapper .toggle-password {
    flex: 0 0 auto;
    min-width: 54px;
    padding-inline: 8px;
}

.checkbox-group,
.remember-me {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.checkbox-group input,
.remember-me input {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
    accent-color: var(--color-primary);
}

.features-grid,
.trust-items,
.schedule-grid,
.stats-grid,
.referral-stats-grid,
.community-grid,
.benefits-list,
.admin-stats-grid,
.config-grid,
.form-grid,
.compact-grid,
.action-buttons-grid,
.users-stats,
.bids-stats,
.health-metrics,
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 12px;
}

.feature-card,
.stat-card,
.stat,
.trust-item,
.session-card,
.community-card,
.referral-stat-card,
.referral-link-card,
.info-card,
.referrals-list-card,
.roi-preview,
.calculator-form,
.calculator-result,
.hero-panel,
.benefit-item,
.step,
.user-stat-card,
.bid-stat-card,
.system-health,
.financial-dashboard,
.security-alerts-panel,
.authentication-status,
.quick-actions,
.auction-sessions,
.contact-item,
.access-denied-content,
.modal-content {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-panel);
}

.stat-number,
.stat-value,
.countdown,
#timer,
.referral-code,
.profit,
.total-return {
    color: var(--color-primary);
    font-weight: 900;
}

.stat-label,
.session-status,
.field-hint,
.input-hint,
.legal-note,
.page-note,
.section-lead {
    color: var(--color-muted);
}

.section-lead,
.page-intro {
    max-width: 68ch;
}

.alert,
.message,
.auction-message,
.error-message,
.success-message,
.loading-message,
.empty-state,
.error-state {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    background: rgba(248, 250, 252, 0.86);
}

.empty-state,
.error-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding: clamp(18px, 4vw, 34px);
    background: var(--color-surface);
}

.empty-state h3,
.error-state h3 {
    margin-bottom: 0;
}

.empty-state p,
.error-state p {
    max-width: 52ch;
    margin-bottom: 0;
}

.empty-icon,
.error-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--color-primary);
    font-size: 1.9rem;
    font-weight: 900;
}

.countdown-timer {
    margin-top: 4px;
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.countdown-end {
    margin-top: 2px;
    color: var(--color-dim);
    font-size: 0.78rem;
}

.bids-table {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.bids-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.bids-table th,
.bids-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.bids-table th {
    color: var(--color-text);
    background: rgba(59, 130, 246, 0.08);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bids-table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.bids-table td strong {
    color: var(--color-primary-dark);
}

.alert-success,
.message.success,
.success-message {
    border-color: rgba(24, 182, 95, 0.45);
    background: rgba(24, 182, 95, 0.12);
}

.alert-error,
.message.error,
.error-message {
    border-color: rgba(224, 77, 77, 0.45);
    background: rgba(224, 77, 77, 0.12);
}

.alert-warning,
.message.warning {
    border-color: rgba(246, 166, 35, 0.45);
    background: rgba(246, 166, 35, 0.12);
}

.loading,
.loading-spinner {
    width: 20px;
    height: 20px;
    display: inline-block;
    border: 3px solid rgba(59, 130, 246, 0.18);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.admin-table-container,
.admin-table,
.bids-table,
.table-container,
.history-list,
.referrals-list,
.notification-dropdown,
.financial-dashboard {
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--color-text);
    background: rgba(59, 130, 246, 0.08);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.status-badge,
.auth-status-badge,
.bonus-badge {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: rgba(59, 130, 246, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.15;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    background: rgba(15, 23, 42, 0.26);
}

.modal-content {
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
}
