/* ── Lugus Overland Core Styles ── */
:root {
    --lugus-green:     #2d6a4f;
    --lugus-green-dk:  #1b4332;
    --lugus-green-lt:  #d1fae5;
    --lugus-blue:      #0369a1;
    --lugus-red:       #dc2626;
    --lugus-amber:     #d97706;
    --lugus-border:    #e2e8f0;
    --lugus-bg:        #f8fafc;
    --lugus-text:      #1a1a1a;
    --lugus-muted:     #64748b;
    --lugus-radius:    12px;
}

/* ── Auth wrap ── */
.lugus-auth-wrap {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 16px;
}

.lugus-signup-wrap { max-width: 760px; }

.lugus-auth-card {
    background: #fff;
    border: 1px solid var(--lugus-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.lugus-auth-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1a3a2a 0%, #2d6a4f 100%);
    color: #fff;
    padding: 24px 28px;
}

.lugus-auth-header svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: #74c69d;
}

.lugus-auth-header h2 {
    margin: 0 0 4px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    border: none;
    padding: 0;
}

.lugus-auth-header p {
    margin: 0;
    font-size: .875rem;
    color: #b7e4c7;
}

/* ── Forms ── */
.lugus-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 28px 8px;
}

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

.lugus-field label {
    font-size: .8125rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lugus-field input[type="text"],
.lugus-field input[type="email"],
.lugus-field input[type="password"],
.lugus-field input[type="number"] {
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .9375rem;
    font-family: inherit;
    color: var(--lugus-text);
    background: var(--lugus-bg);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.lugus-field input:focus {
    border-color: var(--lugus-green);
    box-shadow: 0 0 0 3px rgba(45,106,79,.12);
    background: #fff;
}

.lugus-input-disabled {
    opacity: .6;
    cursor: not-allowed;
}

.lugus-field-link {
    font-size: .8rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--lugus-blue);
}

.lugus-field-hint-inline {
    font-size: .75rem;
    color: var(--lugus-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.lugus-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: var(--lugus-muted);
    padding: 0 28px;
    cursor: pointer;
}

.lugus-terms {
    font-size: .8rem;
    color: var(--lugus-muted);
    text-align: center;
    margin: 0;
    padding: 8px 28px 0;
}

.lugus-auth-footer {
    padding: 16px 28px 24px;
    text-align: center;
    font-size: .875rem;
    color: var(--lugus-muted);
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
}

/* ── Buttons ── */
.lugus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    font-family: inherit;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}

.lugus-btn--primary {
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    color: #fff;
}
.lugus-btn--primary:hover { opacity: .88; transform: translateY(-1px); }

.lugus-btn--secondary {
    background: #e0f2fe;
    color: var(--lugus-blue);
    border-color: #bae6fd;
}
.lugus-btn--secondary:hover { background: #bae6fd; }

.lugus-btn--ghost {
    background: var(--lugus-bg);
    color: #475569;
    border-color: var(--lugus-border);
}
.lugus-btn--ghost:hover { background: #f1f5f9; }

.lugus-btn--danger {
    background: #fff0f0;
    color: var(--lugus-red);
    border-color: #fecaca;
}
.lugus-btn--danger:hover { background: #fee2e2; }

.lugus-btn--full { width: 100%; margin: 0 0 4px; }
.lugus-btn--sm   { padding: 5px 10px; font-size: .78rem; }

.lugus-btn-loader { display: flex; align-items: center; gap: 8px; }

@keyframes lugus-spin { to { transform: rotate(360deg); } }
.lugus-spin { animation: lugus-spin .9s linear infinite; width: 18px; height: 18px; }

/* ── Plan selector ── */
#lugus-plan-selector {
    padding: 24px 28px 0;
}

#lugus-plan-selector h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #1a3a2a;
    border: none;
    padding: 0;
}

.lugus-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.lugus-plan {
    position: relative;
    border: 2px solid var(--lugus-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}

.lugus-plan input[type="radio"] { display: none; }

.lugus-plan:hover { border-color: var(--lugus-green); background: #f0faf4; }

.lugus-plan--selected {
    border-color: var(--lugus-green);
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(45,106,79,.1);
}

.lugus-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lugus-green);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.lugus-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.lugus-plan-name { font-weight: 700; font-size: .9rem; color: #1a3a2a; }

.lugus-plan-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lugus-green);
}
.lugus-plan-price small { font-size: .7rem; font-weight: 400; color: var(--lugus-muted); }

.lugus-plan-trial, .lugus-plan-savings {
    font-size: .75rem;
    font-weight: 600;
    color: var(--lugus-blue);
    margin-bottom: 8px;
}

.lugus-plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .8rem;
    color: #374151;
    line-height: 1.8;
}

/* ── Alerts ── */
.lugus-alert {
    margin: 12px 28px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.lugus-alert--success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.lugus-alert--error   { background: #fff0f0; color: #991b1b; border-color: #fecaca; }
.lugus-alert--warning { background: #fffbeb; color: #78350f; border-color: #fcd34d; }

/* ── Divider ── */
.lugus-divider { border: none; border-top: 1px solid var(--lugus-border); margin: 16px 0; }

/* ── Membership level badges ── */
.lugus-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
}
.lugus-level-1 { background: #f1f5f9; color: #475569; }
.lugus-level-2 { background: #d1fae5; color: #065f46; }
.lugus-level-3 { background: #fef3c7; color: #92400e; }
.lugus-level-4 { background: #e0f2fe; color: #0c4a6e; }
.lugus-comp-badge { background: #ede9fe; color: #4c1d95; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; margin-left: 6px; }

/* ── Auth bar ── */
#lugus-authbar {
    background: #fff;
    border: 1px solid var(--lugus-border);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lugus-authbar-user,
.lugus-authbar-guest {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lugus-authbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6a4f, #0369a1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
}

.lugus-authbar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: auto;
}
.lugus-authbar-info strong { font-size: .9rem; color: #111827; }

.lugus-authbar-prompt { font-size: .875rem; color: var(--lugus-muted); margin-right: auto; }

.lugus-authbar-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid var(--lugus-border);
    background: var(--lugus-bg);
    color: #475569;
    transition: all .15s;
}
.lugus-authbar-btn:hover { background: #f1f5f9; }
.lugus-authbar-btn--primary  { background: var(--lugus-green); color: #fff; border-color: transparent; }
.lugus-authbar-btn--upgrade  { background: linear-gradient(135deg,#2d6a4f,#1b4332); color: #fff; border-color: transparent; }
.lugus-authbar-btn--ghost    { background: #f1f5f9; color: var(--lugus-muted); }

/* ── Upgrade nudge ── */
.lugus-upgrade-nudge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .875rem;
    color: #065f46;
    margin: 8px 0;
    flex-wrap: wrap;
}
.lugus-nudge-btn {
    background: var(--lugus-green);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
}

/* ── Account dashboard ── */
.lugus-account-wrap {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0 16px 48px;
}

.lugus-account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--lugus-border);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.lugus-account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6a4f, #0369a1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}

.lugus-account-header h2 { margin: 0 0 4px; font-size: 1.3rem; border: none; padding: 0; }
.lugus-account-header p  { margin: 0; color: var(--lugus-muted); font-size: .875rem; }

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

.lugus-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--lugus-muted);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.lugus-tab:hover { color: var(--lugus-green); }
.lugus-tab--active { color: var(--lugus-green); border-bottom-color: var(--lugus-green); }

.lugus-tab-panel { display: none; }
.lugus-tab-panel--active { display: block; }

/* ── Account cards ── */
.lugus-account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.lugus-account-card {
    background: #fff;
    border: 1px solid var(--lugus-border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.lugus-account-card h3 { margin: 0 0 12px; font-size: .95rem; color: #1a3a2a; border: none; padding: 0; }

.lugus-stat { font-size: 2rem; font-weight: 700; color: var(--lugus-green); margin-bottom: 8px; }
.lugus-stat--large { font-size: 2.5rem; }

.lugus-upgrade-options { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.lugus-quicklinks { list-style: none; margin: 0; padding: 0; }
.lugus-quicklinks li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.lugus-quicklinks li:last-child { border-bottom: none; }
.lugus-quicklinks a { text-decoration: none; color: #374151; font-size: .875rem; }
.lugus-quicklinks a:hover { color: var(--lugus-green); }

/* ── Route list ── */
.lugus-route-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.lugus-route-item:last-child { border-bottom: none; }

.lugus-route-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.lugus-route-info strong { font-size: .9rem; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lugus-route-info span   { font-size: .78rem; color: var(--lugus-muted); }
.lugus-route-expires     { color: var(--lugus-red) !important; font-weight: 600; }

.lugus-route-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.lugus-empty { color: var(--lugus-muted); font-size: .9rem; padding: 24px 0; }

.lugus-billing-note { font-size: .82rem; color: var(--lugus-muted); margin-top: 12px; }

/* ── Admin badge (users list) ── */
.lugus-level-badge.lugus-level-1 { background: #f1f5f9; color: #475569; }
.lugus-level-badge.lugus-level-2 { background: #d1fae5; color: #065f46; }
.lugus-level-badge.lugus-level-3 { background: #fef3c7; color: #92400e; }
.lugus-level-badge.lugus-level-4 { background: #e0f2fe; color: #0c4a6e; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .lugus-plans { grid-template-columns: 1fr; }
    .lugus-auth-form { padding: 16px; }
    .lugus-auth-header { padding: 18px; }
    .lugus-account-cards { grid-template-columns: 1fr; }
    .lugus-tabs { gap: 0; }
    .lugus-tab { padding: 8px 12px; font-size: .82rem; }
}
