.tickets-module{width:100%;max-width:1180px;margin:0;color:var(--ink);display:grid;gap:16px}.ticket-heading,.ticket-tools,.ticket-panel-list,.ticket-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ticket-heading{justify-content:space-between;font-size:18px;font-weight:650}.ticket-tabs{border-bottom:1px solid var(--line);padding-bottom:10px}.tickets-module button{min-height:36px;border-radius:8px;padding:7px 12px}.tickets-module button.active{background:var(--primary,#29495d);border-color:var(--accent)}.ticket-card{margin:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.ticket-body{display:grid;gap:14px}.ticket-card>.ticket-card{margin:14px 0}.ticket-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}.ticket-grid label{margin:0 0 12px}.ticket-check{flex-direction:row;align-items:center}.ticket-check input{width:18px}.ticket-question{border:1px solid var(--line);border-radius:8px;padding:12px;margin:10px 0}.tickets-module textarea{min-height:70px}.ticket-dialog{width:min(560px,94vw);max-height:85vh;overflow:auto;background:var(--panel,#111d25);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:24px}.ticket-dialog::backdrop{background:#0009}.ticket-detail{width:min(900px,94vw)}.ticket-dialog p{white-space:pre-wrap;overflow-wrap:anywhere}.ticket-tools a{padding:8px;color:var(--accent)}.tickets-module .discord-embed-editor{max-width:850px}.tickets-module .discord-embed-visual-editor .discord-embed-controls[hidden]{display:none}.tickets-module table{min-width:800px}.tickets-module .discord-embed-preview{background:#0e151b}.tickets-module .discord-embed-reference-preview-heading{margin-bottom:8px}.ticket-tools button{flex:0 0 auto}.tickets-module button:focus:not(:focus-visible){outline:none;box-shadow:none}.ticket-dialog button:focus-visible,.tickets-module button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:760px){.ticket-grid{grid-template-columns:minmax(0,1fr)}.ticket-heading{align-items:flex-start}.ticket-card{padding:12px}.ticket-tabs{gap:5px}.tickets-module .discord-embed-card-shell{max-width:100%}}
.ticket-opening-preview{max-width:660px;margin:12px 0}.ticket-select-preview{position:relative;border:1px solid var(--line);border-radius:8px;background:#0e151b}.ticket-select-preview>summary{padding:12px;cursor:pointer;list-style:none}.ticket-select-options{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 4px);background:var(--panel,#15232d);border:1px solid var(--line);border-radius:8px;padding:6px;box-shadow:0 12px 24px #0006;max-height:320px;overflow:auto}.ticket-select-options button{width:100%;display:flex;align-items:center;text-align:left;gap:12px;border:0;background:transparent}.ticket-select-options button:hover{background:#ffffff0d}.ticket-select-options strong,.ticket-select-options small{display:block}.ticket-option-emoji{font-size:23px}.tickets-module .ticket-native-1{background:#5865f2;color:white}.tickets-module .ticket-native-2{background:#3c414b;color:white}.tickets-module .ticket-native-3{background:#248046;color:white}.tickets-module .ticket-native-4{background:#da373c;color:white}.tickets-module .discord-embed-draft-header[hidden],.tickets-module .discord-embed-preview-actions[hidden]{display:none}.tickets-module .discord-embed-reference-preview-heading,.tickets-module .discord-embed-generator-title,.tickets-module .discord-embed-generator-subtitle{display:none}.tickets-module .discord-embed-editor[open]>summary{display:none}.tickets-module .ticket-card>h3{margin-top:0}.ticket-dialog label{display:grid;gap:6px;margin:16px 0}.ticket-dialog input,.ticket-dialog textarea{width:100%;box-sizing:border-box}.ticket-dialog textarea{min-height:90px}.ticket-dialog a{color:var(--accent)}

/* Reuses the approved visual embed controls, scoped to Tickets. */
/* Editor visual: el mensaje de Discord es la superficie principal de edición. */
.tickets-module .discord-embed-visual-editor { margin: 0; padding: 0; border: 0; background: transparent; }
.tickets-module .discord-embed-visual-editor > .discord-embed-summary { display: none; }
.tickets-module .discord-embed-visual-editor > .discord-embed-form { display: grid; gap: 10px; padding: 0; }
.tickets-module .discord-embed-visual-support { display: none !important; }
.tickets-module .discord-embed-visual-editor .discord-embed-workspace { position: relative; display: block; min-width: 0; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-wrap { width: 100%; min-width: 0; padding: 0; }
.tickets-module .discord-embed-visual-editor .discord-embed-reference-preview-heading { margin-bottom: 8px; }
.tickets-module .discord-embed-visual-editor .discord-embed-reference-preview-heading h3 { margin: 0 0 3px; color: var(--ink); font-size: 15px; }
.tickets-module .discord-embed-visual-editor .discord-embed-reference-preview-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.tickets-module .discord-embed-visual-editor .discord-message-preview { width: 100%; max-width: none; box-sizing: border-box; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-low); }
.tickets-module .discord-embed-visual-editor .discord-message-content { max-width: none; }
.tickets-module .discord-embed-visual-editor .discord-embed-stack { width: 100%; max-width: none; gap: 12px; }
.tickets-module .discord-embed-visual-editor .discord-embed-card-shell { position: relative; width: 100%; min-width: 0; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview { width: 100%; max-width: none; min-width: 0; min-height: 0; background: #0e151b; }
.tickets-module .discord-embed-visual-editor .discord-embed-body { min-height: 0; padding: 14px; background: #0e151b; }
.tickets-module .discord-embed-visual-editor .discord-embed-rail { display: block; flex: 0 0 5px; width: 5px; min-height: 100%; padding: 0; border: 0; border-radius: 0; background: #5865f2; font-size: 0; cursor: pointer; }
.tickets-module .discord-embed-visual-editor .discord-embed-rail:hover { filter: brightness(1.2); }
.tickets-module .discord-embed-visual-editor .discord-embed-rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 2; }
.tickets-module .discord-embed-visual-editor .discord-embed-title,
.tickets-module .discord-embed-visual-editor .discord-embed-author-name,
.tickets-module .discord-embed-visual-editor .discord-embed-description,
.tickets-module .discord-embed-visual-editor .discord-embed-footer-text,
.tickets-module .discord-embed-visual-editor .discord-embed-field [data-embed-field] { cursor: text; }
.tickets-module .discord-embed-visual-editor [data-embed-field]:hover,
.tickets-module .discord-embed-visual-editor [data-message-content]:hover,
.tickets-module .discord-embed-visual-editor [data-upload-field]:hover { outline: 1px dashed var(--accent); outline-offset: 2px; }
.tickets-module .discord-embed-visual-editor .discord-embed-context-action { display: inline-grid; place-items: center; min-width: 25px; min-height: 25px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-high); color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; }
.tickets-module .discord-embed-visual-editor .discord-embed-context-action:hover { border-color: var(--primary-border); background: var(--primary); }
.tickets-module .discord-embed-visual-editor .discord-embed-context-action:focus-visible,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-action:focus-visible,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tickets-module .discord-embed-visual-editor .discord-embed-title + .discord-embed-context-action { margin: -3px 0 5px 3px; vertical-align: middle; }
.tickets-module .discord-embed-visual-editor .discord-embed-author-link { margin-left: 3px; opacity: .55; }
.tickets-module .discord-embed-visual-editor .discord-embed-author:hover .discord-embed-author-link,
.tickets-module .discord-embed-visual-editor .discord-embed-author-link:focus-visible { opacity: 1; }
.tickets-module .discord-embed-visual-editor .discord-embed-field { position: relative; min-width: 0; padding-inline-end: 86px; }
.tickets-module .discord-embed-visual-editor .discord-embed-field-context { position: absolute; top: 0; right: 0; display: flex; gap: 3px; opacity: .45; }
.tickets-module .discord-embed-visual-editor .discord-embed-field:hover .discord-embed-field-context,
.tickets-module .discord-embed-visual-editor .discord-embed-field:focus-within .discord-embed-field-context { opacity: 1; }
.tickets-module .discord-embed-visual-editor .discord-embed-field-context button:disabled { opacity: .4; }
.tickets-module .discord-embed-visual-editor .discord-embed-timestamp-toggle { margin-top: 6px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions { flex-basis: 32px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add { border: 1px solid var(--line); }
.tickets-module .discord-embed-visual-editor .discord-message-link-row { display: flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; margin: 6px 0; }
.tickets-module .discord-embed-visual-editor .discord-message-link-button { display: inline-flex; align-items: center; min-height: 31px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-high); color: var(--ink); text-decoration: none; }
.tickets-module .discord-embed-visual-editor .discord-message-link-row > .discord-embed-context-action { opacity: .45; }
.tickets-module .discord-embed-visual-editor .discord-message-link-row:hover > .discord-embed-context-action,
.tickets-module .discord-embed-visual-editor .discord-message-link-row:focus-within > .discord-embed-context-action { opacity: 1; }
.tickets-module .discord-embed-visual-editor .discord-embed-context-popover { position: absolute; z-index: 30; display: grid; gap: 9px; width: min(290px,calc(100vw - 40px)); padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); box-shadow: 0 12px 30px #0008; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-popover { top: 8px; left: 18px; }
.tickets-module .discord-embed-visual-editor .discord-embed-popover-heading,
.tickets-module .discord-embed-visual-editor .discord-embed-popover-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-saturation { position: relative; width: 100%; height: 142px; overflow: hidden; border-radius: 6px; background-color: red; touch-action: none; cursor: crosshair; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-marker { position: absolute; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; box-shadow: 0 1px 4px #000a; transform: translate(-50%,-50%); pointer-events: none; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-controls { display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: center; gap: 8px; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-controls input[type=range] { width: 100%; margin: 0; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-current { display: block; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 5px; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-quick .discord-embed-swatch { flex: 0 0 19px; }
.tickets-module .discord-embed-visual-editor .discord-embed-inline-error { min-height: 1em; color: #ff9ca3; font-size: 11px; }
.tickets-module .discord-embed-visual-editor .discord-embed-link-editor { position: relative; z-index: 4; display: grid; grid-template-columns: minmax(100px,.45fr) minmax(160px,1fr) minmax(200px,1.4fr) auto; align-items: end; gap: 9px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-low); }
.tickets-module .discord-embed-visual-editor .discord-embed-link-editor[hidden] { display: none; }
.tickets-module .discord-embed-visual-editor .discord-embed-link-editor-heading { grid-column: 1/-1; color: var(--ink); font-size: 12px; }
.tickets-module .discord-embed-visual-editor .discord-embed-link-emoji-row { position: relative; display: flex; align-items: end; gap: 5px; min-width: 0; }
.tickets-module .discord-embed-visual-editor .discord-embed-link-emoji-row input { min-width: 0; width: 100%; }
.tickets-module .discord-embed-visual-editor .discord-embed-emoji-picker { position: absolute; z-index: 40; bottom: calc(100% + 6px); left: 0; display: grid; grid-template-columns: repeat(6,32px); gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 8px 20px #0007; }
.tickets-module .discord-embed-visual-editor .discord-embed-emoji-picker[hidden] { display: none; }
.tickets-module .discord-embed-visual-editor .discord-embed-emoji-option { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; }
.tickets-module .discord-embed-visual-editor .discord-embed-emoji-option:hover,
.tickets-module .discord-embed-visual-editor .discord-embed-emoji-option:focus-visible { background: var(--surface-high); outline: 2px solid var(--accent); }
.tickets-module .discord-embed-visual-editor .discord-embed-popover-actions { justify-content: flex-end; }
@media (max-width: 700px) {
  .tickets-module .discord-embed-visual-editor .discord-embed-link-editor { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .tickets-module .discord-embed-visual-editor .discord-embed-link-editor > label:nth-of-type(2) { grid-column: 1/-1; }
  .tickets-module .discord-embed-visual-editor .discord-embed-link-editor .discord-embed-popover-actions { grid-column: 1/-1; }
  .tickets-module .discord-embed-visual-editor .discord-embed-color-popover { left: 12px; }
}
.tickets-module .discord-embed-visual-editor .discord-embed-draft-back { display: none; }

/* Account Age follows the reference's compact tool rails and outlined message-editor icons. */
.tickets-module .discord-embed-visual-editor .discord-embed-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tickets-module .discord-embed-visual-editor .discord-embed-card-shell { display: grid; grid-template-columns: 32px minmax(0,1fr) 32px; align-items: start; gap: 8px; }
.tickets-module .discord-embed-visual-editor .discord-embed-card-tools,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions { display: flex; flex: 0 0 32px; flex-direction: column; align-items: center; gap: 6px; padding-top: 2px; }
.tickets-module .discord-embed-visual-editor .discord-embed-card-tools .discord-embed-preview-action,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions .discord-embed-preview-action { box-sizing: border-box; width: 30px; height: 30px; min-height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-high); color: var(--muted); }
.tickets-module .discord-embed-visual-editor .discord-embed-card-tools .discord-embed-preview-action:hover,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions .discord-embed-preview-action:hover { border-color: var(--primary-border); background: var(--primary); color: var(--ink); }
.tickets-module .discord-embed-visual-editor .discord-embed-color-tool { position: relative; color: var(--accent)!important; }
.tickets-module .discord-embed-visual-editor .discord-embed-color-tool::after { position: absolute; right: 3px; bottom: 3px; width: 6px; height: 6px; border: 1px solid var(--surface-low); border-radius: 50%; background: var(--embed-card-color,#5865f2); content: ''; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-remove { color: #ff858c!important; }
.tickets-module .discord-embed-visual-editor .discord-embed-rail { appearance: none; align-self: stretch; flex-basis: 5px; width: 5px; min-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 4px 0 0 4px; background: var(--embed-card-color,#5865f2); font-size: 0; cursor: pointer; }
.tickets-module .discord-embed-visual-editor .discord-embed-rail:hover { filter: brightness(1.2); }
.tickets-module .discord-embed-visual-editor .discord-embed-rail:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--accent); outline-offset: 2px; }
.tickets-module .discord-embed-visual-editor .discord-message-heading { gap: 7px; }
.tickets-module .discord-embed-visual-editor .discord-message-avatar { flex-basis: 24px; width: 24px; height: 24px; font-size: 12px; }
.tickets-module .discord-embed-visual-editor .discord-message-identity strong { font-size: 13px; }
.tickets-module .discord-embed-visual-editor .discord-embed-author-name[data-placeholder]:empty::before { content: attr(data-placeholder); }
.tickets-module .discord-embed-visual-editor .discord-embed-author .discord-embed-icon-slot { width: 20px; height: 20px; flex-basis: 20px; }
.tickets-module .discord-embed-visual-editor .discord-embed-media-slot .discord-embed-icon { width: 22px; height: 22px; color: var(--muted); }
.tickets-module .discord-embed-visual-editor .discord-embed-icon-slot .discord-embed-icon { width: 13px; height: 13px; }
.tickets-module .discord-embed-visual-editor .discord-embed-context-action .discord-embed-icon { width: 13px; height: 13px; }
.tickets-module .discord-embed-visual-editor .discord-embed-timestamp-toggle { display: inline-flex; align-items: center; gap: 5px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add { display: inline-flex; align-items: center; gap: 7px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add .discord-embed-icon { width: 14px; height: 14px; }
.tickets-module .discord-embed-visual-editor .discord-embed-preview-add-link { border-style: dashed; }
.tickets-module .discord-embed-visual-editor .discord-embed-card-tools .discord-embed-preview-action:focus-visible,
.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions .discord-embed-preview-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media(max-width:640px) {
  .tickets-module .discord-embed-visual-editor .discord-embed-card-shell { grid-template-columns: 28px minmax(0,1fr) 28px; gap: 5px; }
  .tickets-module .discord-embed-visual-editor .discord-embed-card-tools,
  .tickets-module .discord-embed-visual-editor .discord-embed-preview-actions { flex-basis: 28px; }
  .tickets-module .discord-embed-visual-editor .discord-embed-card-tools .discord-embed-preview-action,
  .tickets-module .discord-embed-visual-editor .discord-embed-preview-actions .discord-embed-preview-action { width: 27px; height: 27px; min-height: 27px; }
}


.tickets-module .discord-embed-visual-editor .discord-embed-card-shell{grid-template-columns:32px minmax(0,1fr);max-width:660px}
.tickets-module .discord-embed-visual-editor .discord-embed-draft-header[hidden],.tickets-module .discord-embed-visual-editor .discord-embed-preview-actions[hidden]{display:none}
.tickets-module .discord-embed-visual-editor .discord-embed-preview-action,.tickets-module .discord-embed-visual-editor .discord-embed-context-action{padding:0;min-width:30px;min-height:30px}
.tickets-module .discord-embed-visual-editor .discord-embed-icon-slot{width:22px;height:22px;min-width:22px;min-height:22px;padding:0;flex:0 0 22px;border-radius:50%}
.tickets-module .discord-embed-visual-editor .discord-embed-thumb-slot{width:72px;height:72px;min-width:72px;min-height:72px;padding:0;border:1px solid var(--line)}
.tickets-module .discord-embed-visual-editor .discord-embed-image-slot{display:flex;align-items:center;gap:8px;min-height:38px;height:38px;padding:0 10px;font-size:12px;border:1px solid var(--line);background:var(--surface-high)}
.tickets-module .discord-embed-visual-editor .discord-embed-image-slot:after{content:'Añadir imagen principal'}
.tickets-module .discord-embed-visual-editor .discord-embed-inline-add-field{display:inline-flex;min-height:32px;padding:5px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface-high);color:var(--ink)}
.tickets-module .discord-embed-visual-editor [data-embed-field]:hover,.tickets-module .discord-embed-visual-editor [data-upload-field]:hover{outline:none}
.tickets-module .discord-embed-title{padding-right:84px}
.tickets-module .discord-embed-inline-editor{box-sizing:border-box;max-width:100%;min-width:0}
.tickets-module .discord-embed-visual-editor .discord-embed-color-quick .discord-embed-swatch{min-width:19px;min-height:19px;width:19px;height:19px;padding:0}
.ticket-panel-sections{padding:8px 0;border:0;font-size:12px}

.tickets-module .discord-embed-visual-editor .discord-embed-thumb-slot,.tickets-module .discord-embed-visual-editor .discord-embed-image-slot{border-radius:8px}
@media(max-width:600px){.tickets-module .discord-embed-visual-editor .discord-embed-field{padding-inline-end:0;padding-top:30px}.tickets-module .discord-embed-visual-editor .discord-embed-field-context{left:0;right:auto}.tickets-module .discord-embed-visual-editor .discord-embed-thumb-slot{width:48px;height:48px;min-width:48px;min-height:48px}.tickets-module .discord-embed-title{padding-right:52px}}
.tickets-module .ticket-panel-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ticket-panel-slots>button{display:grid;gap:5px;text-align:left;padding:14px;min-width:0;min-height:94px}.ticket-panel-slots strong{overflow-wrap:anywhere}.ticket-panel-slots small,.ticket-panel-slots span{font-size:11px;font-weight:400}.ticket-panel-slots small{letter-spacing:.08em}.tickets-module button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:600px){.tickets-module .ticket-panel-slots{grid-template-columns:1fr}.ticket-panel-slots>button{min-height:76px}}

.tickets-module .ticket-body>button{justify-self:start}
