*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #0f0f17; color: #d8d8f0; min-height: 100vh; padding: 32px 16px; }
a { color: #5865f2; }
.page { max-width: 720px; margin: 0 auto; }
.page-wide { max-width: 1000px; margin: 0 auto; }
.header { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 700; color: #5865f2; }
.nav { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { font-size: 13px; color: #8888b8; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.nav a:hover, .nav a.active { background: #1e1e3a; color: #d8d8f0; }
.nav a.danger { color: #ed4245; }
.card { background: #16162a; border: 1px solid #2a2a4a; border-radius: 14px; padding: 28px 32px; margin-bottom: 16px; }
.ticket-subject { font-size: 22px; font-weight: 700; color: #e8e8ff; margin-bottom: 14px; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: uppercase; margin-bottom: 0; }
.badge-open { background: #57f28720; color: #57f287; border: 1px solid #57f28755; }
.badge-closed { background: #99aab520; color: #99aab5; border: 1px solid #99aab555; }
.badge-inprogress { background: #faa61a22; color: #faa61a; border: 1px solid #faa61a44; }
.description { font-size: 15px; line-height: 1.7; color: #b8b8d8; white-space: pre-wrap; word-break: break-word; border-left: 3px solid #2a2a5a; padding-left: 16px; }
.meta { background: #12122a; border: 1px solid #22224a; border-radius: 10px; padding: 18px 24px; margin-bottom: 16px; }
.meta-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #1e1e3a; font-size: 14px; gap: 16px; }
.meta-row:last-child { border-bottom: none; }
.label { color: #6b6b9a; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
h2 { font-size: 16px; font-weight: 600; color: #c8c8e8; margin-bottom: 14px; }
h3 { font-size: 14px; font-weight: 600; color: #a0a0c8; margin-bottom: 10px; }
.note { font-size: 13px; color: #5a5a7a; margin-top: 12px; }
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.comment { border-radius: 8px; padding: 12px 14px; border: 1px solid #22224a; }
.comment-staff { background: #1a1a3a; border-color: #5865f2; }
.comment-user { background: #12122a; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-size: 13px; font-weight: 600; color: #c8c8e8; }
.comment-time { font-size: 12px; color: #5a5a7a; margin-left: auto; }
.comment-body { font-size: 14px; color: #a8a8c8; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.comment-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #22224a; padding-top: 16px; margin-top: 4px; }
.comment-form textarea { background: #0e0e20; border: 1px solid #2a2a4a; border-radius: 8px; color: #d8d8f0; padding: 10px 14px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; }
.comment-form textarea:focus { outline: none; border-color: #5865f2; }
.comment-form input[type=text] { background: #0e0e20; border: 1px solid #2a2a4a; border-radius: 8px; color: #d8d8f0; padding: 9px 14px; font-size: 14px; font-family: inherit; }
.comment-form input[type=text]:focus { outline: none; border-color: #5865f2; }
.comment-attachment { border-color: #2a2a4a !important; background: #0e0e1e !important; }
.attachment-inline img { max-width: 320px; max-height: 240px; border-radius: 8px; border: 1px solid #2a2a4a; display: block; cursor: pointer; }
.attachment-inline img:hover { border-color: #5865f2; }
.staff-note-input { width: 100%; background: #0e0e20; border: 1px solid #2a2a4a; border-radius: 8px; color: #d8d8f0; padding: 10px 14px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 70px; }
.staff-note-input:focus { outline: none; border-color: #faa61a; }
.priority-select { background: #1a1a3a; border: 1px solid #2a2a4a; border-radius: 6px; color: #d8d8f0; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.priority-select:focus { outline: none; border-color: #5865f2; }
.perm-table { display: flex; flex-direction: column; gap: 0; border: 1px solid #22224a; border-radius: 10px; overflow: hidden; }
.perm-row { display: flex; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #1a1a3a; align-items: flex-start; flex-wrap: wrap; }
.perm-row:last-child { border-bottom: none; }
.perm-row:hover { background: #0e0e20; }
.perm-info { min-width: 180px; flex-shrink: 0; }
.perm-label { font-size: 14px; font-weight: 600; color: #c8c8e8; margin-bottom: 2px; }
.perm-desc { font-size: 12px; color: #5a5a7a; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; justify-content: flex-end; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #5865f2; color: #fff; }
.btn-secondary { background: #2a2a4a; color: #c8c8e8; border: 1px solid #3a3a5a; }
.btn-secondary:hover { background: #3a3a5a; }
.btn-danger { background: #ed4245; color: #fff; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-flag { background: #2a2a4a; color: #c8c8e8; border: 1px solid #3a3a5a; }
.btn-flag:hover { background: #3a3a5a; }
.btn-flag-active { background: #ed424522; color: #ed4245; border: 1px solid #ed424555; }
.btn-flag-active:hover { background: #ed424533; }
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.attachment img { width: 100%; border-radius: 8px; border: 1px solid #2a2a4a; display: block; }
.attachment a { font-size: 12px; color: #5865f2; display: block; margin-top: 4px; text-align: center; word-break: break-all; }
.upload-form { display: flex; flex-direction: column; gap: 12px; }
.drop-zone { background: #12122a; border: 2px dashed #2a2a4a; border-radius: 8px; padding: 28px; text-align: center; color: #6b6b9a; font-size: 14px; cursor: pointer; transition: border-color .15s; }
.drop-zone:hover, .drop-zone.drag { border-color: #5865f2; color: #a0a0d0; }
.drop-zone input[type=file] { display: none; }
.dash-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid #22224a; padding-bottom: 0; }
.dash-tab { padding: 8px 18px; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600; color: #6b6b9a; text-decoration: none; border: 1px solid transparent; border-bottom: none; transition: all .15s; }
.dash-tab:hover { color: #c8c8e8; background: #1a1a3a; }
.dash-tab-active { color: #d8d8f0; background: #1a1a3a; border-color: #22224a; }
.tab-count { background: #2a2a4a; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.row-flagged { background: #1e0e0e; }
.row-flagged td { border-color: #3a1a1a; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #2a2a4a; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead tr { background: #12122a; }
th { padding: 12px 16px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #6b6b9a; font-weight: 600; border-bottom: 1px solid #2a2a4a; }
td { padding: 12px 16px; border-bottom: 1px solid #1a1a30; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #13132a; }
.empty-row { text-align: center; padding: 48px; color: #5a5a7a; }
.center-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.center-card { background: #16162a; border: 1px solid #2a2a4a; border-radius: 14px; padding: 40px; text-align: center; max-width: 460px; width: 100%; }
.center-card h1 { font-size: 22px; color: #e8e8ff; margin-bottom: 12px; }
.center-card p { color: #7878a8; margin-bottom: 24px; font-size: 15px; line-height: 1.6; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 16px; }
.role-item { display: flex; align-items: center; gap: 10px; background: #12122a; border: 1px solid #22224a; border-radius: 8px; padding: 10px 14px; cursor: pointer; transition: border-color .15s; }
.role-item:hover { border-color: #5865f2; }
.role-item input[type=checkbox] { accent-color: #5865f2; width: 16px; height: 16px; cursor: pointer; }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-name { font-size: 14px; color: #c8c8e8; }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #6b6b9a; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #1e1e3a; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-info { background: #1a1a3a; border: 1px solid #2a2a5a; color: #8888c8; }
.alert-success { background: #1a2a1a; border: 1px solid #2a4a2a; color: #57f287; }
.staff-banner { background: #1a1a0a; border: 1px solid #3a3a1a; border-radius: 8px; padding: 10px 16px; margin-bottom: 16px; font-size: 13px; color: #c8c870; display: flex; align-items: center; gap: 8px; }
