/* ============================================================
   JR Auth System — Styles
   Compatible with GeneratePress theme
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --jr-gold:        #c8a951;
    --jr-gold-dark:   #a8893a;
    --jr-dark:        #1a1a1a;
    --jr-mid:         #444444;
    --jr-muted:       #888888;
    --jr-border:      #e0d8cc;
    --jr-bg:          #faf9f7;
    --jr-white:       #ffffff;
    --jr-success:     #2d7a4f;
    --jr-success-bg:  #edf7f2;
    --jr-error:       #c0392b;
    --jr-error-bg:    #fdf0ee;
    --jr-info-bg:     #f0f4ff;
    --jr-info:        #2c5282;
    --jr-warn:        #7d5a00;
    --jr-warn-bg:     #fffbeb;
    --jr-radius:      10px;
    --jr-shadow:      0 4px 24px rgba(0,0,0,0.08);
    --jr-shadow-lg:   0 8px 40px rgba(0,0,0,0.12);
    --jr-font:        inherit; /* uses GeneratePress font */
    --jr-transition:  0.18s ease;
}

/* ── Base reset inside our components ──────────────────────── */
.jr-auth-wrap *,
.jr-account-wrap * {
    box-sizing: border-box;
}

/* ============================================================
   AUTH CARD (register + login)
   ============================================================ */

.jr-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 16px 64px;
    min-height: 60vh;
}

.jr-auth-card {
    background: var(--jr-white);
    border: 1px solid var(--jr-border);
    border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow);
    padding: 44px 44px 36px;
    width: 100%;
    max-width: 480px;
}

@media (max-width: 520px) {
    .jr-auth-card { padding: 28px 20px 24px; }
}

/* ── Auth header ── */
.jr-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.jr-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--jr-dark);
    color: var(--jr-gold);
    font-size: 22px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.jr-auth-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--jr-dark) !important;
    margin: 0 0 8px !important;
    line-height: 1.2 !important;
}

.jr-auth-subtitle {
    font-size: 14px !important;
    color: var(--jr-muted) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ── Form fields ── */
.jr-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.jr-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jr-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--jr-mid) !important;
    margin: 0 !important;
    letter-spacing: 0.02em;
}

.jr-required {
    color: var(--jr-gold-dark);
}

.jr-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--jr-dark);
    background: var(--jr-bg);
    border: 1.5px solid var(--jr-border);
    border-radius: 7px;
    outline: none;
    transition: border-color var(--jr-transition), box-shadow var(--jr-transition);
    font-family: var(--jr-font);
    appearance: none;
}

.jr-input:focus {
    border-color: var(--jr-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.15);
    background: var(--jr-white);
}

.jr-input--readonly {
    opacity: 0.6;
    cursor: not-allowed;
}

.jr-input-wrap {
    position: relative;
}

.jr-input-wrap .jr-input {
    padding-right: 46px;
}

.jr-toggle-pw {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--jr-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--jr-transition);
}

.jr-toggle-pw:hover { color: var(--jr-dark); }

.jr-field-note {
    font-size: 12px;
    color: var(--jr-muted);
    line-height: 1.5;
}

/* ── Password strength ── */
.jr-pw-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--jr-border);
    overflow: hidden;
    transition: all var(--jr-transition);
}

.jr-pw-strength::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.jr-pw-strength.weak::after    { width: 30%; background: var(--jr-error); }
.jr-pw-strength.fair::after    { width: 60%; background: #e07b00; }
.jr-pw-strength.strong::after  { width: 100%; background: var(--jr-success); }

/* ── Checkbox ── */
.jr-field--checkbox { margin-top: -4px; }

.jr-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px !important;
    color: var(--jr-mid) !important;
    line-height: 1.5 !important;
}

.jr-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.jr-checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--jr-border);
    border-radius: 4px;
    background: var(--jr-bg);
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--jr-transition);
}

.jr-checkbox-label input:checked + .jr-checkbox-custom {
    background: var(--jr-dark);
    border-color: var(--jr-dark);
}

.jr-checkbox-label input:checked + .jr-checkbox-custom::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid var(--jr-gold);
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

.jr-checkbox-label a {
    color: var(--jr-gold-dark);
    text-decoration: underline;
}

/* ── Forgot password link ── */
.jr-forgot-link {
    font-size: 12px;
    color: var(--jr-muted);
    text-decoration: none;
    transition: color var(--jr-transition);
}
.jr-forgot-link:hover { color: var(--jr-gold-dark); }

/* ── Buttons ── */
.jr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 7px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--jr-transition);
    font-family: var(--jr-font);
    letter-spacing: 0.01em;
    line-height: 1;
}

.jr-btn--full { width: 100%; }

.jr-btn--primary {
    background: var(--jr-dark);
    color: var(--jr-white);
    border-color: var(--jr-dark);
}

.jr-btn--primary:hover {
    background: var(--jr-gold);
    border-color: var(--jr-gold);
    color: var(--jr-dark);
}

.jr-btn--ghost {
    background: transparent;
    color: var(--jr-muted);
    border-color: var(--jr-border);
    height: 38px;
    font-size: 13px;
    padding: 0 14px;
}

.jr-btn--ghost:hover {
    color: var(--jr-dark);
    border-color: var(--jr-dark);
}

.jr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Spinner ── */
@keyframes jr-spin {
    to { transform: rotate(360deg); }
}

.jr-spinner {
    animation: jr-spin 0.8s linear infinite;
}

/* ── Messages ── */
.jr-messages {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.jr-messages--success,
.jr-messages.success {
    background: var(--jr-success-bg);
    color: var(--jr-success);
    border: 1px solid rgba(45, 122, 79, 0.2);
}

.jr-messages--error,
.jr-messages.error {
    background: var(--jr-error-bg);
    color: var(--jr-error);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.jr-messages--info,
.jr-messages.info {
    background: var(--jr-info-bg);
    color: var(--jr-info);
    border: 1px solid rgba(44, 82, 130, 0.2);
}

.jr-messages--warn,
.jr-messages.warn {
    background: var(--jr-warn-bg);
    color: var(--jr-warn);
    border: 1px solid rgba(125, 90, 0, 0.2);
}

.jr-notice {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
}

.jr-notice--info {
    background: var(--jr-info-bg);
    color: var(--jr-info);
    border: 1px solid rgba(44, 82, 130, 0.2);
}

.jr-notice--warn {
    background: var(--jr-warn-bg);
    color: var(--jr-warn);
    border: 1px solid rgba(125, 90, 0, 0.2);
}

/* ── Auth footer ── */
.jr-auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--jr-muted);
    padding-top: 20px;
    border-top: 1px solid var(--jr-border);
}

.jr-auth-link {
    color: var(--jr-gold-dark);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.jr-auth-link:hover { text-decoration: underline; }

/* ============================================================
   ACCOUNT DASHBOARD
   ============================================================ */

.jr-account-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* ── Top bar ── */
.jr-account-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--jr-white);
    border: 1px solid var(--jr-border);
    border-radius: var(--jr-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--jr-shadow);
}

.jr-avatar-img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    border: 2px solid var(--jr-border);
    flex-shrink: 0;
}

.jr-account-meta { flex: 1; min-width: 0; }

.jr-account-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--jr-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jr-account-email {
    font-size: 13px;
    color: var(--jr-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jr-account-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    background: var(--jr-dark);
    color: var(--jr-gold);
    border-radius: 20px;
}

.jr-logout-btn { margin-left: auto; flex-shrink: 0; }

@media (max-width: 520px) {
    .jr-account-topbar { flex-wrap: wrap; }
    .jr-logout-btn { margin-left: 80px; }
}

/* ── Stats bar ── */
.jr-account-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.jr-stat {
    background: var(--jr-white);
    border: 1px solid var(--jr-border);
    border-radius: var(--jr-radius);
    padding: 16px;
    text-align: center;
}

.jr-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--jr-dark);
    margin-bottom: 4px;
}

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

/* ── Tabs ── */
.jr-account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--jr-border);
    margin-bottom: 24px;
}

.jr-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--jr-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--jr-transition);
    font-family: var(--jr-font);
}

.jr-tab:hover { color: var(--jr-dark); }

.jr-tab.active {
    color: var(--jr-dark);
    border-bottom-color: var(--jr-gold);
    font-weight: 600;
}

/* ── Tab panels ── */
.jr-tab-panel {
    background: var(--jr-white);
    border: 1px solid var(--jr-border);
    border-radius: var(--jr-radius);
    padding: 28px;
    box-shadow: var(--jr-shadow);
}

/* ── Review list in account ── */
.jr-review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jr-review-item {
    border: 1px solid var(--jr-border);
    border-radius: 8px;
    padding: 16px;
    background: var(--jr-bg);
}

.jr-review-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.jr-star { color: var(--jr-border); font-size: 18px; }
.jr-star--filled { color: var(--jr-gold); }

.jr-review-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
}

.jr-review-status--publish {
    background: var(--jr-success-bg);
    color: var(--jr-success);
}

.jr-review-status--pending {
    background: var(--jr-warn-bg);
    color: var(--jr-warn);
}

.jr-review-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--jr-dark);
    margin-bottom: 4px;
}

.jr-review-item-business {
    font-size: 13px;
    color: var(--jr-muted);
    margin-bottom: 4px;
}

.jr-review-item-business a {
    color: var(--jr-gold-dark);
    text-decoration: none;
}

.jr-review-item-date {
    font-size: 12px;
    color: var(--jr-muted);
}

/* ── Empty state ── */
.jr-empty-state {
    text-align: center;
    padding: 48px 16px;
}

.jr-empty-icon {
    font-size: 32px;
    color: var(--jr-border);
    margin-bottom: 16px;
}

.jr-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--jr-dark);
    margin: 0 0 8px;
}

.jr-empty-sub {
    font-size: 14px;
    color: var(--jr-muted);
    margin: 0 0 24px;
}
