/* ZentCRM Support Portal — Public CSS
   ZentCRM brand: purple #9400a6, magenta #d807e4, dark navy #0f172a */

:root {
    --color-primary:   #9400a6;
    --color-primary-h: #7a0090;
    --color-accent:    #d807e4;
    --color-danger:    #dc2626;
    --color-warning:   #d97706;
    --color-success:   #16a34a;

    --bg:        #f7f7fb;
    --bg-card:   #ffffff;
    --text:      #0f172a;
    --text-muted:#6b7280;
    --border:    #e5e7eb;

    --radius:    10px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(148,0,166,.10), 0 1px 3px rgba(0,0,0,.06);
    --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ─── Page layout ────────────────────────────────────────────────────────────── */
.verify-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #f7f7fb 0%, #f3e5f5 100%);
    padding: 1.5rem;
}

.support-container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* ─── Card ───────────────────────────────────────────────────────────────────── */
.support-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    border: 1px solid rgba(148,0,166,.12);
}

.support-card-wide { max-width: 720px; margin: 0 auto; }

/* ─── Brand ──────────────────────────────────────────────────────────────────── */
.brand-logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #9400a6, #d807e4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
}

.brand-logo-sm {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(90deg, #9400a6, #d807e4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .5rem;
    letter-spacing: -.02em;
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .75rem;
}

h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }

.sub-text {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 1.75rem;
}

.help-text {
    color: var(--text-muted);
    font-size: .8rem;
    margin-top: 1.25rem;
    text-align: center;
    line-height: 1.5;
}

.back-link { text-align: center; margin-top: 1.25rem; font-size: .875rem; }

/* ─── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .9rem;
    border: 1px solid transparent;
}

.alert-success  { background: #dcfce7; border-color: #86efac; color: #15803d; }
.alert-danger   { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning  { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.alert-info     { background: #f3e5f5; border-color: #e9b8f5; color: #7a0090; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1.1rem;
}

label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
}

.required { color: var(--color-danger); }

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .9rem;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(148,0,166,.15);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    background: var(--color-primary);
    color: #fff;
    padding: .55rem 1.25rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .1s;
}

.btn:hover { background: var(--color-primary-h); color: #fff; text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn-block { width: 100%; margin-top: .25rem; padding: .7rem 1rem; }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-sm { padding: .35rem .75rem; font-size: .8rem; }

.form-actions { display: flex; gap: .75rem; align-items: center; }

/* ─── Renewal options ────────────────────────────────────────────────────────── */
.renewal-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.renewal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .1s;
    position: relative;
    background: #fff;
    color: var(--text);
}

.renewal-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(148,0,166,.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.renewal-card.renewal-featured {
    border-color: var(--color-primary);
    background: linear-gradient(160deg, #fff 0%, #f9f0fb 100%);
}

.renewal-badge {
    position: absolute;
    top: -10px;
    background: linear-gradient(90deg, #9400a6, #d807e4);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 99px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.renewal-duration {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: .15rem;
}

.renewal-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .75rem;
}

.renewal-cta {
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ─── Verified info bar ──────────────────────────────────────────────────────── */
.verified-info {
    background: #f3e5f5;
    border: 1px solid #e9b8f5;
    border-radius: var(--radius);
    padding: .6rem 1rem;
    font-size: .85rem;
    color: #7a0090;
    margin-bottom: 1.5rem;
}

/* ─── Ticket header + meta ───────────────────────────────────────────────────── */
.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.ticket-ref { font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); }

.ticket-subject {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.ticket-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* ─── Ticket thread ──────────────────────────────────────────────────────────── */
.thread { display: flex; flex-direction: column; gap: 1rem; }

.reply {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.reply-customer { background: #fff; }
.reply-admin    { background: #f3e5f5; border-color: #e9b8f5; }

.reply-author {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.reply-admin .reply-author { color: #7a0090; }

.reply-time { font-weight: 400; }

.reply-body { font-size: .9rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

.reply-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ─── Status badges ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}

.badge-open     { background: #dbeafe; color: #1d4ed8; }
.badge-progress { background: #fef9c3; color: #854d0e; }
.badge-resolved { background: #dcfce7; color: #15803d; }
.badge-closed   { background: #f3f4f6; color: #374151; }

/* ─── Misc ───────────────────────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }

@media (max-width: 520px) {
    .support-card { padding: 1.75rem 1.25rem; }
    .renewal-options { grid-template-columns: 1fr; }
    .ticket-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
}
