/* ============================================================
   portal.css — quqii Social Media Feed Portal
   Shared + page-specific styles for all portal pages
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS Variables ── */
:root {
    --brand:  #e1306c;
    --brand2: #f77737;
    --dark:   #0f0f0f;
    --text:   #1a1a1a;
    --muted:  #6b7280;
    --border: #e5e7eb;
    --bg:     #fafafa;
    --card:   #ffffff;
    --radius: 14px;
}

/* ── Base ── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* ── Nav (public pages) ── */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    height: auto;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -.5px; text-decoration: none; color: var(--text); }
.logo span { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .9rem; transition: color .15s; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a:hover { color: var(--text); }

.logo-img{
   width: 300px;
   height: auto;
}

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.2rem;
       border-radius: 8px; font-size: .9rem; font-weight: 600; text-decoration: none;
       transition: all .15s; cursor: pointer; border: none; }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #c0254f; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1rem; border-radius: 10px; }

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: .82rem;
    color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 700px) {
   nav{
      display: block;
   }
   .nav-links{ justify-content: end; }
    .nav-links .hide-mobile { display: none; }
    .logo-img{
       width: 200px;
    }
}


/* ============================================================
   Homepage (index.php)
   ============================================================ */

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 6rem 1.5rem 5rem;
    background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.hero-badge {
    display: inline-block;
    background: #fdf2f8; color: var(--brand);
    border: 1px solid #fbc8de;
    border-radius: 99px; padding: .3rem .9rem;
    font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem;
    letter-spacing: .03em;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800; letter-spacing: -.03em;
    line-height: 1.15; margin-bottom: 1.25rem;
    max-width: 760px; margin-left: auto; margin-right: auto;
}
.hero h1 span { background: linear-gradient(135deg, var(--brand), var(--brand2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p {
    font-size: 1.15rem; color: var(--muted);
    max-width: 520px; margin: 0 auto 2.5rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-code {
    margin: 4rem auto 0;
    max-width: 560px;
    background: #1e1e2e;
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
.hero-code pre { font-family: 'SF Mono','Fira Mono','Consolas',monospace; font-size: .82rem; line-height: 1.7; color: #cdd6f4; overflow-x: auto; }
.c-comment { color: #6c7086; }
.c-fn      { color: #89b4fa; }
.c-str     { color: #a6e3a1; }
.c-kw      { color: #cba6f7; }

/* ── Section base ── */
section { padding: 5rem 1.5rem; }
.container { max-width: 1000px; margin: 0 auto; }
.section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: .75rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.section-sub   { font-size: 1.05rem; color: var(--muted); max-width: 520px; }

/* ── Features ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.feature-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p  { font-size: .875rem; color: var(--muted); line-height: 1.55; }

/* ── How it works ── */
.how { background: #fff; }
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    counter-reset: steps;
}
.step { position: relative; padding-left: 3.5rem; }
.step::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute; left: 0; top: 0;
    width: 2.25rem; height: 2.25rem;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: #fff; font-weight: 800; font-size: .95rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.step p   { font-size: .875rem; color: var(--muted); }

/* ── Plans (homepage) ── */
.plans-section { background: var(--bg); }
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
    align-items: start;
}
.plan-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
}
.plan-card.featured {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(225,48,108,.08);
}
.plan-tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: #fff;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25rem .75rem; border-radius: 99px;
}
.plan-name  { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.plan-price { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.plan-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-desc  { font-size: .875rem; color: var(--muted); margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.plan-features { list-style: none; margin-bottom: 1.75rem; }
.plan-features li { font-size: .875rem; padding: .4rem 0; display: flex; align-items: center; gap: .6rem; }
.plan-features li::before { content: '✓'; color: var(--brand); font-weight: 700; flex-shrink: 0; }
.plan-btn { display: block; text-align: center; width: 100%; }

/* ── WordPress section ── */
.wp-section { background: #fff; }
.wp-box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
    margin-top: 3rem;
}
@media (max-width: 640px) { .wp-box { grid-template-columns: 1fr; } }
.wp-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #f0f6ff; color: #2563eb;
    border: 1px solid #bfdbfe; border-radius: 8px;
    padding: .4rem .9rem; font-size: .82rem; font-weight: 600; margin-bottom: 1rem;
}
.wp-list { list-style: none; margin: 1.5rem 0; }
.wp-list li { font-size: .9rem; color: var(--muted); padding: .35rem 0; display: flex; align-items: center; gap: .6rem; }
.wp-list li::before { content: '→'; color: #2563eb; font-weight: 700; }
.wp-code {
    background: #1e1e2e; border-radius: var(--radius); padding: 1.5rem;
    font-family: 'SF Mono','Fira Mono',monospace; font-size: .8rem; color: #cdd6f4; line-height: 1.7;
}


/* ============================================================
   Login page (login.php)
   ============================================================ */

body.page-login {
    background: #f4f4f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .9rem 1.5rem;
    font-size: .875rem;
    color: #6b7280;
    text-decoration: none;
}
.back-link:hover { color: var(--brand); }

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.login-logo { margin-bottom: 2rem; }

.login-card h1 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.login-card p  { font-size: .9rem; color: #666; line-height: 1.5; }

.login-form { margin-top: 1.75rem; }

.login-form label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #444;
    margin-bottom: .4rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.login-form input[type=email] {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #e4e4e7;
    border-radius: 10px;
    font-size: .95rem;
    outline: none;
    transition: border-color .15s;
}
.login-form input[type=email]:focus { border-color: var(--brand); }

.login-form button {
    width: 100%;
    margin-top: 1rem;
    padding: .8rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.login-form button:hover { background: #c0254f; }

.alert {
    margin-top: 1.25rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    font-size: .875rem;
    line-height: 1.5;
}
.alert--error   { background: #fff0f3; color: #c0254f; }
.alert--success { background: #f0fdf4; color: #166534; }

.page-login .site-footer { border-top: none; color: #9ca3af; }
.page-login .site-footer a { color: #9ca3af; }
.page-login .site-footer a:hover { color: var(--brand); }


/* ============================================================
   Dashboard (dashboard.php)
   ============================================================ */

body.page-dashboard {
    background: #f4f4f5;
    min-height: 100vh;
}

/* Nav override for dashboard */
.page-dashboard nav {
    background: var(--card);
    height: auto;
    backdrop-filter: none;
    position: sticky; top: 0; z-index: 10;
}
.page-dashboard .logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -.4px; }
.nav-right { display: flex; align-items: center; gap: 1rem; font-size: .875rem; }
.badge-plan {
    padding: .2rem .65rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nav-email { color: var(--muted); }
.btn-link  { color: var(--muted); text-decoration: none; font-size: .85rem; }
.btn-link:hover { color: var(--text); }

/* Layout */
.main  { margin: 0 auto; padding: 2rem 1.5rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }

/* Card */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
}
.card + .card { margin-top: 1.25rem; }
.card h2 {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 1.1rem;
}

/* Progress bar */
.stat-row { display: flex; justify-content: space-between; margin-bottom: .35rem; font-size: .875rem; }
.stat-row span:last-child { color: var(--muted); font-size: .8rem; }
.bar-bg    { height: 8px; background: #f0f0f0; border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.bar-fg    { height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s; }
.bar-fg.warn { background: #f59e0b; }
.bar-fg.danger { background: #ef4444; }

/* Token */
.token-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f9f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem .9rem;
    font-family: 'SF Mono', 'Fira Mono', monospace;
    font-size: .82rem;
    word-break: break-all;
    color: #374151;
}
.token-wrap span { flex: 1; }
.btn-copy {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .65rem;
    font-size: .75rem;
    cursor: pointer;
    color: var(--muted);
    white-space: nowrap;
    transition: all .15s;
}
.btn-copy:hover { border-color: var(--brand); color: var(--brand); }

/* Code snippets */
.snippet-tabs { display: flex; gap: .5rem; margin-bottom: .75rem; }
.tab-btn {
    padding: .3rem .75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .8rem;
    cursor: pointer;
    background: var(--bg);
    color: var(--muted);
    transition: all .15s;
}
.tab-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.snippet-block  { display: none; }
.snippet-block.active { display: block; }
pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 1rem;
    font-size: .78rem;
    line-height: 1.6;
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
}

/* Settings form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}
.form-group select,
.form-group input[type=number] {
    width: 100%;
    padding: .6rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    background: #fff;
    outline: none;
    transition: border-color .15s;
}
.form-group select:focus,
.form-group input[type=number]:focus { border-color: var(--brand); }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.btn-save {
    padding: .65rem 1.5rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-save:hover { background: #c0254f; }
.alert-success {
    padding: .6rem .9rem;
    background: #f0fdf4;
    color: #166534;
    border-radius: 8px;
    font-size: .85rem;
    margin-bottom: 1rem;
}

/* Upgrade banner */
.upgrade-banner {
    background: linear-gradient(135deg, #e1306c, #f77737);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.upgrade-banner h3 { font-size: 1rem; margin-bottom: .2rem; }
.upgrade-banner p  { font-size: .85rem; opacity: .85; }
.btn-upgrade {
    padding: .6rem 1.4rem;
    background: #fff;
    color: var(--brand);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Page tabs */
.page-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.75rem;
}
.page-tab {
    padding: .6rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
}
.page-tab:hover { color: var(--text); }
.page-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.page-panel { display: none; }
.page-panel.active { display: block; }

/* Plans in dashboard */
.plans-grid-dash {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.plan-card-dash {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--card);
    position: relative;
}
.plan-card-dash.current {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(225,48,108,.1);
}
.plan-card-dash .current-badge {
    position: absolute; top: -11px; left: 1rem;
    background: var(--brand); color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .2rem .65rem; border-radius: 99px;
}
.plan-card-dash h3 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; }
.plan-card-dash .price { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .75rem; }
.plan-card-dash .price span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.plan-card-dash ul { list-style: none; font-size: .82rem; color: var(--muted); margin-bottom: 1.25rem; }
.plan-card-dash ul li { padding: .3rem 0; border-bottom: 1px solid #f3f4f6; }
.plan-card-dash ul li:last-child { border: none; }
.plan-card-dash ul li strong { color: var(--text); }
.btn-plan {
    display: block; text-align: center; width: 100%;
    padding: .55rem; border-radius: 8px; font-size: .875rem; font-weight: 600;
    text-decoration: none; transition: all .15s; cursor: pointer; border: none;
}
.btn-plan-primary { background: var(--brand); color: #fff; }
.btn-plan-primary:hover { background: #c0254f; }
.btn-plan-outline { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-plan-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-plan-disabled { background: #f3f4f6; color: #9ca3af; cursor: default; }

.page-dashboard .site-footer { text-align: center; padding: 2rem 1rem; color: #9ca3af; font-size: .8rem; border-top: none; }
.page-dashboard .site-footer a { color: #9ca3af; }
.page-dashboard .site-footer a:hover { color: var(--brand); }


/* ============================================================
   Plans page (plans.php)
   ============================================================ */

.page-plans .hero {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.page-plans .hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .75rem; }
.page-plans .hero p { font-size: 1.05rem; color: var(--muted); }

.plans-wrap { margin: 0 auto; padding: 3rem 1.5rem 5rem; }

.page-plans .plans-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.page-plans .plan-card { padding: 2rem; }
.page-plans .plan-tag { top: -13px; padding: .25rem .85rem; }
.page-plans .plan-price { font-size: 2.8rem; }
.page-plans .plan-features li { padding: .45rem 0; border-bottom: 1px solid #f3f4f6; gap: .65rem; }
.page-plans .plan-features li:last-child { border-bottom: none; }
.page-plans .plan-features li.na { color: #d1d5db; }
.page-plans .plan-features li.na::before { content: '–'; color: #d1d5db; }
.page-plans .plan-btn { padding: .7rem; border-radius: 9px; font-size: .95rem; }

.faq { max-width: 680px; margin: 0 auto; padding: 0 1.5rem 5rem; }
.faq h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 2rem; text-align: center; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.faq-item p  { font-size: .875rem; color: var(--muted); line-height: 1.65; }


/* ============================================================
   Legal pages (imprint.php, privacy.php, terms.php)
   ============================================================ */

.page-legal nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.5rem;
    height: auto;
    position: static;
    backdrop-filter: none;
    background: #fff;
}
.content { max-width: 90%; margin: 3rem auto; padding: 0 1.5rem 4rem; }
.page-legal h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; }
.page-legal h2 { font-size: 1.1rem; font-weight: 700; margin: 2rem 0 .5rem; }
.page-legal p  { color: var(--muted); line-height: 1.7; margin-bottom: .75rem; }
.page-legal li { color: var(--muted); line-height: 1.7; margin-bottom: .75rem; }
.page-legal ul { padding-left: 1.25rem; margin-bottom: .75rem; }
.page-legal a  { color: var(--brand); }
.last-updated  { color: var(--muted); font-size: .875rem; margin-bottom: 2rem; }
