/* CandyCode Support - Public Styles */
:root {
    --cc-primary:   #6366f1;
    --cc-primary-h: #4f46e5;
    --cc-pending:   #f59e0b;
    --cc-success:   #10b981;
    --cc-danger:    #ef4444;
    --cc-bg:        #f8fafc;
    --cc-card:      #ffffff;
    --cc-text:      #1e293b;
    --cc-muted:     #64748b;
    --cc-border:    #e2e8f0;
    --cc-radius:    14px;
    --cc-shadow:    0 4px 20px rgba(0,0,0,.08);
    --cc-nav-h:     70px;
}

.cc-dashboard {
    max-width: 680px;
    margin: 0 auto;
    background: var(--cc-bg);
    min-height: 100vh;
    padding-bottom: calc(var(--cc-nav-h) + 20px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Bottom Navigation ─────────────────────────────────────── */
.cc-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--cc-nav-h);
    background: var(--cc-card);
    border-top: 1px solid var(--cc-border);
    display: flex;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
}
.cc-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    color: var(--cc-muted);
    transition: color .2s;
    gap: 3px;
}
.cc-nav-btn.active { color: var(--cc-primary); }
.cc-nav-btn.active .cc-nav-label { font-weight: 600; }
.cc-nav-icon { font-size: 1.4rem; line-height: 1; }
.cc-nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }

/* ── Section ────────────────────────────────────────────────── */
.cc-section { padding: 20px 16px; }
.cc-section-title { font-size: 1.3rem; font-weight: 700; color: var(--cc-text); margin: 0 0 16px; }
.cc-greeting { font-size: 1.5rem; font-weight: 700; color: var(--cc-text); margin: 0 0 4px; }
.cc-subtext { color: var(--cc-muted); margin: 0 0 20px; }

/* ── Summary Cards ──────────────────────────────────────────── */
.cc-summary-row { display: flex; gap: 12px; margin-bottom: 20px; }
.cc-summary-card {
    flex: 1;
    background: var(--cc-card);
    border-radius: var(--cc-radius);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--cc-shadow);
}
.cc-sum-pending  { border-top: 3px solid var(--cc-pending); }
.cc-sum-completed{ border-top: 3px solid var(--cc-success); }
.cc-sum-number { font-size: 2rem; font-weight: 700; color: var(--cc-text); display: block; }
.cc-sum-label  { font-size: .75rem; color: var(--cc-muted); display: block; margin-top: 2px; }

/* ── Alert ──────────────────────────────────────────────────── */
.cc-alert {
    padding: 14px 16px;
    border-radius: var(--cc-radius);
    margin-bottom: 16px;
    font-size: .9rem;
}
.cc-alert-warning { background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; }

/* ── Buttons ─────────────────────────────────────────────────── */
.cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.cc-btn:active { transform: scale(.97); }
.cc-btn-primary   { background: var(--cc-primary); color: #fff; }
.cc-btn-primary:hover { background: var(--cc-primary-h); }
.cc-btn-secondary { background: var(--cc-border); color: var(--cc-text); }
.cc-btn-outline   { background: transparent; border: 1px solid var(--cc-border); color: var(--cc-muted); }
.cc-btn-sm { padding: 6px 14px; font-size: .8rem; }
.cc-create-section { margin-bottom: 8px; }
.cc-create-section .cc-btn { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

/* ── Form ────────────────────────────────────────────────────── */
.cc-form-card {
    background: var(--cc-card);
    border-radius: var(--cc-radius);
    padding: 20px;
    box-shadow: var(--cc-shadow);
    margin-top: 16px;
}
.cc-form-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--cc-text); margin: 0 0 16px; }
.cc-label { font-size: .85rem; font-weight: 600; color: var(--cc-text); display: block; margin-bottom: 4px; }
.cc-req { color: var(--cc-danger); }
.cc-input { border-radius: 10px !important; border-color: var(--cc-border) !important; }
.cc-input:focus { border-color: var(--cc-primary) !important; box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important; }
.cc-form-footer { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cc-msg { font-size: .875rem; font-weight: 500; }
.cc-msg.success { color: var(--cc-success); }
.cc-msg.error   { color: var(--cc-danger); }

/* ── Ticket Card ─────────────────────────────────────────────── */
.cc-ticket-card {
    background: var(--cc-card);
    border-radius: var(--cc-radius);
    padding: 16px;
    box-shadow: var(--cc-shadow);
    margin-bottom: 12px;
}
.cc-ticket-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.cc-ticket-id { font-weight: 700; font-size: .95rem; color: var(--cc-text); margin-right: 8px; }
.cc-ticket-date { font-size: .75rem; color: var(--cc-muted); }
.cc-ticket-info { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--cc-muted); margin-bottom: 10px; }
.cc-ticket-detail { margin: 8px 0; }

/* ── Badges ──────────────────────────────────────────────────── */
.cc-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cc-badge-pending   { background: #fef3c7; color: #92400e; }
.cc-badge-completed { background: #d1fae5; color: #065f46; }

/* ── Conversation ─────────────────────────────────────────────── */
.cc-conversation { margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.cc-msg-bubble { border-radius: 12px; padding: 12px 14px; max-width: 90%; }
.cc-msg-user  { background: #eff6ff; align-self: flex-end; border-bottom-right-radius: 4px; }
.cc-msg-admin { background: #f0fdf4; align-self: flex-start; border-bottom-left-radius: 4px; }
.cc-msg-bubble.cc-small { max-width: 100%; }
.cc-msg-meta { display: flex; justify-content: space-between; font-size: .75rem; margin-bottom: 5px; color: var(--cc-muted); }
.cc-msg-meta b { color: var(--cc-text); }
.cc-msg-text { font-size: .9rem; color: var(--cc-text); line-height: 1.5; }
.cc-attachment-link { font-size: .8rem; color: var(--cc-primary); display: inline-block; margin-top: 6px; text-decoration: none; }

/* ── Reply Card ──────────────────────────────────────────────── */
.cc-reply-card {
    background: var(--cc-card);
    border-radius: var(--cc-radius);
    padding: 16px;
    box-shadow: var(--cc-shadow);
    margin-top: 12px;
}
.cc-reply-card h4 { font-size: 1rem; font-weight: 700; color: var(--cc-text); margin: 0 0 10px; }
.cc-reply-file-row { margin: 10px 0; }

/* ── Search ──────────────────────────────────────────────────── */
.cc-search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.cc-search-bar .cc-input { flex: 1; }

/* ── Empty State ──────────────────────────────────────────────── */
.cc-empty-state { text-align: center; padding: 40px 20px; color: var(--cc-muted); }
.cc-empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Login Notice ─────────────────────────────────────────────── */
.cc-login-notice { background: var(--cc-card); border-radius: var(--cc-radius); padding: 24px; text-align: center; box-shadow: var(--cc-shadow); }
.cc-login-notice a { color: var(--cc-primary); font-weight: 600; }

/* ── Loading ──────────────────────────────────────────────────── */
.cc-loading { text-align: center; padding: 40px; color: var(--cc-muted); }
.cc-spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--cc-border); border-top-color: var(--cc-primary); border-radius: 50%; animation: cc-spin .6s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }
