/* GenAI Unplugged Affiliate Dashboard */

:root {
    --teal: #367e83;
    --teal-dark: #2a5f63;
    --teal-light: #4a9da3;
    --teal-pale: #e8f3f4;
    --cream: #faf9f5;
    --yellow: #ffde59;
    --yellow-dark: #e5c74f;
    --charcoal: #2a2a2a;
    --gray: #6b6b6b;
    --gray-light: #9a9a9a;
    --border: #e5e2d8;
    --bg: var(--cream);
    --white: #ffffff;
    --danger: #c0392b;
    --success: #2a8f5e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--charcoal);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); }
.btn-accent { background: var(--yellow); color: var(--charcoal); }
.btn-accent:hover:not(:disabled) { background: var(--yellow-dark); }
.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ── Login screen ────────────────────────────────────── */
.auth-container {
    max-width: 440px;
    margin: 80px auto 40px;
    padding: 40px 32px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(42, 42, 42, 0.06);
    text-align: center;
}
.auth-brand-link {
    display: inline-block;
    margin-bottom: 20px;
}
.auth-brand-icon {
    width: 56px;
    height: 56px;
    transition: transform 0.2s ease;
}
.auth-brand-icon:hover { transform: scale(1.05); }
.auth-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0 0 12px;
}
.auth-container h1 span {
    background: linear-gradient(180deg, transparent 60%, var(--yellow) 60%);
    padding: 0 4px;
    color: var(--charcoal);
}
.auth-container .subtitle {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 28px;
}
.auth-container input[type="email"] {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 14px;
    transition: border-color 0.15s ease;
}
.auth-container input[type="email"]:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-pale);
}
.form-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.form-message.success {
    background: #e8f7ef;
    color: var(--success);
    border: 1px solid #b7e3c8;
}
.form-message.error {
    background: #fdecea;
    color: var(--danger);
    border: 1px solid #f5c6c2;
}
.auth-footer {
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray);
}
.auth-legal {
    margin-top: 20px;
    font-size: 11px;
    color: var(--gray-light);
}
.auth-legal a {
    color: var(--gray-light);
    text-decoration: underline;
}

/* ── Dashboard ──────────────────────────────────────── */
.app-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--charcoal);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}
.header-brand img { width: 32px; height: 32px; }
.header-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--gray);
}

.dashboard {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    gap: 24px;
}

.hero-card {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: white;
    border-radius: 16px;
    padding: 32px;
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr auto;
    align-items: center;
}
@media (max-width: 720px) {
    .hero-card { grid-template-columns: 1fr; }
}
.hero-card .eyebrow {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    opacity: 0.8;
    margin: 0 0 6px;
}
.hero-card h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}
.hero-card .hero-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 540px;
}
.code-block {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 220px;
}
.code-label {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}
.code-value-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.code-value-row code {
    font-family: 'Roboto Mono', 'SF Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--yellow);
    flex: 1;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(42, 42, 42, 0.04);
}
.card-header {
    margin-bottom: 20px;
}
.card-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--charcoal);
    margin: 0 0 6px;
}
.card-header p {
    margin: 0;
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
}

.muted { color: var(--gray); font-size: 14px; }

/* ── Links table ────────────────────────────────────── */
.links-table {
    display: grid;
    gap: 12px;
}
.link-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.link-row .info { min-width: 0; }
.link-row .product-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--charcoal);
    margin: 0 0 4px;
}
.link-row .product-name-link {
    display: inline-block;
    text-decoration: none;
}
.link-row .product-name-link:hover {
    color: var(--teal);
    text-decoration: underline;
}
.link-row .product-meta {
    font-size: 12px;
    color: var(--gray);
    margin: 0;
}
.link-row .url-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.link-row .link-url {
    flex: 1;
    min-width: 0;
    font-family: 'Roboto Mono', 'SF Mono', monospace;
    font-size: 12px;
    color: var(--teal);
    background: var(--white);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.link-row .url-row .btn {
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .link-row .url-row { flex-direction: column; }
    .link-row .url-row .btn { align-self: flex-start; }
}

/* ── Share text ─────────────────────────────────────── */
.share-block {
    display: grid;
    gap: 12px;
}
.share-block textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: var(--cream);
    color: var(--charcoal);
}
.share-block button { justify-self: start; }

/* ── PayPal ─────────────────────────────────────────── */
.paypal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.paypal-current {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: var(--charcoal);
}
.paypal-edit {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.paypal-edit input {
    flex: 1;
    min-width: 220px;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}
.paypal-edit input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-pale);
}

/* ── Facts ──────────────────────────────────────────── */
.facts-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    margin: 0 0 16px;
}
.facts {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    gap: 10px;
}
.facts li {
    padding: 12px 16px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 14px;
    color: var(--charcoal);
}

/* ── Cookie banner ──────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(42,42,42,0.12);
    padding: 16px 20px;
    z-index: 1000;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-inner p {
    margin: 0;
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    flex: 1;
    min-width: 240px;
}
