/* WP FloorMap Subscriber Portal */

@font-face {
    font-family: "Scala Sans";
    font-style: normal;
    font-weight: 400;
    src: url("../font/ScalaSans.woff") format("woff");
    font-display: swap;
}
@font-face {
    font-family: "Scala Sans";
    font-style: italic;
    font-weight: 400;
    src: url("../font/ScalaSans-Italic.woff") format("woff");
    font-display: swap;
}
@font-face {
    font-family: "Scala Sans";
    font-style: normal;
    font-weight: 700;
    src: url("../font/ScalaSans-Bold.woff") format("woff");
    font-display: swap;
}
@font-face {
    font-family: "Optima";
    font-style: normal;
    font-weight: 700 800;
    src: url("../font/Optima-Bold.woff") format("woff"), local("Optima Bold"), local("Optima-Bold");
    font-display: swap;
}

:root {
    --bg: #e8eeff;
    --accent: #000159;
    --btn-bg: #c5d4ff;
    --btn-hover: #a3b8f0;
    --red: #ed0000;
    --white: #ffffff;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #d1d5db;
    --success: #059669;
    --warning: #d97706;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Scala Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Nav */
.portal-nav {
    background: var(--accent);
    padding: 0 24px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}
.portal-nav .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.portal-nav .logo svg { display: block; }
.portal-nav .nav-right { display: flex; align-items: center; gap: 20px; }
.portal-nav .nav-email { color: rgba(255,255,255,0.6); font-size: 14px; }
.portal-nav a.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.15s;
}
.portal-nav a.nav-link:hover { color: var(--white); }

/* Container */
.portal-container {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 20px;
}
.portal-container.narrow { max-width: 420px; }
.portal-container.auth-wide { max-width: 820px; }

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    padding: 32px;
    margin-bottom: 24px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.card-title {
    font-family: 'Optima', sans-serif;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}

/* Headings */
h1, h2 { font-family: 'Optima', sans-serif; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; }
h1 { font-size: 26px; margin-bottom: 8px; }
h2 { font-size: 20px; margin-bottom: 16px; }
.subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 24px; }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--text);
}
.form-group input:focus {
    border-color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    line-height: 1.4;
}
.btn-block { display: block; width: 100%; text-align: center; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #000080; }
.btn-secondary { background: var(--btn-bg); color: var(--accent); }
.btn-secondary:hover { background: var(--btn-hover); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c20000; }
.btn-sm { padding: 6px 14px; font-size: 14px; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
}
.badge-active { background: #d1fae5; color: #065f46; }
.badge-trialing { background: #dbeafe; color: #1e40af; }
.badge-past_due, .badge-past-due { background: #fef3c7; color: #92400e; }
.badge-canceled, .badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-pending, .badge-incomplete { background: #fef3c7; color: #92400e; }

/* Detail rows */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 500; text-align: right; }

/* API key display */
.api-key-box {
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 60px 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    word-break: break-all;
    position: relative;
    line-height: 1.5;
}
.copy-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--btn-bg);
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent);
    font-family: inherit;
    transition: background 0.15s;
}
.copy-btn:hover { background: var(--btn-hover); }

/* Property list */
.property-list { list-style: none; padding: 0; }
.property-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
}
.property-list li:last-child { border-bottom: none; }
.property-id { color: var(--text-muted); font-size: 13px; margin-left: 8px; }
.properties-contact-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}
.properties-contact-hint a { color: var(--accent); }

/* Active sites */
.site-list { list-style: none; padding: 0; }
.site-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}
.site-list li:last-child { border-bottom: none; }
.site-icon { color: var(--text-muted); flex-shrink: 0; }
.site-url {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.site-url:hover { text-decoration: underline; }
.site-version {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-last-seen {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Plan change cards */
.plan-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.plan-options-4 { grid-template-columns: repeat(4, 1fr); }
.plan-card {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s;
}
.plan-card:hover { border-color: var(--btn-hover); }
.plan-card-current {
    border-color: var(--accent);
    background: #f0f4ff;
}
.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}
.plan-card-name { font-weight: 700; font-size: 16px; color: var(--text); }
.plan-card-price { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.plan-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.plan-card-btn { width: 100%; text-align: center; }
.plan-card-disabled {
    opacity: 0.5;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
.plan-card-disabled:hover { border-color: #e5e7eb; }
.plan-card-disabled .plan-card-price { color: var(--text-muted); }
.plan-card-limit {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--red);
    line-height: 1.3;
}

/* Enterprise contact form */
.enterprise-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-top: 12px;
}
.enterprise-contact-info {
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
}
.enterprise-contact-info .link { font-weight: 600; }

/* Pending setup banner */
.pending-setup-banner {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
}
.pending-setup-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.pending-setup-icon { font-size: 28px; line-height: 1; }
.pending-setup-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.pending-setup-desc {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}
.pending-setup-countdown {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--accent);
    font-weight: 600;
}
.pending-setup-billing {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

/* Section label */
.section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Actions row */
.actions-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Links */
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Plugin download */
.download-card {
    margin-top: 32px;
}
.download-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.download-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.download-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
}
.download-meta-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}
.download-btn svg {
    flex-shrink: 0;
}
.download-hint {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty p { font-size: 16px; line-height: 1.6; }

/* Support section */
.support-card {
    margin-top: 32px;
}
.support-response-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}
.support-response-time svg {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.5;
}
.support-channels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.support-channel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.support-channel:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,1,89,0.08);
}
.support-channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--accent);
}
.support-icon-slack { background: #f0e6f6; color: #611f69; }
.support-icon-whatsapp { background: #e8f5e9; color: #25d366; }
.support-icon-email { background: #e8eeff; color: var(--accent); }
.support-channel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.support-channel-body strong {
    font-size: 15px;
    font-weight: 600;
}
.support-channel-body span {
    font-size: 13px;
    color: var(--text-muted);
}
.support-channel-arrow {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.support-upgrade-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef9e7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}
.support-upgrade-hint svg {
    flex-shrink: 0;
    color: #d97706;
}

/* Manage Subscription */
.manage-card {
    margin-top: 32px;
}

/* reCAPTCHA */
.recaptcha-group {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 32px 24px 24px;
    font-size: 13px;
    color: rgba(0,1,89,0.4);
}
.portal-footer .footer-main {
    margin-bottom: 6px;
}
.portal-footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.portal-footer .footer-sep {
    color: rgba(0,1,89,0.25);
}
.portal-footer a { color: rgba(0,1,89,0.5); text-decoration: none; }
.portal-footer a:hover { color: var(--accent); }

/* Rellax decoration blocks */
.bg-decoration-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.deco-block {
    position: absolute;
    background-color: rgba(197, 212, 255, 0.5);
    border: 1px solid rgba(0, 1, 89, 0.15);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    opacity: 0.8;
}
.deco-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 1, 89, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 1, 89, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.portal-container { position: relative; z-index: 1; }

/* Auth split card */
.auth-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-bottom: 24px;
}
.auth-card-image {
    flex: 0 0 44%;
    min-height: 480px;
    position: relative;
    overflow: hidden;
}
.auth-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    font-size: 10px;
    line-height: 1.3;
    color: rgba(255,255,255,0.85);
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
}
.auth-card-caption .smallcaps { font-variant: all-small-caps; }
.auth-card-body {
    flex: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive */
@media (max-width: 640px) {
    .portal-container { margin: 20px auto; }
    .card { padding: 20px; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .portal-nav .nav-email { display: none; }
    .plan-options { grid-template-columns: 1fr; }
    .actions-row { flex-direction: column; }
    .actions-row .btn { text-align: center; }
    .auth-card { flex-direction: column; }
    .auth-card-image { flex: none; min-height: 200px; }
    .auth-card-body { padding: 28px 20px; }
    .bg-decoration-layer { display: none; }
}
