/* WaveWiFi portal — base styles */

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f4f6f8;
    color: #1a1a1a;
    line-height: 1.5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

h1.site-name {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: #0a3d62;
}

.tagline {
    margin: 0 0 1.5rem;
    color: #555;
}

.cta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-primary { background: #0a3d62; color: #fff; }
.btn-primary:hover { background: #082f4a; }

.btn-secondary { background: #e8eef3; color: #0a3d62; }
.btn-secondary:hover { background: #d8e2eb; }

.signin {
    text-align: center;
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.signin a, .tos a { color: #0a3d62; }

.tos {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin: 1.5rem 0 0;
}

.debug {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #666;
}

.debug summary {
    cursor: pointer;
    font-weight: 600;
}

.debug dl {
    margin: 0.5rem 0 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.25rem 1rem;
}

.debug dt { font-weight: 600; }

.debug dd {
    margin: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 1.5rem 0;
}
CSS

/* Forms */

.form {
    margin: 1rem 0;
}

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #1a1a1a;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #c5cfd8;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
}

.field input:focus {
    outline: none;
    border-color: #0a3d62;
    box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.15);
}

.field-help {
    font-size: 0.85rem;
    color: #666;
    margin: 0.35rem 0 0;
}

.field-checkbox {
    display: flex;
    align-items: flex-start;
}

.field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 400;
    cursor: pointer;
}

.field-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

button.btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Info / alert blocks */

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alert-error {
    background: #fce8e6;
    color: #8a1c12;
    border: 1px solid #f4c4c0;
}

.alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.info-block {
    background: #e8eef3;
    color: #0a3d62;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.info-block p {
    margin: 0.25rem 0;
}

/* ============================================================
   Plan picker (added Chat 9 Phase B)
   ============================================================ */

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.plan-card {
    border: 2px solid #d8dde2;
    border-radius: 0.5rem;
    padding: 1.25rem;
    background: #ffffff;
}

.plan-card-trial {
    border-color: #0a3d62;
    background: #f0f6fc;
}

.plan-card-paid {
    border-color: #d8dde2;
}

.plan-card-disabled {
    background: #f4f6f8;
    border-color: #d8dde2;
    opacity: 0.7;
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.plan-name {
    font-size: 1.125rem;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.plan-price {
    flex-shrink: 0;
    text-align: right;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a3d62;
}

.price-label {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c8a4f;
    letter-spacing: 0.05em;
}

.plan-details {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    color: #4a4a4a;
    font-size: 0.9375rem;
}

.plan-details li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eef0f2;
}

.plan-details li:last-child {
    border-bottom: none;
}

.plan-cta {
    width: 100%;
}

.plan-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon {
    text-align: center;
    color: #888;
    font-size: 0.8125rem;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

.plan-disabled-message {
    color: #8a4a3c;
    background: #fdf3ee;
    border: 1px solid #f0d4c4;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

.signin-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #4a4a4a;
    font-size: 0.9375rem;
}

/* Inline alerts (added Chat 9 Phase C) */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
    font-size: 0.9375rem;
}
.alert-error {
    background: #fde7e7;
    border: 1px solid #f5b5b5;
    color: #8a2c2c;
}
.alert-success {
    background: #e7f5eb;
    border: 1px solid #9fd6b1;
    color: #1f6f3a;
}

/* ============================================================
   Account dashboard (added Chat 9 Phase C)
   ============================================================ */

.status-block {
    border: 1px solid #d8dde2;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    background: #ffffff;
}

.status-block.status-active {
    border-color: #9fd6b1;
    background: #f4faf6;
}

.status-block.status-inactive {
    background: #f4f6f8;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eef0f2;
    font-size: 0.9375rem;
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    color: #6b7280;
    font-weight: 500;
}

.status-value {
    color: #1a1a1a;
    font-weight: 500;
    text-align: right;
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-pill-active {
    background: #d4edda;
    color: #1f6f3a;
}

.status-pill-inactive {
    background: #e2e6ea;
    color: #555;
}

.status-explainer {
    color: #4a4a4a;
    font-size: 0.9375rem;
    margin: 0.75rem 0 0 0;
    padding: 0;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* ============================================================
   Checkout
   ============================================================ */

.hidden {
    display: none;
}

.checkout-summary {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.summary-row.summary-total {
    border-top: 1px solid #d8d8d8;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    font-size: 1.05rem;
}

.summary-label {
    color: #666;
}

.summary-value {
    color: #111;
}

#payment-element {
    margin: 20px 0;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

#submit {
    width: 100%;
    margin-top: 8px;
}

#payment-message {
    margin-top: 12px;
}

/* ============================================================
   Login / auth
   ============================================================ */

.field-checkbox {
    margin: 12px 0 16px;
}

.field-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.field-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.logout-row {
    margin-top: 24px;
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 4px 8px;
}

.btn-link:hover {
    color: #111;
}

/* ============================================================
   Device manager (/account/devices) — Chat 14
   ============================================================ */

.devices-card { max-width: 720px; margin: 2rem auto; }
.devices-card .tagline { color: #666; margin-bottom: 1.5rem; }
.devices-card .empty-state {
    background: #fafafa; border: 1px dashed #ccc; border-radius: 6px;
    padding: 1.5rem; color: #666; text-align: center;
}
.device-list { list-style: none; padding: 0; margin: 0; }
.device-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #eaeaea; flex-wrap: wrap;
}
.device-row:last-child { border-bottom: none; }
.device-row-main { flex: 1 1 auto; min-width: 200px; }
.device-row-actions { flex: 0 0 auto; }
.device-name-block {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.4rem; flex-wrap: wrap;
}
.device-nickname-display { font-weight: 600; font-size: 1.05rem; }
.device-nickname-input {
    font-size: 1.05rem; padding: 0.3rem 0.5rem; border: 1px solid #bbb;
    border-radius: 4px; min-width: 200px;
}
.device-meta {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
    font-size: 0.9rem; color: #555;
}
.device-mac {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f4f4f4; padding: 0.15rem 0.4rem; border-radius: 3px;
    font-size: 0.85rem; color: #333;
}
.device-pill {
    display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
    font-size: 0.8rem; font-weight: 600; line-height: 1.4;
}
.device-pill-on { background: #e6f4ea; color: #1e7e34; }
.device-pill-off { background: #f1f1f1; color: #777; }
.device-last-access { color: #666; }
.device-last-access-never { color: #999; font-style: italic; }
.badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-current { background: #e8f0fe; color: #1a56c4; }
.link-button {
    background: none; border: none; color: #1a56c4; cursor: pointer;
    padding: 0; font-size: 0.9rem; text-decoration: underline;
}
.link-button:hover { color: #0d3a8a; }
.link-button-muted { color: #888; }
.btn-danger {
    background: #b3261e; color: #fff; border: none;
    padding: 0.5rem 0.9rem; border-radius: 4px; font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: #8c1a14; }
.btn-small { font-size: 0.85rem; padding: 0.35rem 0.7rem; }
.back-link { margin-top: 1.5rem; }
.back-link a { color: #555; text-decoration: none; }
.back-link a:hover { color: #000; text-decoration: underline; }

/* Add-device form (Chat 14, Phase F) */
.add-device-section {
    background: #f9fafc; border: 1px solid #e3e6ed; border-radius: 6px;
    padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.add-device-heading { font-size: 1.05rem; margin: 0 0 0.5rem; }
.add-device-help { color: #555; font-size: 0.9rem; margin: 0 0 1rem; }
.add-device-form .field-row {
    display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem;
}
.add-device-form .field { display: flex; flex-direction: column; flex: 1 1 200px; }
.add-device-form label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; color: #444; }
.add-device-form input[type="text"] {
    padding: 0.4rem 0.55rem; border: 1px solid #bbb; border-radius: 4px;
    font-size: 0.95rem;
}
.add-device-form .field-mac input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.label-optional { font-weight: 400; color: #888; font-size: 0.8rem; }
.add-device-mac-help { margin-top: 0.75rem; font-size: 0.85rem; color: #555; }
.add-device-mac-help summary { cursor: pointer; }
.add-device-mac-help ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.add-device-mac-help li { margin-bottom: 0.25rem; }
.device-list-heading { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

/* Inline action link inside a status row (Chat 14) */
.status-action {
    margin-left: 0.6rem;
    font-size: 0.85rem;
    color: #1a56c4;
    text-decoration: none;
}
.status-action:hover { text-decoration: underline; }


/* ---- Subscription checkout (Chat 15) ---- */
.price-suffix {
    font-size: 0.75em;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.15em;
}

.subscription-disclosure {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    color: #78350f;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subscription-disclosure p {
    margin: 0;
}

.subscription-disclosure p + p {
    margin-top: 0.5rem;
}

.subscription-disclosure strong {
    color: #92400e;
}


/* ---- Recurring subscription plan card (Chat 15.B.3) ---- */
.plan-card-recurring {
    border: 2px solid #1a56c4;
    box-shadow: 0 4px 12px rgba(26, 86, 196, 0.08);
}

.plan-badge {
    display: inline-block;
    background-color: #1a56c4;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}


/* ---- Subscription cancel/resume UI (Chat 15.D) ---- */
.sub-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.sub-status-active {
    background-color: #e0f2fe;
    color: #075985;
}

.sub-status-canceling {
    background-color: #fef3c7;
    color: #92400e;
}

.btn-danger {
    background-color: #b91c1c;
    color: #ffffff;
    border: 1px solid #b91c1c;
}

.btn-danger:hover {
    background-color: #991b1b;
    border-color: #991b1b;
}

.btn-danger-link {
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-danger-link:hover {
    background-color: #fef2f2;
    color: #991b1b;
}

.subscription-cancel-summary {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.subscription-cancel-explainer {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    color: #78350f;
}

.subscription-cancel-explainer p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.subscription-cancel-explainer ul {
    margin: 0;
    padding-left: 1.5rem;
}

.subscription-cancel-explainer li {
    margin-bottom: 0.35rem;
}

.subscription-cancel-explainer li:last-child {
    margin-bottom: 0;
}

.cancel-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.cancel-form .btn-danger,
.cancel-form .btn-secondary {
    flex: 1;
    min-width: 200px;
}


/* ============================================================
 * Profile page (Chat 17)
 * Targets profile.blade.php classes.
 * ============================================================ */

.profile-card {
    /* Inherit from .card; nothing site-specific yet but reserved for future. */
}

.profile-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e6eb;
}
.profile-section:first-of-type {
    margin-top: 1rem;
    padding-top: 0;
    border-top: 0;
}

.profile-section-heading {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: #0a3d62;
}

.profile-form .btn {
    margin-top: 0.5rem;
}

/* Reveal-on-change box: appears when email or password is being changed.
   Subtle accent background + border to call attention without being loud. */
.reveal-box {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff9e6;
    border: 1px solid #f0d97a;
    border-radius: 6px;
}
.reveal-box[hidden] {
    display: none;
}
.reveal-box-label {
    font-size: 0.9rem;
    color: #6b5d20;
    margin-bottom: 0.5rem;
}
.reveal-box .field {
    margin-bottom: 0;
}
.reveal-box .field label {
    color: #6b5d20;
}

/* Danger zone: red accent on the heading, soft red background to set apart
   from the other sections. */
.danger-zone {
    margin-top: 2.5rem;
}
.danger-zone-heading {
    color: #a82319;
}
.danger-zone-explainer {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
}
.danger-zone-explainer ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}
.danger-zone-explainer li {
    margin-bottom: 0.25rem;
}

/* Back-to-account link at the very bottom, matching the convention from
   /account/devices. Subtle link, left-aligned, plenty of breathing room. */
.back-link {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.back-link a {
    color: #0a3d62;
    text-decoration: none;
}
.back-link a:hover {
    text-decoration: underline;
}


/* ============================================================
 * Site header (Chat 17 logo)
 * Centered wordmark above page content on every layout.
 * ============================================================ */

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 1rem 0.75rem;
}
.site-logo {
    max-height: 60px;
    width: auto;
    display: block;
}
