/* === כניסה ואזור אישי === */

.auth-section,
.me-section {
    padding: 3rem 0 4rem;
    background: var(--cream);
    min-height: 60vh;
}

.auth-card {
    max-width: 26rem;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem 1.75rem;
}

.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 1.5rem; margin-bottom: .4rem; }
.auth-header p { color: var(--text-light); font-size: .95rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-submit { width: 100%; }

.auth-alert {
    padding: .7rem .9rem;
    border-radius: var(--radius);
    font-size: .92rem;
    margin-bottom: 1rem;
    border-right: 3px solid;
}
.auth-alert-error  { background: #fdecea; border-color: #c0392b; color: #8e2a1f; }
.auth-alert-notice { background: #e8f5ec; border-color: #2e7d5b; color: #1e5a40; }
.auth-alert-dev    { background: #fdf4e3; border-color: #b5761f; color: #7a5215; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-lighter);
    font-size: .85rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-code-input {
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: .5em;
    font-weight: 600;
    padding-right: .5em;
}

.auth-hint {
    display: block;
    color: var(--text-lighter);
    font-size: .8rem;
    margin-top: .3rem;
}

.auth-foot {
    text-align: center;
    color: var(--text-lighter);
    font-size: .85rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* === אזור אישי === */

.me-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.me-header h1 { font-size: 1.7rem; }
.me-sub { color: var(--text-light); font-size: .92rem; }
.me-refcode { color: var(--primary); font-weight: 600; }

.me-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.me-stat {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.me-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.me-stat-label { font-size: .85rem; color: var(--text-light); }

.me-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.me-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.me-form { display: flex; flex-direction: column; gap: 1rem; }
.me-empty { color: var(--text-light); font-size: .95rem; }

.me-table-wrap { overflow-x: auto; }
.me-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.me-table th,
.me-table td {
    text-align: right;
    padding: .6rem .5rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.me-table th { font-size: .82rem; color: var(--text-light); font-weight: 600; }
.me-table tr:last-child td { border-bottom: 0; }
.me-num { font-variant-numeric: tabular-nums; }

.me-pill {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    padding: .1rem .55rem;
    border-radius: 999px;
}
.me-pill-ok   { background: #e8f5ec; color: #1e5a40; }
.me-pill-wait { background: #fdf4e3; color: #7a5215; }
.me-pill-bad  { background: #fdecea; color: #8e2a1f; }

.btn-sm { padding: .35rem .9rem; font-size: .88rem; }

@media (max-width: 640px) {
    .auth-card { padding: 1.5rem 1.25rem; }
    .me-card { padding: 1.1rem; }
    .me-stat-value { font-size: 1.45rem; }
}
