/* Inline SVG icons */
.ct-icon {
    display: inline-block;
    vertical-align: -0.125em;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* ============================================================
   Ticket Pages — min height so footer stays down
   ============================================================ */

.page-content:has(.at-list-cards),
.page-content:has(.ticket-empty),
.at-ticket-detail {
    min-height: auto;
}

/* ============================================================
   Ticket Status Badges (shared - list + detail)
   ============================================================ */

.ticket-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.ticket-status-open {
    background-color: #e3f2fd;
    color: #1565c0;
}

.ticket-status-in_progress {
    background-color: #fff3e0;
    color: #e65100;
}

.ticket-status-waiting_customer {
    background-color: #fce4ec;
    color: #c62828;
}

.ticket-status-snoozed {
    background-color: #fff3e0;
    color: #e65100;
}

.ticket-status-closed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.ticket-status-cancelled {
    background-color: #f5f5f5;
    color: #757575;
}

/* ============================================================
   Category Badges (shared - list + detail)
   ============================================================ */

.ticket-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8125rem;
    background-color: #f5f5f5;
    color: #555;
}

.ticket-category-delivery_tracking { background: #1976d2; color: #fff; }
.ticket-category-product_issue { background: #e53935; color: #fff; }
.ticket-category-order_modification { background: #ff9800; color: #fff; }
.ticket-category-product_usage { background: #4caf50; color: #fff; }
.ticket-category-return_exchange { background: #9c27b0; color: #fff; }
.ticket-category-payment { background: #795548; color: #fff; }
.ticket-category-commercial { background: #607d8b; color: #fff; }
.ticket-category-pest_control { background: #009688; color: #fff; }
.ticket-category-intervention { background: #3f51b5; color: #fff; }
.ticket-category-other { background: #9e9e9e; color: #fff; }

/* ============================================================
   Ticket Detail Page - POC Design
   ============================================================ */

/* Grey background for the ticket detail page */
.wrapper:has(.at-ticket-detail) {
    background: #f5f5f5;
    box-shadow: none;
}

/* Center and constrain header + content + footer to 800px */
.page-header:has(.at-ticket-header) {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.at-ticket-detail {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
    box-sizing: border-box;
}

/* --- Ticket Header --- */

.at-ticket-header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    text-transform: none;
    margin-bottom: 0;
}

.at-ticket-header h1 .material-icons,


.at-ticket-header h1 .ct-icon  {
    font-size: 28px;
    color: #E8855B;
}

.at-ticket-ref-badge {
    background: #E8855B;
    color: white;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.at-ticket-meta {
    display: flex;
    gap: 24px;
    margin-top: 8px;
    color: #555;
    font-size: 0.875rem;
}

.at-ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.at-ticket-meta-item .material-icons,


.at-ticket-meta-item .ct-icon  {
    font-size: 16px;
}

/* --- Reassurance Card --- */

.at-reassurance-card {
    background: #fff;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.at-reassurance-card--compact {
    margin-top: 12px;
    margin-bottom: 0;
    border-color: #e0e0e0;
}
.at-reassurance-card--compact .at-reassurance-body {
    padding: 16px 20px;
}
.at-reassurance-card--compact .at-reassurance-timeline {
    margin-bottom: 0;
}

.at-reassurance-header {
    background: #e8f5e9;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #c8e6c9;
}

.at-reassurance-header .material-icons,


.at-reassurance-header .ct-icon  {
    font-size: 20px;
}

.at-reassurance-body {
    padding: 24px;
}

/* Timeline */

.at-reassurance-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 20px;
}

.at-reassurance-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 auto;
    min-width: 120px;
}

.at-reassurance-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #ccc;
    background: #fff;
    margin-bottom: 10px;
    position: relative;
}

.at-reassurance-step--done .at-reassurance-dot {
    border-color: #2e7d32;
    background: #2e7d32;
}

.at-reassurance-step--done .at-reassurance-dot::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 2px;
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}

.at-reassurance-step--pending .at-reassurance-dot {
    border-color: #E8855B;
    background: #fff;
    animation: reassurance-pulse 2s ease-in-out infinite;
}

@keyframes reassurance-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 133, 91, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(232, 133, 91, 0); }
}

.at-reassurance-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #2e7d32, #E8855B);
    margin-top: 7.5px;
    border-radius: 2px;
    min-width: 40px;
}

.at-reassurance-step-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.at-reassurance-step-date {
    font-size: 0.8125rem;
    color: #555;
}

.at-reassurance-step--pending .at-reassurance-step-date {
    color: #E8855B;
    font-weight: 600;
}

/* Note */

.at-reassurance-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8faf8;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #444;
}

.at-reassurance-note .material-icons,


.at-reassurance-note .ct-icon  {
    font-size: 18px;
    color: #555;
    flex-shrink: 0;
}

/* --- Info Grid --- */

.at-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.at-info-grid--flush {
    margin-bottom: 0;
}

.at-info-item .at-label {
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 4px;
    font-weight: 600;
}

.at-info-item .at-value {
    font-weight: 500;
}

.at-highlight {
    color: #E8855B;
    font-weight: 700;
}

/* --- Ticket Cards --- */

.at-ticket-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.at-ticket-card-header {
    background: #f8f8f8;
    padding: 16px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.at-ticket-card-header .material-icons,


.at-ticket-card-header .ct-icon  {
    font-size: 20px;
    color: #666;
}

.at-ticket-card-body {
    padding: 24px;
}

/* Intervention variant (yellow card) */

.at-ticket-card--intervention {
    background: #fff8e1;
    border-color: #ffcc02;
}

.at-ticket-card-header--intervention {
    background: #fff3cd;
    border-bottom-color: #ffcc02;
}

.at-ticket-card-header--intervention .material-icons,


.at-ticket-card-header--intervention .ct-icon  {
    color: #e65100;
}

.at-ticket-card--intervention .at-info-grid {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

/* Intervention structured sections */

.at-intervention-section {
    margin-bottom: 20px;
}

.at-intervention-section:last-child {
    margin-bottom: 0;
}

.at-intervention-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 8px;
}

.at-intervention-section-title .material-icons,


.at-intervention-section-title .ct-icon  {
    font-size: 18px;
    color: #e65100;
}

.at-intervention-address {
    background: #fff;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #333;
}

.at-intervention-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.at-intervention-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.at-intervention-detail-item .at-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.at-intervention-detail-item .at-value {
    font-size: 0.9375rem;
    color: #333;
}

/* Severity level badges */

.at-severity {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    width: fit-content;
}

.at-severity--low {
    background: #e8f5e9;
    color: #2e7d32;
}

.at-severity--moderate {
    background: #fff3e0;
    color: #e65100;
}

.at-severity--high {
    background: #fce4ec;
    color: #c62828;
}

.at-severity--critical {
    background: #f44336;
    color: #fff;
}

/* --- Product Cards --- */

.at-product-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.at-product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.at-product-card:hover {
    border-color: #bdbdbd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.at-product-card-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.at-product-card-image img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    background: #fafafa;
}
.at-product-card-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 6px;
    color: #bdbdbd;
}
.at-product-card-placeholder .material-icons,

.at-product-card-placeholder .ct-icon  {
    font-size: 36px;
}
.at-product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.at-product-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.at-product-card-name:hover {
    color: #EF8354;
    text-decoration: underline;
}
.at-product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #EF8354;
}
.at-product-add-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #EF8354;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}
.at-product-add-to-cart:hover {
    background: #e06b3a;
}
.at-product-add-to-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.at-product-add-to-cart .material-icons,

.at-product-add-to-cart .ct-icon  {
    font-size: 18px;
}
.at-product-add-to-cart--done {
    background: #4caf50;
}
.at-product-add-to-cart--done:hover {
    background: #43a047;
}
.at-cart-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.at-cart-popup-overlay.visible { opacity: 1; }
.at-cart-popup-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    width: 440px;
    max-width: 92vw;
    overflow: hidden;
}
.at-cart-popup-header {
    background: #4caf50;
    color: #fff;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.at-cart-popup-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.at-cart-popup-body {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.at-cart-popup-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.at-cart-popup-product-name {
    font-weight: 600;
    color: #E8855B;
    font-size: 1rem;
    margin-bottom: 6px;
}
.at-cart-popup-product-price {
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}
.at-cart-popup-product-qty {
    color: #999;
    font-size: 0.875rem;
}
.at-cart-popup-actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
    justify-content: center;
}
.at-cart-popup-btn-continue {
    padding: 10px 24px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}
.at-cart-popup-btn-continue:hover { background: #f5f5f5; }
.at-cart-popup-btn-checkout,
.at-cart-popup-btn-checkout:hover,
.at-cart-popup-btn-checkout:visited {
    padding: 10px 24px;
    background: #E8855B;
    color: #fff !important;
    border: 1px solid #E8855B;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.at-cart-popup-btn-checkout:hover { background: #D4724A; }

/* Mobile: product cards */
@media (max-width: 576px) {
    .at-product-card {
        gap: 12px;
        padding: 10px;
    }
    .at-product-card-image,
    .at-product-card-image img,
    .at-product-card-placeholder {
        width: 70px;
        height: 70px;
    }
    .at-product-card-placeholder .material-icons,

    .at-product-card-placeholder .ct-icon  {
        font-size: 28px;
    }
    .at-product-card-name {
        font-size: 13px;
    }
    .at-product-card-price {
        font-size: 14px;
    }
    .at-product-add-to-cart {
        align-self: stretch;
        justify-content: center;
        font-size: 12px;
        padding: 7px 12px;
    }
}

/* --- Original Message --- */

.at-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 8px;
}

.at-message-meta .material-icons,


.at-message-meta .ct-icon  {
    font-size: 18px;
}

.at-message-text {
    line-height: 1.7;
    color: #333;
}

.at-message-text p {
    color: inherit;
}

/* --- Conversation --- */

.at-conversation-item {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

.at-conversation-item:last-child {
    margin-bottom: 0;
}

.at-from-agent {
    background: #f0f7ff;
    border-left: 3px solid #1565c0;
}

.at-from-client {
    background: #f5f5f5;
    border-left: 3px solid #E8855B;
}

.at-conversation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 8px;
}

.at-conversation-meta .material-icons,


.at-conversation-meta .ct-icon  {
    font-size: 18px;
}

.at-from-agent .at-conversation-meta strong {
    color: #1565c0;
}

.at-from-client .at-conversation-meta strong {
    color: #E8855B;
}

.at-conversation-date {
    margin-left: auto;
}

.at-conversation-text {
    line-height: 1.7;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
}

.at-conversation-text h3,
.at-conversation-text h4 { margin: 0.5em 0 0.25em; font-size: 1em; font-weight: 600; }
.at-conversation-text ul,
.at-conversation-text ol { margin: 0.25em 0; padding-left: 1.5em; list-style: revert; font-size: .9375rem; }
.at-conversation-text li { font-size: .9375rem; }
.at-conversation-text code { background: #f0f0f0; padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.9em; }
.at-conversation-text a { color: #E8855B; text-decoration: underline; }
.at-conversation-text p { color: inherit; }
.at-conversation-text strong { font-weight: 600; }

.at-no-messages {
    text-align: center;
    padding: 32px;
    color: #555;
}

.at-no-messages .material-icons,


.at-no-messages .ct-icon  {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.at-no-messages p {
    color: inherit;
    margin: 0;
}

/* --- Attachments --- */

.at-attachments-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.at-attachments-label {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.at-attachments-label .material-icons,


.at-attachments-label .ct-icon  {
    font-size: 16px;
}

.at-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.at-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
}

.at-attachment-item .material-icons,


.at-attachment-item .ct-icon  {
    font-size: 16px;
    color: #555;
}

/* --- Reply Section --- */

.at-action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.at-btn-close-reply {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}
.at-btn-close-reply:hover { color: #333; }
.at-ticket-card-header { display: flex; align-items: center; justify-content: space-between; }

.at-reply-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.at-reply-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1rem;
    text-transform: none;
}

.at-reply-section h3 .material-icons,


.at-reply-section h3 .ct-icon  {
    font-size: 20px;
    color: #E8855B;
}

.at-form-group {
    margin-bottom: 16px;
}

/* Override site's .form-control styles for ticket reply textarea */
.at-reply-section textarea,
.at-reply-section .form-control {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-weight: 400;
    font-family: inherit;
    font-size: 0.9375rem;
    width: 100%;
    min-height: 100px;
    padding: 16px;
    resize: vertical;
    box-shadow: none;
}

.at-reply-section textarea:focus,
.at-reply-section .form-control:focus {
    background-color: #fff;
    border-color: #E8855B;
    outline: none;
    color: #333;
    font-weight: 400;
}

.at-file-upload-area {
    margin-bottom: 16px;
}

.at-file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease;
}

.at-file-upload-label:hover {
    background: #eee;
}

.at-file-upload-label .material-icons,


.at-file-upload-label .ct-icon  {
    font-size: 18px;
    color: #666;
}

.at-file-upload-area input[type="file"] {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
}

.at-file-hint {
    font-size: 0.8125rem;
    color: #666;
    margin-top: 6px;
}
.at-char-count {
    display: block;
    text-align: right;
    font-size: 0.8125rem;
    color: #999;
    margin-top: 4px;
}

.at-reply-section .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.at-reply-section .checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.at-reply-section .checkbox-label a {
    color: #e07340;
    text-decoration: underline;
}

.at-captcha-container {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.at-captcha-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 8px;
}

.at-captcha-error .material-icons,


.at-captcha-error .ct-icon  {
    font-size: 18px;
}

.at-reply-actions {
    display: flex;
    justify-content: flex-end;
}

.at-rating-section .at-reply-actions {
    justify-content: center;
}

.at-reply-actions .btn .material-icons,


.at-reply-actions .btn .ct-icon  {
    font-size: 18px;
}

/* Reply status (class names must match ticket_reply.js) */
.ticket-reply-status {
    margin-top: 12px;
    font-size: 0.875rem;
}

.ticket-reply-status.success {
    color: #2e7d32;
}

.ticket-reply-status.error {
    color: #c62828;
}

/* --- Waiting Notice (ping-pong) --- */

.at-waiting-notice {
    margin-top: 24px;
    margin-bottom: 24px;
}

.at-back-section {
    margin-top: 24px;
    margin-bottom: 8px;
}

/* --- Closed Notice --- */

.at-closed-notice {
    margin-bottom: 24px;
}

.at-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.at-alert .material-icons,


.at-alert .ct-icon  {
    font-size: 22px;
    flex-shrink: 0;
}

.at-alert-info {
    background: #e3f2fd;
    color: #1565c0;
}

.at-alert-warning {
    background: #fff3e0;
    color: #e65100;
}

.at-alert-danger {
    background: #fdecea;
    color: #c62828;
}

.at-alert-muted {
    background: #f5f5f5;
    color: #757575;
}

/* --- Cancel Section --- */

.at-cancel-section {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-end;
}

.at-cancel-section .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dc3545;
    border-color: #dc3545;
}
.at-cancel-section .btn:hover {
    background: #dc3545;
    color: #fff;
}

.at-cancel-section .btn .material-icons,


.at-cancel-section .btn .ct-icon  {
    font-size: 18px;
}

/* --- Edit Message --- */

.at-edit-message-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    padding: 4px 12px;
}

.at-edit-message-btn .material-icons,


.at-edit-message-btn .ct-icon  {
    font-size: 16px;
}

.at-edit-form .at-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    color: #333;
    background: #fff;
}

.at-edit-form .at-edit-textarea:focus {
    border-color: #E8855B;
    outline: none;
}

.at-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.at-edit-actions .btn .material-icons,


.at-edit-actions .btn .ct-icon  {
    font-size: 16px;
}

/* --- Toast --- */

.at-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9375rem;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
}

.at-toast--success {
    background: #2e7d32;
    color: #fff;
}

.at-toast--fade {
    opacity: 0;
}

.at-reply-section--compact {
    border: none;
    padding: 0;
    background: transparent;
}

/* ============================================================
   Mobile ticket cards (list page)
   ============================================================ */

.ticket-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-card {
    display: block;
    padding: 1rem;
    background: #fff;
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.ticket-card:hover {
    box-shadow: 2px 2px 12px 0 rgba(0, 0, 0, 0.15);
}

.ticket-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ticket-card__reference {
    font-weight: 600;
    color: #232323;
    font-size: 0.875rem;
}

.ticket-card__date {
    font-size: 0.8125rem;
    color: #555;
}

.ticket-card__body {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================================
   Empty state (list page)
   ============================================================ */

.ticket-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.ticket-empty p {
    margin-bottom: 1rem;
    color: #7a7a7a;
}

/* ============================================================
   Pagination (list page)
   ============================================================ */

.ticket-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.ticket-pagination .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.ticket-pagination .page-item .page-link {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #232323;
    font-size: 0.875rem;
}

.ticket-pagination .page-item .page-link:hover {
    background: #f5f5f5;
    border-color: #bbb;
    text-decoration: none;
}

.ticket-pagination .page-item.active .page-link {
    background: #ff8e4f;
    color: #fff;
    border-color: #ff8e4f;
}

.ticket-pagination .page-item.active .page-link:hover {
    background: #ff8e4f;
}

/* ============================================================
   Guest followup intro
   ============================================================ */

.ticket-guest-intro {
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: #444;
}

/* ============================================================
   Rating Section
   ============================================================ */

.at-rating-section {
    margin-bottom: 24px;
}

.at-rating-prompt {
    color: #444;
    margin-bottom: 16px;
    font-size: 1rem;
    text-align: center;
}

.at-star-selector,
.at-star-display {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 8px 0;
}

.at-star {
    font-size: 48px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.at-star--interactive:hover {
    transform: scale(1.15);
}

.at-star--filled {
    color: #E8855B;
}

.at-star--empty {
    color: #ccc;
}

.at-star--interactive {
    cursor: pointer;
    color: #ccc;
}

.at-star--interactive:hover,
.at-star--interactive.at-star--filled {
    color: #E8855B;
}

.at-rating-comment {
    color: #444;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: 8px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
}

.at-rating-section textarea,
.at-rating-section .form-control {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-weight: 400;
    font-family: inherit;
    font-size: 0.9375rem;
    width: 100%;
    min-height: 60px;
    padding: 12px 16px;
    resize: vertical;
    box-shadow: none;
}

.at-rating-section textarea:focus,
.at-rating-section .form-control:focus {
    background-color: #fff;
    border-color: #E8855B;
    outline: none;
    color: #333;
    font-weight: 400;
}

/* ============================================================
   FAQ Deflection Section (ticket creation)
   ============================================================ */

.ct-faq-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 0.9375rem;
}

.ct-faq-header i {
    font-size: 1.1rem;
}

.ct-faq-article {
    border: 1px solid #e0e0e0;
    border-top: none;
    background: #fff;
}

.ct-faq-article:last-of-type {
    border-radius: 0 0 8px 8px;
}

.ct-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    text-align: left;
    transition: background 0.15s ease;
}

.ct-faq-question:hover {
    background: #f8f8f8;
}

.ct-faq-chevron {
    font-size: 0.875rem;
    color: #555;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.ct-faq-chevron--open {
    transform: rotate(180deg);
}

.ct-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #444;
}

.ct-faq-answer--open {
    max-height: 500px;
    padding: 0 16px 16px;
}

.ct-faq-answer p {
    margin: 0.5em 0;
    color: inherit;
}

.ct-faq-answer a {
    color: #E8855B;
    text-decoration: underline;
}

.ct-faq-loading {
    text-align: center;
    padding: 24px;
    color: #555;
    font-size: 0.9375rem;
}

.ct-faq-loading i {
    margin-right: 8px;
}

.ct-btn-deflection {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px;
    background: #fff;
    border: 2px solid #E8855B;
    border-radius: 8px;
    color: #E8855B;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: center;
}

.ct-btn-deflection:hover {
    background: #E8855B;
    color: #fff;
}

.ct-btn-deflection i {
    margin-right: 8px;
}

/* ============================================================
   CAPTCHA Widget (ticket creation)
   ============================================================ */

.ct-captcha-container {
    margin: 16px 0 24px;
}

.ct-captcha-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #c62828;
    font-size: 0.875rem;
}

.ct-captcha-error i {
    font-size: 0.875rem;
}

/* ============================================================
   Login Gate Styles
   ============================================================ */

.at-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 48px 16px;
}

.at-login-card {
    max-width: 420px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.at-login-card-header {
    background: linear-gradient(135deg, #E8855B, #D4724A);
    color: white;
    padding: 32px;
    text-align: center;
}

.at-login-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 12px 0 8px;
    text-transform: none;
}

.at-login-card-header p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.at-login-card-header-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.at-login-card-header-icon .material-icons,


.at-login-card-header-icon .ct-icon  {
    font-size: 36px;
    color: white;
}

.at-login-card-body {
    padding: 32px;
}

.at-login-card-footer {
    text-align: center;
    padding: 16px 32px;
    border-top: 1px solid #e0e0e0;
    background: #f8f8f8;
}

.at-login-card-footer p {
    font-size: 0.875rem;
    color: #555;
    margin: 0;
}

.at-login-form-group {
    margin-bottom: 16px;
}

.at-login-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: #333;
}

.at-login-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.at-login-form-group input:focus {
    border-color: #E8855B;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 133, 91, 0.15);
}

.at-login-forgot-link {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: #E8855B;
    margin-bottom: 16px;
    text-decoration: none;
}

.at-login-forgot-link:hover {
    text-decoration: underline;
}

.at-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #E8855B;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.at-login-btn:hover {
    background: #D4724A;
    color: white;
    text-decoration: none;
}

.at-login-btn .material-icons,


.at-login-btn .ct-icon  {
    font-size: 20px;
}

.at-login-btn--outline {
    background: transparent;
    color: #E8855B;
    border: 2px solid #E8855B;
}

.at-login-btn--outline:hover {
    background: #E8855B;
    color: white;
}

.at-login-separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: #555;
    font-size: 0.875rem;
}

.at-login-separator::before,
.at-login-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.at-login-error {
    background: #fce4ec;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

/* Wider card variant (for forms with more fields) */
.at-login-card--wide {
    max-width: 480px;
}

/* Success message */
.at-login-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Radio group for gender selection */
.at-login-radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.at-login-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.at-login-radio-group label:hover {
    border-color: #E8855B;
}

.at-login-radio-group input[type="radio"] {
    width: auto;
    padding: 0;
    accent-color: #E8855B;
}

.at-login-radio-group input[type="radio"]:checked + span {
    color: #E8855B;
    font-weight: 600;
}

/* Password field with toggle */
.at-login-password-wrapper {
    position: relative;
}

.at-login-password-wrapper input {
    padding-right: 48px;
}

.at-login-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.at-login-password-toggle:hover {
    color: #E8855B;
}

.at-login-password-toggle .material-icons,


.at-login-password-toggle .ct-icon  {
    font-size: 20px;
}

/* Back link in card footer (discrete ghost button) */
.at-login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.at-login-back-link:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
    text-decoration: none;
}

.at-login-back-link .material-icons,


.at-login-back-link .ct-icon  {
    font-size: 18px;
}

/* Inline field error */
.at-login-field-error {
    color: #c62828;
    font-size: 0.8125rem;
    margin-top: 4px;
}

/* Override Django form-control styles inside login cards */
.at-login-form-group input.form-control {
    background-color: #fff;
    color: #333;
    font-weight: 400;
    box-shadow: none;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
}

.at-login-form-group input.form-control:focus {
    background-color: #fff;
    color: #333;
    font-weight: 400;
    border: 1px solid #E8855B;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 133, 91, 0.15);
}

/* Customer email display */
.at-login-email-display {
    text-align: center;
    font-size: 0.9375rem;
    color: #555;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: #f8f8f8;
    border-radius: 6px;
}

/* ============================================================
   Override global a:hover { color: #EC7330 !important }
   from _link.scss — keeps button/link hover colors correct
   ============================================================ */

a.at-login-btn:hover,
a.at-login-btn--outline:hover {
    color: #fff !important;
}

a.at-login-back-link:hover {
    color: #333 !important;
}

a.at-login-forgot-link:hover {
    color: #E8855B !important;
}

a.at-btn-back:hover,
a.ct-btn-deflection:hover {
    color: #fff !important;
}

a.at-reopen-link:hover {
    color: #E8855B !important;
}

a.at-conversation-text:hover {
    color: #E8855B !important;
}

/* ============================================================
   Ticket List Header
   ============================================================ */

.at-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.at-list-header h1 {
    margin-bottom: 0;
}

/* ============================================================
   Ticket List Card Styles
   ============================================================ */

.at-list-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.at-list-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}

.at-list-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.at-list-card-ref {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #333;
    min-width: 180px;
}

.at-list-card-date {
    font-size: 0.875rem;
    color: #555;
    min-width: 100px;
}

.at-list-card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.at-list-card-action {
    margin-left: auto;
    color: #999;
    transition: color 0.15s ease;
}

.at-list-card:hover .at-list-card-action {
    color: #E8855B;
}

.at-list-card-action .material-icons,


.at-list-card-action .ct-icon  {
    font-size: 24px;
}

/* Updated empty state */
.ticket-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.ticket-empty .material-icons,


.ticket-empty .ct-icon  {
    font-size: 3rem;
    color: #ccc;
    display: block;
    margin-bottom: 12px;
}

.ticket-empty p {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1rem;
}

/* Override global p { color: #7a7a7a } from theme.css for all ticket components */
.at-reassurance-note p,
.at-rating-comment p,
.at-alert p,
.ticket-guest-intro p {
    color: inherit;
}

/* ============================================================
   Detail Page Button Polish
   ============================================================ */

.at-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #E8855B;
    color: #E8855B;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.at-btn-back:hover {
    background: #E8855B;
    color: white;
    text-decoration: none;
}

.at-btn-back .material-icons,


.at-btn-back .ct-icon  {
    font-size: 18px;
}

a.at-btn-send, button.at-btn-send, .at-btn-send {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E8855B;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

a.at-btn-send:hover, button.at-btn-send:hover, .at-btn-send:hover {
    background: #D4724A;
    color: #fff !important;
    text-decoration: none !important;
}

.at-btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.at-btn-send .material-icons,


.at-btn-send .ct-icon  {
    font-size: 18px;
}

.at-file-upload-input-wrapper input[type="file"] {
    display: none;
}

/* ============================================================
   Rating Card (orange theme)
   ============================================================ */

.at-ticket-card--rating {
    border-color: #E8855B;
}

.at-ticket-card-header--rating {
    background: linear-gradient(135deg, #E8855B, #D4724A);
    color: white;
    border-bottom-color: #E8855B;
}

.at-ticket-card-header--rating .material-icons,


.at-ticket-card-header--rating .ct-icon  {
    color: white;
}

/* ============================================================
   Reopen Link
   ============================================================ */

.at-reopen-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #E8855B;
    font-weight: 600;
    font-size: 0.9375rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.at-reopen-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.at-reopen-link .material-icons,


.at-reopen-link .ct-icon  {
    font-size: 18px;
}

/* ============================================================
   Modal Overlay
   ============================================================ */

.at-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.at-modal-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.at-modal {
    background: white;
    max-width: 480px;
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.at-modal-header {
    background: linear-gradient(135deg, #E8855B, #D4724A);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
}

.at-modal-header .material-icons,


.at-modal-header .ct-icon  {
    font-size: 24px;
}

.at-modal-body {
    padding: 24px;
    line-height: 1.7;
    color: #444;
    font-size: 0.9375rem;
}

.at-modal-body p {
    margin: 0 0 12px;
    color: inherit;
}

.at-modal-body p:last-child {
    margin-bottom: 0;
}

.at-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f8f8;
}

.at-modal-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #666;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.at-modal-btn-cancel:hover {
    background: #f0f0f0;
}

.at-modal-btn-confirm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #E8855B;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.at-modal-btn-confirm:hover {
    background: #D4724A;
}

.at-modal-header--danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.at-modal-btn-confirm--danger {
    background: #ef4444;
}
.at-modal-btn-confirm--danger:hover {
    background: #dc2626;
}

.at-modal-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    margin-top: 8px;
}
.at-modal-textarea:focus {
    outline: none;
    border-color: #E8855B;
    box-shadow: 0 0 0 2px rgba(232, 133, 91, 0.2);
}

.at-modal-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 767px) {
    .at-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .at-ticket-card {
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .at-ticket-card-header {
        padding: 10px 14px;
        font-size: 0.875rem;
    }

    .at-ticket-card-body {
        padding: 12px 14px;
    }

    .at-cancel-section {
        margin-bottom: 12px;
    }

    .at-conversation-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .at-reply-section {
        padding: 16px;
    }

    .at-conversation-meta {
        flex-wrap: wrap;
    }

    .at-conversation-date {
        margin-left: 0;
        width: 100%;
    }

    .at-ticket-header h1 {
        font-size: 1.125rem;
    }

    .at-ticket-header h1 .material-icons,


    .at-ticket-header h1 .ct-icon  {
        font-size: 22px;
    }

    .at-ticket-ref-badge {
        font-size: 0.75rem;
        padding: 2px 8px;
    }

    .at-ticket-meta {
        margin-top: 4px;
        gap: 12px;
    }

    .page-header:has(.at-ticket-header) {
        margin-bottom: 12px;
    }

    .at-info-grid {
        gap: 8px;
        padding: 12px;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .at-info-item .at-label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .at-reassurance-card {
        margin-bottom: 16px;
    }

    .at-reassurance-header {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }

    .at-reassurance-body {
        padding: 12px 14px;
    }

    .at-reassurance-step {
        min-width: 80px;
    }

    .at-reassurance-step-label {
        font-size: 0.75rem;
    }

    .at-reassurance-step-date {
        font-size: 0.75rem;
    }

    .at-reassurance-note {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }

    .at-alert {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .at-star {
        font-size: 44px;
    }

    .at-star-selector,
    .at-star-display {
        gap: 8px;
    }

    .at-login-card-header {
        padding: 24px;
    }

    .at-login-card-body {
        padding: 24px;
    }

    .at-login-card--wide {
        max-width: 100%;
    }

    .at-login-radio-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .at-list-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 14px;
        position: relative;
    }

    .at-list-card-ref {
        min-width: auto;
        font-size: 0.875rem;
    }

    .at-list-card-date {
        min-width: auto;
        font-size: 0.8125rem;
        color: #888;
        margin-top: -4px;
    }

    .at-list-card-badges {
        gap: 6px;
    }

    .at-list-card-action {
        display: none;
    }

    .at-modal {
        width: 95%;
    }

    .at-modal-footer {
        flex-direction: column;
    }

    .at-modal-footer button {
        width: 100%;
        justify-content: center;
    }

    /* Mobile text readability: enforce minimum 0.875rem (14px) */
    .at-ticket-meta,
    .at-message-meta,
    .at-conversation-meta,
    .at-attachments-label,
    .at-attachment-item,
    .at-file-hint,
    .at-edit-message-btn,
    .at-list-card-date,
    .at-list-card-ref,
    .ticket-card__date,
    .ticket-card__reference,
    .at-login-card-footer p,
    .ticket-status-badge,
    .ticket-category-badge {
        font-size: 0.875rem;
    }

    /* Slightly larger message text on mobile for easier reading */
    .at-message-text,
    .at-conversation-text {
        font-size: 1rem;
    }
}
