/* ============================================================
   Auth, Account & Ticket pages
   ============================================================ */

/* ---------- Shared wrapper ---------- */
.auth-page,
.account-page,
.ticket-page {
    max-width: 1080px;
    margin: 0 auto;
    font-family: 'Nunito', Arial, sans-serif;
    color: #0b1220;
    box-sizing: border-box;
}
.auth-page *,
.account-page *,
.ticket-page * { box-sizing: border-box; }

.auth-page-narrow { max-width: 520px;  }

/* ---------- Auth card ---------- */
.auth-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 20px;
    padding: 38px 34px 30px;
    box-shadow: 0 30px 60px -30px rgba(11,18,32,.28);
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 {
    font-size: 26px;
    font-weight: 900;
    color: #0b1220;
    margin: 0 0 8px;
    letter-spacing: -.02em;
}
.auth-head .sub {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.auth-card .form-group { margin-bottom: 18px; }
.auth-card label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 8px;
}
.auth-card .input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e5eaf1;
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
    color: #0b1220;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.auth-card .input:focus {
    outline: 0;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 4px rgba(44,90,160,.12);
}
.auth-card .rq { color: #ef4444; }

.auth-card .btn,
.auth-card .btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 22px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c5aa0, #4a8fd4);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px -12px rgba(44,90,160,.5);
    transition: transform .18s, box-shadow .18s;
}
.auth-card .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -12px rgba(44,90,160,.65);
}
.auth-card .btn:disabled { opacity: .7; cursor: not-allowed; }

.auth-foot {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.auth-foot p { margin: 4px 0; }
.auth-foot a { color: #2c5aa0; font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- Status messages ---------- */
.msg-status { margin: 12px 0; }
.msg-status:empty { display: none; }
.msg-status .error,
.msg-status .success {
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}
.msg-status .error   { background: #ffdede; color: #c23030; }
.msg-status .success { background: #dcf7ea; color: #0d8a52; }

/* ---------- Account page ---------- */
.account-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 26px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.account-head .eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: #e8efff;
    color: #2c5aa0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.account-head h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    color: #0b1220;
}
.account-head .sub { font-size: 14px; color: #64748b; margin: 0; }

.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}
.account-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.account-card:hover {
    transform: translateY(-3px);
    border-color: #2c5aa0;
    box-shadow: 0 16px 32px -20px rgba(44,90,160,.5);
    color: inherit;
}
.account-card-ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e8efff;
    color: #2c5aa0;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex: none;
}
.account-card b {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: #0b1220;
    margin-bottom: 2px;
}
.account-card span { font-size: 12px; color: #64748b; }

.account-tickets {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 18px;
    overflow: hidden;
}
.account-tickets-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbff, #fff);
    flex-wrap: wrap;
}
.account-tickets-head h2 {
    font-size: 16px;
    font-weight: 800;
    color: #0b1220;
    margin: 0;
    letter-spacing: -.01em;
}
.account-tickets-head .btn,
.account-tickets-head .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #2c5aa0;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.account-tickets-head .btn:hover {
    background: #1a3a6e;
    transform: translateY(-1px);
    color: #fff;
}

.ticket-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f2f6;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: #fafbff; color: inherit; }

.ticket-id {
    font-family: monospace;
    font-size: 13px;
    font-weight: 800;
    color: #2c5aa0;
    background: #e8efff;
    padding: 4px 10px;
    border-radius: 6px;
    flex: none;
}
.ticket-main { flex: 1; min-width: 0; }
.ticket-main b {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0b1220;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticket-main small {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.ticket-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    flex: none;
}
.ticket-status.status-open     { background: #e8efff; color: #2c5aa0; }
.ticket-status.status-answered { background: #dcf7ea; color: #0d8a52; }
.ticket-status.status-closed   { background: #f0f2f6; color: #64748b; }

.ticket-row > .fa-chevron-right {
    color: #cbd5e1;
    font-size: 12px;
    flex: none;
}

.empty-tickets {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}
.empty-tickets i {
    display: block;
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 14px;
}
.empty-tickets p { font-size: 14px; margin: 0 0 16px; }

/* ---------- Ticket page (form + thread) ---------- */
.ticket-header { text-align: center; margin-bottom: 32px; }
.ticket-header .eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: #e8efff;
    color: #2c5aa0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.ticket-header h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 10px;
    color: #0b1220;
}
.ticket-header .sub { font-size: 14px; color: #64748b; margin: 0; }

.ticket-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 18px;
    padding: 32px 30px;
    box-shadow: 0 20px 40px -30px rgba(11,18,32,.3);
}
.ticket-form-wrap .form-group { margin-bottom: 18px; }
.ticket-form-wrap .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.ticket-form-wrap label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 8px;
}
.ticket-form-wrap .input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5eaf1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0b1220;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.ticket-form-wrap .input:focus {
    outline: 0;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 4px rgba(44,90,160,.12);
}
.ticket-form-wrap .textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.65;
}
.ticket-form-wrap .rq { color: #ef4444; }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}
.ticket-form-wrap .btn,
.ticket-reply .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #2c5aa0, #4a8fd4);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px -12px rgba(44,90,160,.5);
    transition: transform .18s, box-shadow .18s;
}
.ticket-form-wrap .btn:hover:not(:disabled),
.ticket-reply .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -14px rgba(44,90,160,.65);
}
.ticket-form-wrap .btn:disabled,
.ticket-reply .btn:disabled { opacity: .7; cursor: not-allowed; }

.ticket-form-wrap .btn-outline,
.ticket-reply .btn-outline,
.ticket-page .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid #e5eaf1;
    border-radius: 10px;
    background: #fff;
    color: #0b1220;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.ticket-page .btn-outline:hover,
.ticket-form-wrap .btn-outline:hover,
.ticket-reply .btn-outline:hover {
    border-color: #2c5aa0;
    color: #2c5aa0;
    background: #f0f6ff;
}

/* ---------- Ticket thread ---------- */
.ticket-thread {
    max-width: 780px;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ticket-msg {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 8px 20px -18px rgba(11,18,32,.25);
}
.ticket-msg-staff {
    border-left: 4px solid #2c5aa0;
    background: linear-gradient(180deg, #fafbff, #fff);
}
.ticket-msg-user { border-left: 4px solid #10b981; }

.ticket-msg header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f6;
}
.ticket-msg-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5aa0, #4a8fd4);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    flex: none;
}
.ticket-msg-staff .ticket-msg-av {
    background: linear-gradient(135deg, #2c5aa0, #1a3a6e);
}
.ticket-msg header b {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0b1220;
}
.ticket-msg header small {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}
.staff-tag {
    display: inline-block;
    background: #2c5aa0;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    letter-spacing: .06em;
    text-transform: uppercase;
    vertical-align: middle;
}
.ticket-msg-body {
    font-size: 14px;
    line-height: 1.7;
    color: #1e293b;
    word-wrap: break-word;
}

/* ---------- Reply box ---------- */
.ticket-reply {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 20px -18px rgba(11,18,32,.25);
}
.ticket-reply h3 {
    font-size: 15px;
    font-weight: 800;
    color: #0b1220;
    margin: 0 0 14px;
}
.ticket-reply .textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5eaf1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0b1220;
    background: #fff;
    resize: vertical;
    min-height: 120px;
    line-height: 1.65;
}
.ticket-reply .textarea:focus {
    outline: 0;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 4px rgba(44,90,160,.12);
}

.ticket-closed-note {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: 22px;
    background: #f0f2f6;
    color: #64748b;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .auth-page,
    .account-page,
    .ticket-page { padding: 40px 16px 60px; }
    .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
    .auth-head h1 { font-size: 22px; }
    .account-head h1 { font-size: 22px; }
    .ticket-header h1 { font-size: 22px; }
    .ticket-form-wrap { padding: 22px 20px; }
    .ticket-form-wrap .form-row { grid-template-columns: 1fr; }
    .ticket-row { gap: 12px; padding: 14px 18px; }
    .ticket-id { display: none; }
    .form-actions { justify-content: stretch; }
    .form-actions .btn,
    .form-actions .btn-outline { flex: 1 1 auto; justify-content: center; }
}