.ticket-create-container {
    --ticket-primary: #7B3FE4;
    --ticket-primary-dark: #5A2DB0;
    --ticket-primary-light: #EDE9FF;
    --ticket-bg: #FFFFFF;
    --ticket-bg-subtle: #F8F8FC;
    --ticket-text-primary: #111111;
    --ticket-text-secondary: #555555;
    --ticket-text-muted: #888888;
    --ticket-border: #E5E5E5;
    --ticket-border-focus: #7B3FE4;
    --ticket-radius-sm: 6px;
    --ticket-radius-md: 10px;
    --ticket-radius-lg: 16px;
    --ticket-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);

    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ticket-text-primary);
}

.ticket-create-card {
    background: var(--ticket-bg);
    border: 1px solid var(--ticket-border);
    border-radius: var(--ticket-radius-lg);
    box-shadow: var(--ticket-shadow);
    padding: 32px;
}

@media (max-width: 768px) {
    .ticket-create-card {
        padding: 20px;
    }
}

.ticket-create-header {
    margin-bottom: 28px;
    border-bottom: 1px solid var(--ticket-border);
    padding-bottom: 18px;
}

.ticket-create-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--ticket-text-primary);
}

.ticket-create-header p {
    font-size: 14px;
    color: var(--ticket-text-secondary);
    margin: 0;
}

/* Form Layout & Groups */
.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ticket-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .ticket-field-row {
        grid-template-columns: 1fr;
    }
}

.ticket-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ticket-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ticket-field-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ticket-text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticket-field-label .required-star {
    color: #E53E3E;
}

/* Clipboard Paste Button (Attachments) - hidden until image detected */
.ticket-btn-clipboard-paste {
    display: none;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: var(--ticket-primary-light);
    color: var(--ticket-primary);
    border: 1px solid rgba(123, 63, 228, 0.2);
    border-radius: var(--ticket-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ticket-btn-clipboard-paste.is-visible {
    display: inline-flex;
}

.ticket-btn-clipboard-paste:hover {
    background: #DFD7FE;
    border-color: var(--ticket-primary);
    color: var(--ticket-primary-dark);
}

.ticket-btn-clipboard-paste .material-symbols-outlined {
    font-size: 16px;
}

.ticket-btn-clipboard-paste.is-highlighted {
    animation: ticket-pulse 1.5s infinite;
}

@keyframes ticket-pulse {
    0% { box-shadow: 0 0 0 0 rgba(123, 63, 228, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(123, 63, 228, 0); }
    100% { box-shadow: 0 0 0 0 rgba(123, 63, 228, 0); }
}

.ticket-input-text,
input[type="text"].ticket-input-text {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    line-height: 46px !important;
    border: 1px solid var(--ticket-border) !important;
    border-radius: var(--ticket-radius-sm) !important;
    background: var(--ticket-bg) !important;
    color: var(--ticket-text-primary) !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    display: block !important;
}

.ticket-input-text:focus {
    border-color: var(--ticket-border-focus);
    box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.12);
}

.ticket-readonly-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 16px;
    background: var(--ticket-bg-subtle);
    border: 1px solid var(--ticket-border);
    border-radius: var(--ticket-radius-sm);
    font-size: 14px;
    color: var(--ticket-text-secondary);
    font-weight: 500;
    min-width: 0;
    box-sizing: border-box;
}

.ticket-readonly-badge span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-readonly-badge .material-symbols-outlined {
    font-size: 18px;
    color: var(--ticket-primary);
    flex-shrink: 0;
}

/* Priority Selector Grid */
.ticket-prio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .ticket-prio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ticket-prio-grid {
        grid-template-columns: 1fr;
    }
}

.ticket-prio-option {
    position: relative;
    display: flex;
}

.ticket-prio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ticket-prio-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1.5px solid var(--ticket-border);
    border-radius: var(--ticket-radius-sm);
    background: var(--ticket-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.ticket-prio-card:hover {
    border-color: #BDB4FE;
    background: var(--ticket-bg-subtle);
}

.ticket-prio-option input[type="radio"]:checked + .ticket-prio-card {
    border-color: var(--ticket-primary);
    background: var(--ticket-primary-light);
    box-shadow: 0 2px 8px rgba(123, 63, 228, 0.15);
}

.ticket-prio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ticket-prio-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ticket-text-primary);
}

.ticket-prio-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prio-dot-low { background-color: #718096; }
.prio-dot-default { background-color: #319795; }
.prio-dot-higher { background-color: #DD6B20; }
.prio-dot-high { background-color: #E53E3E; }

.ticket-prio-desc {
    font-size: 12px;
    color: var(--ticket-text-secondary);
    line-height: 1.45;
    word-break: break-word;
}

/* Rich Editor / Description Area */
.ticket-editor-wrapper {
    border: 1px solid var(--ticket-border);
    border-radius: var(--ticket-radius-md);
    background: var(--ticket-bg);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-editor-wrapper:focus-within {
    border-color: var(--ticket-border-focus);
    box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.12);
}

.ticket-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--ticket-bg-subtle);
    border-bottom: 1px solid var(--ticket-border);
    flex-wrap: wrap;
}

/* Format Select (Paragraph / Headings) */
.ticket-format-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 32px;
}

.ticket-format-select {
    height: 32px !important;
    padding: 0 24px 0 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--ticket-text-secondary) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--ticket-radius-sm) !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.15s ease !important;
    line-height: 32px !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

.ticket-format-select:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: transparent !important;
    color: var(--ticket-text-primary) !important;
}

.ticket-format-select:focus {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--ticket-text-primary) !important;
}

.ticket-select-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px !important;
    color: var(--ticket-text-muted);
    pointer-events: none;
}

.ticket-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--ticket-radius-sm);
    color: var(--ticket-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ticket-tool-btn:hover {
    background: #EAE8F5;
    color: var(--ticket-primary);
}

.ticket-tool-btn.is-active,
.ticket-tool-btn.active {
    background: var(--ticket-primary-light) !important;
    color: var(--ticket-primary) !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #C7B9F8;
}

.ticket-tool-btn .material-symbols-outlined {
    font-size: 18px;
}

.ticket-toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--ticket-border);
    margin: 0 4px;
}

/* ── Link Popover (Insert / Edit URL) ── */
#ticketLinkPopover {
    position: absolute;
    z-index: 10000;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06) !important;
    padding: 18px 20px !important;
    display: none;
    flex-direction: column;
    gap: 14px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}

#ticketLinkPopover .ticket-link-popover-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    padding: 0 0 2px 0;
}

#ticketLinkPopover .ticket-link-input-wrapper {
    position: relative;
    display: flex !important;
    align-items: center;
    width: 100%;
}

#ticketLinkPopover .ticket-link-input-wrapper > .material-symbols-outlined {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: #94A3B8;
    pointer-events: none;
    z-index: 1;
}

#ticketLinkPopover input[type="text"] {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    padding: 0 14px 0 38px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    line-height: 42px !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    background: #F8FAFC !important;
    color: #1E293B !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s !important;
}

#ticketLinkPopover input[type="text"]:focus {
    border-color: var(--ticket-primary) !important;
    background: #FFF !important;
    box-shadow: 0 0 0 3px rgba(123, 63, 228, .14) !important;
}

#ticketLinkPopover .ticket-link-popover-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    justify-content: flex-end;
}

#ticketLinkPopover #ticketLinkSaveBtn {
    height: 38px !important;
    padding: 0 18px !important;
    background: #7B3FE4 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s ease;
    flex-shrink: 0;
}

#ticketLinkPopover #ticketLinkSaveBtn:hover {
    background: #6530B8 !important;
}

#ticketLinkPopover #ticketLinkCloseBtn {
    height: 38px !important;
    padding: 0 14px !important;
    background: transparent !important;
    color: #64748B !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all .15s ease;
    flex-shrink: 0;
}

#ticketLinkPopover #ticketLinkCloseBtn:hover {
    background: #F1F5F9 !important;
    color: #334155 !important;
    border-color: #CBD5E1 !important;
}

/* ── Link Hover Preview Tooltip ── */
.ticket-editor-body a {
    color: var(--ticket-primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color .15s ease;
}

.ticket-editor-body a:hover {
    color: var(--ticket-primary-dark);
}

.ticket-link-preview-tooltip {
    position: absolute;
    z-index: 10000;
    background: #FFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06) !important;
    pointer-events: auto;
    max-width: 440px;
    box-sizing: border-box;
}

.ticket-link-preview-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    border-right: 1px solid #E2E8F0;
    min-width: 0;
    flex: 1;
}

.ticket-link-preview-url-box > .material-symbols-outlined {
    font-size: 18px;
    color: var(--ticket-primary);
    flex-shrink: 0;
}

.ticket-link-preview-url {
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
    display: inline-block;
    transition: color .15s ease;
}

.ticket-link-preview-url:hover {
    color: var(--ticket-primary) !important;
    text-decoration: underline !important;
}

.ticket-link-preview-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ticket-link-action-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ticket-radius-sm);
    transition: all 0.15s ease;
}

.ticket-link-action-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.ticket-link-action-btn.btn-unlink:hover {
    background: #FEF2F2;
    color: #EF4444;
}

.ticket-link-action-btn .material-symbols-outlined {
    font-size: 16px;
}

.ticket-editor-body {
    min-height: 160px;
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ticket-text-primary);
    outline: none;
    box-sizing: border-box;
}

.ticket-editor-body:empty:before {
    content: attr(data-placeholder);
    color: var(--ticket-text-muted);
    cursor: text;
}

.ticket-editor-body ul {
    margin: 8px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.ticket-editor-body ul ul {
    list-style-type: circle;
}

.ticket-editor-body ul ul ul {
    list-style-type: square;
}

/* Multi-level Hierarchical Numbered Lists: 1., 1.1, 1.1.1 */
.ticket-editor-body ol {
    margin: 8px 0;
    padding-left: 28px;
    list-style-type: none;
    counter-reset: item;
}

.ticket-editor-body ol > li {
    display: table;
    counter-increment: item;
    margin-bottom: 4px;
    position: relative;
}

.ticket-editor-body ol > li::before {
    content: counters(item, ".") ". ";
    display: table-cell;
    padding-right: 8px;
    font-weight: 600;
    color: var(--ticket-primary);
    white-space: nowrap;
    text-align: right;
}

.ticket-editor-body ol ol {
    padding-left: 18px;
    margin: 4px 0;
}

.ticket-editor-body h1 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--ticket-text-primary) !important;
    margin: 16px 0 8px 0 !important;
    line-height: 1.3 !important;
}

.ticket-editor-body h1:first-child {
    margin-top: 0 !important;
}

.ticket-editor-body h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--ticket-text-primary) !important;
    margin: 14px 0 6px 0 !important;
    line-height: 1.35 !important;
}

.ticket-editor-body h2:first-child {
    margin-top: 0 !important;
}

.ticket-editor-body h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--ticket-text-primary) !important;
    margin: 12px 0 4px 0 !important;
    line-height: 1.4 !important;
}

.ticket-editor-body h3:first-child {
    margin-top: 0 !important;
}

.ticket-editor-body p {
    margin: 0 0 10px 0;
}

.ticket-editor-body p:last-child {
    margin-bottom: 0;
}

/* Dropzone & File Attachments */
.ticket-dropzone {
    border: 2px dashed #D2CCEE;
    background: #FAF9FE;
    border-radius: var(--ticket-radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticket-dropzone:hover, .ticket-dropzone.dragover {
    border-color: var(--ticket-primary);
    background: var(--ticket-primary-light);
}

.ticket-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ticket-dropzone-icon {
    font-size: 36px !important;
    color: var(--ticket-primary);
}

.ticket-dropzone-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--ticket-text-primary);
}

.ticket-dropzone-hint {
    font-size: 12px;
    color: var(--ticket-text-muted);
}

/* File Previews List */
.ticket-file-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.ticket-file-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--ticket-bg);
    border: 1px solid var(--ticket-border);
    border-radius: var(--ticket-radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-file-card:hover {
    border-color: #D2CCEE;
    box-shadow: 0 2px 8px rgba(123, 63, 228, 0.08);
}

.ticket-file-thumb {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--ticket-bg-subtle);
    flex-shrink: 0;
}

.ticket-file-thumb-clickable {
    cursor: zoom-in;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ticket-file-thumb-clickable:hover {
    transform: scale(1.08);
    opacity: 0.9;
}

/* Image Lightbox Modal */
.ticket-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.ticket-image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ticket-image-modal-content {
    position: relative;
    z-index: 2;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ticket-image-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
    gap: 16px;
}

.ticket-image-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-image-modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748B;
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ticket-image-modal-close:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.ticket-image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
    background: #F8FAFC;
    max-height: calc(90vh - 60px);
}

.ticket-image-modal-body img {
    max-width: 100%;
    max-height: calc(90vh - 90px);
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ticket-file-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background: var(--ticket-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ticket-file-icon-box .material-symbols-outlined {
    font-size: 22px;
    color: var(--ticket-primary);
}

.ticket-file-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ticket-file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ticket-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.15s ease;
}

.ticket-file-name:hover {
    color: var(--ticket-primary);
    text-decoration: underline;
}

.ticket-file-size {
    font-size: 11px;
    color: var(--ticket-text-muted);
}

.ticket-file-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.ticket-file-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    color: #999999;
    border: none;
    border-radius: var(--ticket-radius-sm);
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.ticket-file-rename:hover {
    background: var(--ticket-primary-light);
    color: var(--ticket-primary);
}

.ticket-file-remove:hover {
    background: #FEF2F2;
    color: #E53E3E;
}

.ticket-file-action-btn .material-symbols-outlined {
    font-size: 16px;
}

/* Actions & Submit Button */
.ticket-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--ticket-border);
    padding-top: 20px;
}

.ticket-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--ticket-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--ticket-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(123, 63, 228, 0.25);
}

.ticket-btn-primary:hover {
    background: var(--ticket-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 63, 228, 0.35);
}

.ticket-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Feedback Messages */
.ticket-notice {
    padding: 14px 16px;
    border-radius: var(--ticket-radius-sm);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ticket-notice-success {
    background: #EBF8F2;
    border: 1px solid #A8E5C1;
    color: #1A7042;
}

.ticket-notice-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.ticket-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: ticket-spin 0.8s linear infinite;
}

@keyframes ticket-spin {
    to { transform: rotate(360deg); }
}

/* ── Mobile Responsive Enhancements ── */
@media (max-width: 600px) {
    .ticket-create-card {
        padding: 16px;
        border-radius: 12px;
    }

    .ticket-create-header h2 {
        font-size: 20px;
    }

    .ticket-editor-toolbar {
        padding: 6px 8px;
        gap: 2px;
    }

    .ticket-tool-btn {
        width: 30px;
        height: 30px;
    }

    .ticket-tool-btn .material-symbols-outlined {
        font-size: 16px;
    }

    .ticket-dropzone {
        padding: 18px 12px;
    }

    .ticket-file-previews {
        grid-template-columns: 1fr;
    }

    .ticket-form-actions {
        flex-direction: column;
    }

    .ticket-btn-primary {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    #ticketLinkPopover {
        width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: 12px !important;
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .ticket-link-preview-tooltip {
        max-width: calc(100vw - 24px);
        left: 12px !important;
    }

    .ticket-link-preview-url {
        max-width: 150px;
    }
}
