/*
 * FarmTab — Account Login / Register page styles
 * Used on /my-account/ when the parent theme renders the custom login template.
 * These styles are self-contained and do NOT depend on dashboard.css.
 */

/* ── CSS variables (scoped to login page elements) ──────────────────────── */
.ftdash-login,
.ftdash-modal {
    --ft-accent:    #4f6ef7;
    --ft-accent-h:  #3a5ce6;
    --ft-success:   #22c55e;
    --ft-bg:        #f4f5f9;
    --ft-card:      #fff;
    --ft-border:    #e8eaf0;
    --ft-text:      #1a1d2e;
    --ft-muted:     #6b7280;
    --ft-radius:    12px;
    --ft-radius-sm: 8px;
    --ft-font:     'DM Sans', system-ui, sans-serif;
}

/* ── Shared field / button / input primitives ────────────────────────────── */
.ftdash-login .ftdash-field,
.ftdash-modal .ftdash-field { margin-bottom: 14px; }

.ftdash-login .ftdash-field label,
.ftdash-modal .ftdash-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ft-text);
    margin-bottom: 5px;
    font-family: var(--ft-font);
}

.ftdash-login .ftdash-input,
.ftdash-modal .ftdash-input {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    font-family: var(--ft-font);
    color: var(--ft-text);
    background: #fff;
    border: 1.5px solid var(--ft-border);
    border-radius: var(--ft-radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.ftdash-login .ftdash-input:focus,
.ftdash-modal .ftdash-input:focus {
    border-color: var(--ft-accent);
    box-shadow: 0 0 0 3px rgba(79,110,247,.1);
}

.ftdash-login .ftdash-btn,
.ftdash-modal .ftdash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--ft-radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--ft-font);
    cursor: pointer;
    border: none;
    transition: background .15s, box-shadow .15s;
    text-decoration: none;
    white-space: nowrap;
}
.ftdash-login .ftdash-btn--block,
.ftdash-modal .ftdash-btn--block { width: 100%; }

.ftdash-login .ftdash-btn--primary,
.ftdash-modal .ftdash-btn--primary { background: var(--ft-accent); color: #fff; }
.ftdash-login .ftdash-btn--primary:hover,
.ftdash-modal .ftdash-btn--primary:hover { background: var(--ft-accent-h); box-shadow: 0 4px 12px rgba(79,110,247,.3); }

.ftdash-login .ftdash-btn--outline,
.ftdash-modal .ftdash-btn--outline { background: transparent; color: var(--ft-text); border: 1.5px solid var(--ft-border); }
.ftdash-login .ftdash-btn--outline:hover,
.ftdash-modal .ftdash-btn--outline:hover { border-color: var(--ft-accent); color: var(--ft-accent); background: rgba(37,99,235,.04); }

.ftdash-login .ftdash-btn--farmer { background: var(--ft-success); color: #fff; padding: 11px 20px; font-size: 14px; border-radius: 10px; }
.ftdash-login .ftdash-btn--farmer:hover { background: #16a34a; box-shadow: 0 4px 14px rgba(34,197,94,.35); }

.ftdash-login .ftdash-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ft-text);
    cursor: pointer;
    margin-bottom: 14px;
    font-family: var(--ft-font);
}

.ftdash-login .ftdash-label-link {
    float: right;
    font-size: 11px;
    font-weight: 500;
    color: var(--ft-accent);
    text-decoration: none;
}

.ftdash-login .ftdash-two-col,
.ftdash-modal .ftdash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.ftdash-login .ftdash-alert,
.ftdash-modal .ftdash-alert {
    padding: 10px 13px;
    border-radius: var(--ft-radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
    font-family: var(--ft-font);
}
.ftdash-alert--error   { background: rgba(239,68,68,.07);  color: #b91c1c; border: 1px solid rgba(239,68,68,.2); }
.ftdash-alert--success { background: rgba(34,197,94,.08);  color: #166534; border: 1px solid rgba(34,197,94,.2); }

/* ── Password show/hide toggle ───────────────────────────────────────────── */
.ftdash-login .ftdash-input-wrap,
.ftdash-modal .ftdash-input-wrap { position: relative; }
.ftdash-login .ftdash-input-wrap .ftdash-input,
.ftdash-modal .ftdash-input-wrap .ftdash-input { padding-right: 40px; }
.ftdash-toggle-pass {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ft-muted);
    padding: 4px;
}
.ftdash-toggle-pass svg { width: 16px; height: 16px; display: block; }

/* ── Login page layout ───────────────────────────────────────────────────── */
.ftdash-login {
    padding: 40px 20px;
    background: #1f2933;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ftdash-login__wrap {
    display: grid;
    grid-template-columns: 400px 320px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 56px rgba(0,0,0,.28);
    max-width: 740px;
    width: 100%;
}
.ftdash-login__card {
    padding: 38px 36px;
    border-right: 1px solid var(--ft-border);
}
.ftdash-login__logo        { text-align: center; margin-bottom: 22px; }
.ftdash-login__logo img    { max-height: 42px; }
.ftdash-login__site-name   { font-size: 20px; font-weight: 800; color: var(--ft-text); }
.ftdash-login__title       { font-size: 19px; font-weight: 700; color: var(--ft-text); text-align: center; margin: 0 0 4px; font-family: var(--ft-font); letter-spacing: -.2px; }
.ftdash-login__subtitle    { font-size: 13px; color: var(--ft-muted); text-align: center; margin: 0 0 22px; }
.ftdash-login__divider     { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; }
.ftdash-login__divider::before,
.ftdash-login__divider::after { content: ''; flex: 1; height: 1px; background: var(--ft-border); }
.ftdash-login__divider span { font-size: 11px; color: var(--ft-muted); white-space: nowrap; }

/* ── Farmer CTA panel ────────────────────────────────────────────────────── */
.ftdash-login__farmer {
    background: linear-gradient(160deg, #0f1623 0%, #1a3a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
}
.ftdash-login__farmer-inner  { text-align: center; }
.ftdash-login__farmer-icon   { font-size: 44px; margin-bottom: 14px; }
.ftdash-login__farmer h2     { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 10px; font-family: var(--ft-font); }
.ftdash-login__farmer p      { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.6; margin: 0 0 20px; }
.ftdash-login__farmer-note   { font-size: 11px; color: rgba(255,255,255,.38); margin: 14px 0 0; }
.ftdash-login__farmer-note a { color: rgba(255,255,255,.55); text-decoration: none; }

/* ── Registration modal ──────────────────────────────────────────────────── */
.ftdash-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ftdash-modal.is-open          { display: flex !important; }
.ftdash-modal__overlay         { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.ftdash-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: ftdashSlideUp .22s ease;
}
@keyframes ftdashSlideUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ftdash-modal__head   { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 0; }
.ftdash-modal__title  { font-size: 17px; font-weight: 700; color: var(--ft-text); margin: 0; font-family: var(--ft-font); }
.ftdash-modal__close  { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--ft-muted); padding: 4px 8px; border-radius: 6px; line-height: 1; }
.ftdash-modal__close:hover { background: var(--ft-bg); color: var(--ft-text); }
.ftdash-modal__body   { padding: 16px 24px 28px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .ftdash-login__wrap { grid-template-columns: 1fr; max-width: 420px; }
    .ftdash-login__card { border-right: none; border-bottom: 1px solid var(--ft-border); padding: 28px 22px; }
    .ftdash-login__farmer { padding: 26px 22px; }
    .ftdash-login .ftdash-two-col,
    .ftdash-modal .ftdash-two-col { grid-template-columns: 1fr; gap: 0; }
}
