/* ============================================
   TICKETING SYSTEM - Narrativa-Inspired Theme
   ============================================
   Colors: Black bg, white text, teal (#46cec0) accent
   Fonts: Poppins (body/headings), Instrument Sans (nav/ui)
   ============================================ */

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    font-weight: 200;
    font-size: 17px;
    line-height: 1.6;
    color: #ffffff;
    background: #000000;
    min-height: 100vh;
}

a {
    color: #46cec0;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 70px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}

.nav-logo-img {
    max-width: 150px;
    padding-top: 15px;
    display: block;
}

.nav-tabs {
    display: flex;
    gap: 0;
}

.nav-tab {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 18px;
    letter-spacing: 0.015em;
    color: #ffffff;
    background: none;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.nav-tab:hover {
    color: #ffffff;
}

.nav-tab.active {
    color: #ffffff;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #46cec0;
    border-radius: 2px 2px 0 0;
}

.nav-center {
    flex: 1;
    max-width: 500px;
    margin: 0 32px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-input:focus {
    border-color: #46cec0;
    background: rgba(255, 255, 255, 0.08);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-name {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #ffffff;
    white-space: nowrap;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ---- Buttons ---- */
.btn-primary {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 18px;
    padding: 10px 28px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #000000;
    color: #ffffff;
}

.btn-secondary {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 18px;
    padding: 10px 28px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #ffffff;
}

.btn-small {
    padding: 6px 18px;
    font-size: 15px;
}

.btn-teal {
    background: #46cec0;
    color: #000000;
    border-color: #46cec0;
}

.btn-teal:hover {
    background: #3ab5a8;
    border-color: #3ab5a8;
    color: #000000;
}

.btn-clear-filters {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    padding: 6px 16px;
    background: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    width: 95%;
    margin: 0 auto;
    padding: 32px 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Content Card ---- */
.content-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 21px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.ticket-count {
    font-weight: 300;
    color: rgba(255, 255, 255, 255);
}

.card-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #ffffff;
}

.filter-select {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    padding: 6px 32px 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* ---- Tickets Table ---- */
.table-wrapper {
    overflow-x: auto;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
}

.tickets-table thead th {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 255);
    padding: 14px 28px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

/* Column filter: header inner layout */
.th-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Column filter: funnel icon button */
.th-filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.25);
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
    vertical-align: middle;
}

.th-filter-btn:hover {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.th-filter-btn.active {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.12);
}

/* Column filter: dropdown popup */
.th-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 12px;
    z-index: 100;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    min-width: 180px;
}

/* Column filter: text input */
.th-filter-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.th-filter-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.th-filter-input:focus {
    border-color: rgba(255, 68, 68, 0.4);
}

.tickets-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.tickets-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tickets-table tbody td {
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 18px;
    vertical-align: middle;
}

.tickets-table tbody tr:last-child td {
    border-bottom: none;
}

.td-id {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    color: #ffffff;
}

.td-client {
    font-weight: 400;
    color: #ffffff;
}

.td-summary {
    color: #ffffff;
    font-size: 18px;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-date {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 18px;
    color: #ffffff;
    white-space: nowrap;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.open {
    background: #46cec0;
}

.status-dot.pending {
    background: #f0c040;
}

.status-dot.onhold {
    background: #ff8c00;
}

.status-dot.resolved {
    background: #01008e;
}

.status-text.open {
    color: #46cec0;
}

.status-text.pending {
    color: #f0c040;
}

.status-text.onhold {
    color: #ff8c00;
}

.status-text.resolved {
    color: #7c74af;
}

.td-status {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
}

.td-status-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Inline Badges (attachment/follower counts in table) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    padding: 2px 7px;
    border-radius: 50px;
    margin-left: 6px;
    vertical-align: middle;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
}

.badge-attachment {
    background: rgba(70, 206, 192, 0.1);
    color: rgba(70, 206, 192, 0.8);
    border: 1px solid rgba(70, 206, 192, 0.15);
}

.badge-follower {
    background: rgba(183, 66, 190, 0.1);
    color: rgba(183, 66, 190, 0.8);
    border: 1px solid rgba(183, 66, 190, 0.15);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    margin-top: 12px;
    color: #ffffff;
    font-size: 18px;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 48px;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-total .stat-number {
    color: #ffffff;
}

.stat-total .stat-label {
    color: #ffffff;
}

.stat-open .stat-number {
    color: #46cec0;
}

.stat-open .stat-label {
    color: #46cec0;
}

.stat-open {
    border-color: rgba(70, 206, 192, 0.2);
}

.stat-pending .stat-number {
    color: #f0c040;
}

.stat-pending .stat-label {
    color: #f0c040;
}

.stat-pending {
    border-color: rgba(240, 192, 64, 0.2);
}

.stat-onhold .stat-number {
    color: #ff8c00;
}

.stat-onhold .stat-label {
    color: #ff8c00;
}

.stat-onhold {
    border-color: rgba(255, 140, 0, 0.2);
}

.stat-resolved .stat-number {
    color: #7c74af;
}

.stat-resolved .stat-label {
    color: #7c74af;
}

.stat-resolved {
    border-color: rgba(124, 116, 175, 0.2);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    padding: 28px;
}

.chart-card h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.chart-container {
    position: relative;
    height: 280px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 21px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 255);
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Modal header layout for detail modal */
.modal-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Detail header date subtitle */
.detail-header-date {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.01em;
}

/* Delete ticket button */
.btn-delete-ticket {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.6);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-delete-ticket:hover {
    background: rgba(255, 60, 60, 0.12);
    color: #ff6b6b;
}

/* ---- Form Elements ---- */
.form-group {
    padding: 0 28px;
    margin-bottom: 20px;
}

.form-group:first-of-type {
    margin-top: 24px;
}

.form-group label {
    display: block;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: rgba(255, 255, 255, 255);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #46cec0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px 28px;
}

/* ---- Upload Zone ---- */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #46cec0;
    background: rgba(70, 206, 192, 0.05);
}

.upload-zone p {
    margin-top: 8px;
    font-size: 18px;
    color: #ffffff;
}

.upload-browse {
    color: #46cec0;
    cursor: pointer;
}

/* Smaller upload zone for detail modal */
.upload-zone-small {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.upload-zone-small:hover,
.upload-zone-small.dragover {
    border-color: #46cec0;
    background: rgba(70, 206, 192, 0.05);
}

.upload-zone-small p {
    margin-top: 4px;
    font-size: 15px;
    color: #ffffff;
}

.upload-zone-small .upload-hint {
    font-size: 13px !important;
}

.detail-upload-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* Compact attach button row for detail modal */
.detail-attach-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

/* Drop highlight for drag-and-drop on attachment section */
.detail-section.drop-highlight {
    outline: 2px dashed #46cec0;
    outline-offset: -2px;
    background: rgba(70, 206, 192, 0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.upload-hint {
    font-size: 14px !important;
    color: #ffffff !important;
    margin-top: 4px !important;
}

.upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.upload-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview .remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   TICKET DETAIL MODAL
   ============================================ */
.detail-body {
    padding: 24px 28px 28px;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

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

.meta-label {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.meta-value {
    font-size: 18px;
    color: #ffffff;
}

.status-select {
    width: fit-content;
}

.detail-summary {
    margin-bottom: 16px;
}

.detail-summary p {
    margin-top: 6px;
    font-size: 18px;
    color: #ffffff;
    line-height: 1.7;
}

/* Editable fields in ticket detail */
.detail-edit-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    outline: none;
    transition: border-color 0.3s ease;
}

.detail-edit-input:focus {
    border-color: #46cec0;
}

.detail-edit-textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.7;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.detail-edit-textarea:focus {
    border-color: #46cec0;
}

.detail-save-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.save-status {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #46cec0;
}

/* Resolution section in ticket detail */
.detail-resolution {
    padding: 0 28px;
    margin-bottom: 20px;
}

.btn-confirm-resolution {
    margin-top: 10px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #ffffff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.no-items {
    font-size: 15px;
    color: #ffffff;
    font-style: italic;
}

/* Attachments Grid */
.attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.attachment-item {
    position: relative;
    width: 120px;
}

.attachment-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.attachment-thumb:hover {
    border-color: #46cec0;
}

.attachment-actions {
    margin-top: 6px;
    display: flex;
    gap: 4px;
}

.btn-extract {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 3px 8px;
    background: rgba(70, 206, 192, 0.15);
    color: #46cec0;
    border: 1px solid rgba(70, 206, 192, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-extract:hover {
    background: rgba(70, 206, 192, 0.25);
}

.btn-extract.loading {
    opacity: 0.5;
    pointer-events: none;
}

.btn-extract.done {
    background: rgba(70, 206, 192, 0.1);
    color: rgba(70, 206, 192, 0.7);
}

/* Followers */
.followers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.follower-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 15px;
    color: #ffffff;
}

.follower-chip .follower-name {
    color: #ffffff;
    font-weight: 400;
}

.follower-chip .follower-email {
    color: #ffffff;
    font-size: 14px;
}

.follower-chip .remove-follower {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
}

.follower-chip .remove-follower:hover {
    color: #ff6b6b;
}

.add-follower-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-follower-form select {
    flex: 1;
    padding: 8px 32px 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.add-follower-form select option {
    background: #1a1a2e;
    color: #ffffff;
}

.add-follower-form select:focus {
    border-color: #46cec0;
}

/* Autocomplete Dropdown */
.autocomplete-wrapper {
    position: relative;
    flex: 1;
}

.autocomplete-wrapper input {
    width: 100%;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.autocomplete-dropdown.visible {
    display: block;
}

.autocomplete-item {
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.autocomplete-item-name {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
}

.autocomplete-item-email {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
}

/* Extracted Text */
.extracted-text-body {
    padding: 24px 28px 28px;
}

.extracted-text-body pre {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 20px;
    font-family: 'Poppins', monospace;
    font-size: 15px;
    font-weight: 300;
    color: #ffffff;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.7;
}

/* Follower select dropdown */
.follower-select {
    flex: 1;
    padding: 8px 32px 8px 14px;
    font-size: 15px;
}

/* ============================================
   IMAGE LIGHTBOX
   ============================================ */
.lightbox-overlay {
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 210;
    width: 40px;
    height: 40px;
    font-size: 32px;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #46cec0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 300;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast.success {
    border-color: rgba(70, 206, 192, 0.3);
}

.toast.error {
    border-color: rgba(255, 60, 60, 0.3);
    color: #ff6b6b;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   WIDER MODALS (xlarge + large adjustments)
   ============================================ */
.modal-xlarge {
    max-width: 1100px;
}

.modal-large {
    max-width: 95%;
}

/* 3-column meta grid for detail modal */
.detail-meta-3col {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Form row layout for new ticket modal (2-col) */
.form-row {
    display: flex;
    gap: 0;
    padding: 0 0;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.form-row-2col .form-group {
    margin-bottom: 20px;
}

.form-row-2col .form-group:first-child {
    margin-top: 24px;
}

.form-row-2col .form-group:last-child {
    margin-top: 24px;
}

/* ============================================
   FOLLOWER MULTI-SELECT (New Ticket Modal)
   ============================================ */
.follower-multi-select {
    min-height: 42px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
}

.follower-multi-select:focus {
    border-color: #46cec0;
}

.follower-multi-select option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 6px 8px;
}

.follower-multi-select option:checked {
    background: rgba(70, 206, 192, 0.2);
    color: #ffffff;
}

/* ============================================
   COMMENTS
   ============================================ */
.comment-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.comment-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(70, 206, 192, 0.15);
    color: #46cec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 13px;
    flex-shrink: 0;
}

.comment-author {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #ffffff;
}

.comment-time {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.comment-edited {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

.comment-body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-attachments .attachment-thumb {
    width: 80px;
    height: 60px;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.comment-action-btn {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 8px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.comment-action-btn.delete:hover {
    color: #ff6b6b;
    border-color: rgba(255, 60, 60, 0.3);
}

/* Comment edit mode */
.comment-edit-textarea {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    margin-bottom: 8px;
}

.comment-edit-textarea:focus {
    border-color: #46cec0;
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
}

/* Comment form (add new comment) */
.comment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-form .detail-edit-textarea {
    margin-top: 0;
}

.comment-form-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.comment-upload-inline {
    flex-shrink: 0;
}

.comment-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-form-actions .upload-previews {
    flex: 1;
    margin-top: 0;
    min-width: 0;
}

.comment-form-actions .upload-previews .upload-preview {
    width: 60px;
    height: 60px;
}

.comment-form-actions > .btn-teal {
    margin-left: auto;
    align-self: flex-start;
}

/* Comment count badge */
.badge-comment {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   TYPE BADGES & PRIORITY DOT (Table)
   ============================================ */
.type-badge {
    display: inline-block;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

.type-bug {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.25);
}

.type-feature {
    background: rgba(183, 66, 190, 0.12);
    color: #b742be;
    border: 1px solid rgba(183, 66, 190, 0.25);
}

.type-other {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    flex-shrink: 0;
}

/* New table cell styles */
.td-study {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    font-size: 15px;
}

.td-title {
    color: #ffffff;
    font-size: 18px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-type {
    white-space: nowrap;
}

.td-priority {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #ffffff;
    white-space: nowrap;
}

.td-priority-inner {
    display: inline-flex;
    align-items: center;
}

/* Detail title row (full-width input above meta grid) */
.detail-title-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.detail-title-row .detail-edit-input {
    font-size: 20px;
    font-weight: 400;
}

/* Full-width select in form (new ticket modal) */
.form-select-full {
    width: 100%;
    padding: 12px 36px 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    outline: none;
    transition: border-color 0.3s ease;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select-full:focus {
    border-color: #46cec0;
}

.form-select-full option {
    background: #1a1a2e;
    color: #ffffff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .detail-meta-3col {
        grid-template-columns: 1fr 1fr;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
        height: auto;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-center {
        order: 3;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    .nav-tabs {
        order: 2;
    }

    .main-content {
        padding: 16px;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-meta-3col {
        grid-template-columns: 1fr;
    }

    .form-row-2col {
        grid-template-columns: 1fr;
    }

    .tickets-table thead th,
    .tickets-table tbody td {
        padding: 12px 16px;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 20px 16px;
    }

    .stat-number {
        font-size: 37px;
    }

    .modal {
        margin: 10px;
    }

    .user-name {
        display: none;
    }
}

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

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}