body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    background: #f4f5f7;
}

/* Layout */
.layout {
    display: flex;
    min-height: 60vw;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #0a4fb6 0%, #073f95 52%, #06377f 100%);
    color: white;
    padding: 22px 14px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.08), 10px 0 28px rgba(15,23,42,0.08);
}

.sidebar .logo {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 26px;
    text-align: center;
}

.sidebar .logo a {
    display: inline-flex;
    justify-content: center;
    padding: 0;
    opacity: 1;
}

.sidebar .logo img {
    max-width: 190px;
    height: auto;
    filter: drop-shadow(0 14px 20px rgba(3, 7, 18, 0.2));
}

.sidebar a {
    color: white;
    text-decoration: none;
    padding: 10px 12px;
    opacity: 0.9;
    border-radius: 9px;
    transition: background 0.14s ease, color 0.14s ease, opacity 0.14s ease, transform 0.14s ease;
}

.sidebar a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.sidebar-nav-link,
.queue-create-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    box-sizing: border-box;
    font-weight: 650;
}

.sidebar-nav-link.active {
    background: rgba(255,255,255,0.18);
    opacity: 1;
    box-shadow: inset 3px 0 0 rgba(191,219,254,0.95);
}

.sidebar-icon {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bfdbfe;
    font-size: 13px;
}

.queue-block {
    margin-top: 12px;
    margin-bottom: 12px;
    border-top: 1px solid rgba(219,234,254,0.22);
    border-bottom: 1px solid rgba(219,234,254,0.12);
    padding: 14px 0 12px;
}

.queue-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #bfdbfe;
    margin: 0 8px 9px;
    font-weight: 800;
}

.sidebar a.queue-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    margin-bottom: 4px;
    font-weight: 650;
}

.queue-row {
    position: relative;
    display: flex;
    align-items: center;
}

.queue-action-menu {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.queue-action-menu:has(.queue-menu-panel.is-open) {
    z-index: 300;
}

.queue-menu-trigger {
    border: 1px solid rgba(147,197,253,0.72);
    background: rgba(37,99,235,0.26);
    color: #dbeafe;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.queue-menu-trigger:hover,
.queue-menu-trigger.is-open {
    background: rgba(37,99,235,0.95);
    border-color: rgba(191,219,254,0.95);
    color: #fff;
}

.queue-menu-trigger.is-open {
    visibility: hidden;
}

.queue-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 164px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15,23,42,0.22);
    padding: 8px;
    display: none;
    z-index: 1000;
}

.queue-menu-panel.is-open {
    display: block;
}

.queue-menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.queue-menu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.queue-menu-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.queue-menu-icon {
    width: 18px;
    color: #475569;
    font-size: 16px;
    line-height: 1;
    text-align: center;
}

.queue-row .queue-link {
    width: 100%;
}

.queue-row.has-actions .queue-link {
    padding-right: 44px;
}

.queue-row.has-actions .queue-count {
    margin-right: 28px;
}

.sidebar a.queue-link.active {
    background: rgba(255,255,255,0.2);
    opacity: 1;
    font-weight: 800;
    box-shadow: inset 3px 0 0 rgba(191,219,254,0.95);
}

.queue-count {
    background: rgba(219,234,254,0.24);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
    color: #eff6ff;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.queue-create-btn {
    margin-top: 8px;
    width: 100%;
    border: 1px dashed rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 10px;
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
    opacity: 0.95;
    font-size: 14px;
}

.queue-create-btn:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(219,234,254,0.88);
}

.queue-create-link {
    display: flex;
    box-sizing: border-box;
    text-decoration: none;
}

.alert-error {
    background: #ffebe6;
    color: #bf2600;
    border: 1px solid #ffbdad;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.select2-container--default .select2-selection--single {
    min-height: 40px;
    border: 1px solid #d6deea;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 500;
    padding-left: 12px;
    padding-right: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 10px;
}

.select2-dropdown {
    border: 1px solid #d6deea;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(2,8,23,0.14);
    overflow: hidden;
    margin-top: 6px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.16);
}

.select2-results__option {
    font-size: 13px;
    padding: 8px 10px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #e8f1ff;
    color: #0f172a;
}

.select2-container--default .select2-results__option--selected {
    background: #f2f7ff;
    color: #0b63e5;
    font-weight: 600;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #d7deea;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
}

.select2-search--dropdown {
    padding: 9px;
}

.form-group .select2-container {
    width: 100% !important;
}

.filter-bar .select2-container {
    min-width: 165px;
}

.status-filter-wrap {
    position: relative;
    width: 260px;
    min-width: 260px;
}

.filter-bar .status-filter-select + .select2-container {
    min-width: 260px;
    width: 260px !important;
}

.filter-bar .select2-container--default .select2-selection--single {
    min-height: 39px;
    border-radius: 8px;
}

.filter-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 37px;
}

.filter-bar .select2-container--default .select2-selection--multiple {
    min-height: 39px;
    height: 39px;
    border-radius: 8px;
    padding: 3px 34px 3px 8px;
    overflow: hidden;
}

.status-filter-wrap .status-filter-summary {
    position: absolute;
    inset: 0 34px 0 12px;
    display: block;
    line-height: 37px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

.status-filter-wrap .status-filter-summary.has-compact-value {
    color: #0f172a;
}

.filter-bar .status-filter-select + .select2-container .select2-selection--multiple .select2-selection__rendered {
    visibility: hidden;
}

.filter-bar .status-filter-select + .select2-container .select2-selection--multiple .select2-search__field {
    color: transparent;
    caret-color: transparent;
}

.filter-bar .status-filter-select + .select2-container .select2-selection--multiple .select2-search__field::placeholder {
    color: transparent;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    height: 31px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    display: none;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-selection__choice {
    flex: 0 0 auto;
    margin: 0;
    max-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-search--inline {
    flex: 1 0 90px;
    min-width: 90px;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 28px;
    margin: 0;
    min-width: 90px !important;
    font-size: 13px;
}

.filter-bar .select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    right: 10px;
    top: 8px;
    margin: 0;
}

.created-filter-wrap {
    position: relative;
    width: 188px;
    min-width: 188px;
}

.created-filter-btn {
    width: 100%;
    height: 39px;
    padding: 0 12px;
    border: 1px solid #d6deea;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
}

.created-filter-btn.active {
    color: #0f172a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.16);
}

.created-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 3000;
    display: none;
    width: 430px;
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(9,30,66,0.18);
    padding: 14px 0 0;
}

.created-filter-panel.open {
    display: block;
}

.created-filter-option {
    display: grid;
    grid-template-columns: 18px 92px 1fr;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 14px;
    color: #172b4d;
}

.created-filter-option input[type="radio"] {
    margin: 0;
}

.created-between-fields,
.created-relative-fields,
.created-range-fields {
    display: none;
    align-items: center;
    gap: 8px;
}

.created-filter-option.active .created-between-fields,
.created-filter-option.active .created-relative-fields,
.created-filter-option.active .created-range-fields {
    display: inline-flex;
}

.created-filter-panel input[type="date"],
.created-filter-panel input[type="number"],
.created-filter-panel input[type="text"],
.created-filter-panel select {
    height: 32px;
    border: 1px solid #a5adba;
    border-radius: 3px;
    background: #fff;
    color: #172b4d;
    font-size: 14px;
    padding: 4px 8px;
    box-sizing: border-box;
}

.created-filter-panel input[type="number"] {
    width: 74px;
}

.created-filter-panel select {
    width: 150px;
}

.created-between-fields input[type="date"] {
    width: 120px;
}

.created-range-fields input[type="text"] {
    width: 130px;
}

.created-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #dfe1e6;
    margin-top: 10px;
    padding: 8px 12px;
}

.created-filter-actions button {
    border: 0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

#createdFilterUpdate {
    background: #0052cc;
    color: #fff;
}

#createdFilterClear {
    background: #f4f5f7;
    color: #42526e;
}

.queue-dependent-select + .select2-container {
    margin-top: 10px;
}

.select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #d6deea;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
    padding: 4px 7px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.select2-container--default.select2-container--open .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.16);
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin: 0;
    border: 1px solid #bfdbfe;
    background: #eaf2ff;
    color: #0f3f8c;
    border-radius: 999px;
    padding: 5px 10px 5px 8px;
    font-size: 12px;
    font-weight: 600;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1d4ed8;
    margin-right: 6px;
    border-right: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc2626;
    background: transparent;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin-top: 4px;
    margin-left: 2px;
    font-size: 13px;
    min-width: 140px !important;
}

.select2-container--default .select2-results__group {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.priority-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.priority-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.priority-icon-blocker {
    border-radius: 50%;
    background: #ff5630;
}

.priority-icon-blocker::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 6px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.priority-icon-critical,
.priority-icon-double-up,
.priority-icon-high {
    color: #ff5630;
}

.priority-icon-critical::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 2px;
    width: 9px;
    height: 11px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 28%, 100% 100%, 50% 74%, 0 100%, 0 28%);
}

.priority-icon-high::before,
.priority-icon-low::before,
.priority-icon-double-up::before,
.priority-icon-double-up::after,
.priority-icon-double-down::before,
.priority-icon-double-down::after {
    content: "";
    position: absolute;
    left: 3px;
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
}

.priority-icon-high::before {
    top: 5px;
    transform: rotate(45deg);
}

.priority-icon-double-up::before {
    top: 2px;
    transform: rotate(45deg);
}

.priority-icon-double-up::after {
    top: 6px;
    transform: rotate(45deg);
}

.priority-icon-low,
.priority-icon-double-down {
    color: #2684ff;
}

.priority-icon-low::before {
    top: 2px;
    transform: rotate(225deg);
}

.priority-icon-double-down::before {
    top: 1px;
    transform: rotate(225deg);
}

.priority-icon-double-down::after {
    top: 5px;
    transform: rotate(225deg);
}

.priority-icon-medium {
    color: #ff8b00;
}

.priority-icon-medium::before,
.priority-icon-medium::after {
    content: "";
    position: absolute;
    left: 3px;
    width: 8px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.priority-icon-medium::before {
    top: 4px;
}

.priority-icon-medium::after {
    top: 8px;
}

.priority-icon-trivial {
    border: 2px solid #6b778c;
    border-radius: 50%;
}

.confirm-modal-content {
    max-width: 520px;
}

.confirm-modal-body {
    padding: 6px 0 8px;
    color: #334155;
}

.danger-btn {
    background: #dc2626;
}

.danger-btn:hover {
    background: #b91c1c;
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.search-group{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    flex:1 1 auto;
}
.filter-bar{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left: 20px;
}
.filter-select{
    padding:8px 10px;
    border:1px solid #dfe1e6;
    border-radius:6px;
    background:#f8fafc;
    font-size:13px;
    color:#0f172a;
    box-shadow:0 1px 2px rgba(15,23,42,0.05) inset;
}
.filter-select:focus{
    outline:none;
    border-color:#3b82f6;
    box-shadow:0 0 0 3px rgba(59,130,246,0.15);
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex:0 0 auto;
}

.user-info a {
    text-decoration: none;
    color: #0052cc;
}

.account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.account-badge {
    width: 38px;
    height: 38px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: linear-gradient(135deg, #0c66e4, #155eef);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(12, 102, 228, 0.22);
}

.account-menu:hover .account-badge,
.account-menu:focus-within .account-badge {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), 0 10px 22px rgba(12, 102, 228, 0.24);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    padding: 8px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
    z-index: 700;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid #dbe3ef;
    border-top: 1px solid #dbe3ef;
    transform: rotate(45deg);
}

.account-greeting {
    padding: 10px 10px 9px;
    border-bottom: 1px solid #eef2f7;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    white-space: normal;
}

.account-dropdown a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.account-dropdown a:hover,
.account-dropdown a:focus {
    background: #eff6ff;
    color: #0c66e4;
    outline: none;
}

.notification-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.notification-bell {
    position: relative;
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}

.notification-bell:hover,
.notification-bell[aria-expanded="true"] {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.notification-count {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.notification-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 430px;
    max-width: min(430px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #d7dce5;
    border-radius: 10px;
    box-shadow: 0 16px 42px rgba(15,23,42,0.24);
    z-index: 3000;
    overflow: hidden;
    text-align: left;
}

.notification-panel.open {
    display: block;
}

.notification-head {
    padding: 16px 18px 10px;
    font-size: 20px;
    color: #0f172a;
}

.notification-tabs {
    display: flex;
    gap: 20px;
    padding: 0 18px;
    border-bottom: 1px solid #e2e8f0;
}

.notification-tabs button {
    border: 0;
    background: transparent;
    color: #475569;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.notification-tabs button.active {
    color: #0052cc;
    border-bottom-color: #0052cc;
}

.notification-list {
    display: none;
    max-height: 460px;
    overflow-y: auto;
    padding: 12px;
}

.notification-list.active {
    display: grid;
    gap: 8px;
}

.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 10px;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    color: #0f172a;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.notification-item:hover {
    background: #eef4ff;
}

.notification-item.unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.notification-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #de350b;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.notification-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notification-copy strong {
    font-size: 14px;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.notification-copy > span {
    font-size: 13px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-copy em {
    display: grid;
    grid-template-columns: minmax(0, 80px) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    font-style: normal;
    min-width: 0;
}

.notification-copy em > span:first-child,
.notification-copy em > time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-copy .badge {
    font-size: 11px;
    padding: 4px 7px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2563eb;
    align-self: center;
}

.notification-empty {
    padding: 24px 12px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .topbar {
        flex-wrap: wrap;
    }
    .search-group {
        flex-basis: 100%;
    }
    .user-info {
        margin-left: auto;
    }
}

/* Content */
.content {
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.content-title-wrap h2 {
    margin-bottom: 0;
}

.filtered-ticket-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #0747a6;
    border: 1px solid #b3d4ff;
    font-size: 13px;
    font-weight: 700;
}

.create-btn {
    background: #0052cc;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.create-btn:hover {
    background: #0747a6;
}

/* Modern Table */
.modern-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.modern-table th {
    text-align: left;
    background: #0052cc;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
}

.modern-table td {
    padding: 12px;
    border-top: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.modern-table .ticket-key-col,
.modern-table .ticket-key-cell {
    width: 72px;
}

.modern-table .ticket-summary-col,
.modern-table .ticket-summary-cell {
    width: 34%;
}

.modern-table .ticket-person-col,
.modern-table .ticket-person-cell {
    width: 118px;
}

.modern-table .ticket-status-col,
.modern-table .ticket-status-cell {
    width: 88px;
}

.modern-table .ticket-date-col,
.modern-table .ticket-date-cell {
    width: 94px;
}

.modern-table .ticket-key-cell,
.modern-table .ticket-summary-cell,
.modern-table .ticket-person-cell,
.modern-table .ticket-status-cell,
.modern-table .ticket-date-cell {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-table .ticket-key-cell .issue-link,
.modern-table .ticket-summary-cell .issue-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-table .ticket-status-cell .badge {
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-table tr:hover {
    background: #f0f4ff;
}

.modern-table tr.empty-ticket-row:hover {
    background: #fff;
}

.empty-ticket-row td {
    padding: 34px 16px;
    text-align: center;
    color: #475569;
    font-weight: 600;
    background: #fff;
}

.modern-table .priority-col {
    width: 42px;
    text-align: center;
    white-space: nowrap;
}

.modern-table .priority-col .priority-icon {
    vertical-align: middle;
}

.sortable-heading {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 3px 6px;
    line-height: 1.2;
}

.sortable-heading::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg) translateY(1px);
    opacity: 0;
}

.sortable-heading:hover,
.sortable-heading.active {
    background: rgba(255,255,255,0.18);
}

.sortable-heading:hover::after,
.sortable-heading.active::after {
    opacity: 1;
}

.sortable-heading.dir-desc::after {
    transform: rotate(225deg) translateY(1px);
}

/* Status Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.small{
    font-size:12px;
    padding:6px;
    border-radius:50%;
    min-width:30px;
    min-height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#e2e8f0;
    color:#0f172a;
    font-weight:700;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.05);
}

.status-in-progress {
    background: #deebff;
    color: #0747a6;
}

.status-tested {
    background: #e3fcef;
    color: #006644;
}

.status-closed {
    background: #ffebe6;
    color: #bf2600;
}

/* Priority */
.priority {
    font-weight: 600;
    font-size: 13px;
}

.priority-high {
    color: #de350b;
}

.priority-medium {
    color: #ff8b00;
}

.priority-low {
    color: #00875a;
}


.auth-container {
    width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.auth-container input {
    width: 372px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: #0052cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.auth-container button:hover {
    background: #0747a6;
}

body.login-page {
    min-height: 100vh;
    background: #f5f7fb;
    color: #172b4d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
}

.login-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 48px;
    box-sizing: border-box;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0)),
        #0747a6;
    color: #ffffff;
    overflow: hidden;
}

.login-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.28;
}

.login-brand-content {
    position: relative;
    max-width: 460px;
}

.login-brand-logo {
    display: block;
    width: min(220px, 74vw);
    max-height: 130px;
    object-fit: contain;
    margin-bottom: 42px;
    filter: drop-shadow(0 18px 26px rgba(0,0,0,0.18));
}

.login-brand-kicker {
    margin-bottom: 12px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-brand-content h1 {
    margin: 0 0 16px;
    max-width: 430px;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: 0;
}

.login-brand-content p {
    margin: 0;
    max-width: 390px;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.65;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 24px;
    box-sizing: border-box;
}

.login-page .auth-container.login-card {
    width: min(100%, 440px);
    margin: 0;
    padding: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-card-header {
    margin-bottom: 24px;
}

.login-card-eyebrow {
    margin-bottom: 8px;
    color: #0052cc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-page .auth-container h2 {
    margin: 0;
    text-align: left;
    color: #111827;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: 0;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: #344563;
    font-size: 13px;
    font-weight: 700;
}

.login-page .auth-container input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-page .auth-container input:focus {
    border-color: #0c66e4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.16);
}

.login-form .remember-me-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: #344563;
    cursor: pointer;
    user-select: none;
}

.login-page .auth-container .remember-me-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #0c66e4;
    cursor: pointer;
    box-shadow: none;
}

.login-form .remember-me-row span {
    font-size: 13px;
    font-weight: 700;
}

.login-page .auth-container button {
    margin-top: 4px;
    border-radius: 6px;
    background: #0c66e4;
    box-shadow: 0 12px 24px rgba(12, 102, 228, 0.22);
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.login-page .auth-container button:hover {
    background: #0052cc;
    box-shadow: 0 16px 30px rgba(12, 102, 228, 0.26);
    transform: translateY(-1px);
}

.login-page .auth-container button:active {
    transform: translateY(0);
}

.login-links {
    margin-top: 2px;
}

.login-links a {
    color: #0052cc;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-error {
    margin-bottom: 16px;
    padding: 11px 12px;
    border: 1px solid #ffbdad;
    border-radius: 6px;
    background: #ffebe6;
    color: #bf2600;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 32px 24px;
    }

    .login-brand-logo {
        width: 160px;
        margin-bottom: 22px;
    }

    .login-brand-content h1 {
        font-size: 30px;
    }

    .login-form-panel {
        min-height: auto;
        padding: 28px 16px 40px;
    }

    .login-page .auth-container.login-card {
        padding: 26px 20px;
    }
}

table {
    background: white;
    margin: 40px auto;
    width: 90%;
    border-collapse: collapse;
}

th {
    background: #0052cc;
    color: white;
    padding: 10px;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.issue-link {
    text-decoration: none;
    color: #0052cc;
    font-weight: 600;
}

.issue-link:hover {
    text-decoration: underline;
}

.issue-container {
    padding: 30px;
    background: #f4f5f7;
}

.issue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.issue-meta {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.issue-description,
.issue-comments {
    margin-top: 25px;
    background: white;
    padding: 20px;
    border-radius: 6px;
}

.editor-actions {
    margin-top: 15px;
}

.save-btn {
    background: #0052cc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn {
    margin-left: 10px;
    text-decoration: none;
    color: #555;
}

.alert-success {
    background: #e3fcef;
    color: #006644;
    padding: 12px 18px;
    border-left: 4px solid #36b37e;
    margin: 20px 30px;
    border-radius: 4px;
    font-weight: 500;
}

.attachment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.attachment-item {
    width: 300px;   /* medium size */
}

.attachment-item img {
    max-width: 350px;
    max-height: 300px;
    width: auto;
    height: auto;
}


.attachment-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ck-content .image-inline{
    display: block !important;
    max-width: 500px !important;
}
/* Force images to break line properly */
.ck-content img,
.issue-description img {
    display: block !important;
    max-width: 500px !important;
    height: auto !important;
    margin: 15px 0 !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
}

/* Prevent image wrapping */
.ck-content figure {
    display: block !important;
    max-width: 500px !important;
}

.attachments-box {
    margin-top: 25px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.attachment-item {
    background: #f4f5f7;
    padding: 12px;
    border-radius: 6px;
    width: 200px;
    text-align: center;
    transition: 0.2s ease;
}

.attachment-item:hover {
    background: #e9ecef;
}

.file-icon {
    font-size: 28px;
}

.file-name {
    margin-top: 8px;
    font-size: 13px;
    word-break: break-word;
}


.modern-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9,30,66,0.54);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modern-modal-content {
    background: #fff;
    width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalFade 0.2s ease;
}

.modern-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modern-close {
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.half {
    flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4c9aff;
    box-shadow: 0 0 0 2px rgba(76,154,255,0.2);
}

.upload-box {
    border: 2px dashed #dfe1e6;
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: #fafbfc;
}

.upload-box:hover {
    border-color: #4c9aff;
}

.upload-box input {
    display: none;
}

.upload-box p {
    margin: 0;
    color: #6b778c;
}

.modern-actions {
    text-align: right;
    margin-top: 20px;
}

.create-btn {
    background: #0052cc;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.create-btn:hover {
    background: #0747a6;
}

.cancel-btn {
    background: #f4f5f7;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    margin-right: 10px;
    cursor: pointer;
}

@keyframes modalFade {
    from {opacity:0; transform:translateY(-10px);}
    to {opacity:1; transform:translateY(0);}
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;   /* 🔥 THIS FIXES ALIGNMENT */
}


.upload-box {
    border: 2px dashed #dfe1e6;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: #fafbfc;
    transition: 0.2s ease;
}

.upload-box:hover {
    border-color: #4c9aff;
    background: #f0f7ff;
}

.upload-box input {
    display: none;
}

.file-preview {
    margin-top: 10px;
}

.file-item {
    background: #f4f5f7;
    padding: 6px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 13px;
}

span.badge.status-open {
    background: #eaeaea;
    color: #0747a6;
}

.attachments-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:15px;
}

.attachment-card{
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    overflow:hidden;
    text-align:center;
}

.img-wrap{
    position:relative;
}

.thumb{
    width:100%;
    height:120px;
    object-fit:cover;
}

.overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.45);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    opacity:0;
    transition:0.2s;
}

.img-wrap:hover .overlay{
    opacity:1;
}

.view-btn,
.download-btn{
    background:#fff;
    border:none;
    padding:8px 10px;
    border-radius:6px;
    cursor:pointer;
    font-size:16px;
}

.file-name{
    font-size:12px;
    padding:8px;
    word-break:break-all;
}

/* Lightbox */

.lightbox{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.9);
    z-index:10000;
    padding:76px 28px 28px;
    box-sizing:border-box;
}

.lightbox.open{
    display:flex;
    align-items:center;
    justify-content:center;
}

.lightbox-stage{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:auto;
}

.lightbox img{
    max-width:92vw;
    max-height:82vh;
    transform-origin:center center;
    transition:transform 0.12s ease;
    cursor:zoom-in;
}

.lightbox-toolbar{
    position:absolute;
    top:18px;
    right:24px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px;
    background:rgba(15,23,42,0.72);
    border:1px solid rgba(255,255,255,0.18);
    border-radius:10px;
    backdrop-filter:blur(8px);
}

.lightbox-toolbar button{
    min-width:36px;
    height:34px;
    border:1px solid rgba(255,255,255,0.22);
    border-radius:7px;
    background:#fff;
    color:#0f172a;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
}

.lightbox-toolbar button:hover{
    background:#e8f1ff;
    border-color:#93c5fd;
}

.lightbox-toolbar .close-lightbox{
    min-width:38px;
    font-size:22px;
    line-height:1;
}

body.lightbox-open{
    overflow:hidden;
}

.issue-description .ck-content img,
.comment-body img,
.activity-body img{
    cursor:zoom-in;
}

.status-wrapper{
    position:relative;
    display:inline-block;
}

.status-pill{
    padding:6px 12px;
    border-radius:6px;
    font-weight:600;
    font-size:13px;
    cursor:pointer;
    display:inline-block;
}

/* Status colors */

.status-open{background:#DEEBFF;color:#0747A6;}
.status-in-progress{background:#FFF0B3;color:#7A5D00;}
.status-tested{background:#E3FCEF;color:#006644;}
.status-action-needed{background:#FFEBE6;color:#BF2600;}
.status-reopened{background:#EAE6FF;color:#403294;}
.status-resolved{background:#E3FCEF;color:#006644;}
.status-closed{background:#DFE1E6;color:#172B4D;}

.status-menu{
    display:none;
    position:absolute;
    top:35px;
    right:0;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    box-shadow:0 8px 20px rgba(0,0,0,0.1);
    min-width:180px;
    z-index:100;
}

.status-option{
    padding:10px 14px;
    cursor:pointer;
}

.status-option:hover{
    background:#f4f5f7;
}

.issue-comments{
    margin-top:30px;
}

.comment-item{
    border-bottom:1px solid #e5e7eb;
    padding:12px 0;
    display:flex;
    gap:12px;
    align-items:flex-start;
}

.comment-author{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-width:120px;
    font-size:13px;
    color:#0f172a;
    line-height:1.3;
}

.comment-author span{
    color:#94a3b8;
    display:block;
    margin-left:0;
}

.comment-body{
    flex:1;
    background:#f8fafc;
    padding:10px 12px;
    border-radius:8px;
    border:1px solid #e5e7eb;
    color:#0f172a;
    line-height:1.55;
    white-space:normal;
    word-break:break-word;
}
.mention{
    color:#0f52cc;
    font-weight:700;
    text-decoration:none;
}
.mention:hover{
    text-decoration:underline;
}

.comment-form{
    margin-top:20px;
}

.comment-form textarea{
    width:100%;
    height:80px;
    padding:10px;
    border:1px solid #ccc;
    border-radius:6px;
}

.comment-form button{
    margin-top:8px;
    padding:8px 14px;
    background:#0052cc;
    color:white;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

.comment-actions{
margin-top:6px;
}

.comment-actions button{
    background:none;
    border:none;
    color:#0052cc;
    cursor:pointer;
    font-size:13px;
    margin-right:10px;
}

.comment-actions button:hover{
    text-decoration:underline;
}

.mention-box{
    position:absolute;
    background:#fff;
    border:1px solid #ddd;
    border-radius:6px;
    box-shadow:0 4px 12px rgba(0,0,0,0.1);
    display:none;
    z-index:999;
    max-width:250px;
}

.mention-item{
    padding:8px 12px;
    cursor:pointer;
}

.mention-item:hover{
    background:#f4f5f7;
}

#pagination{
    margin-top:25px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
}

.page-btn{
    background:#f4f5f7;
    border:1px solid #dfe1e6;
    padding:6px 12px;
    cursor:pointer;
    border-radius:4px;
    font-size:14px;
}

.page-btn:hover{
    background:#0052cc;
    color:white;
}

/* Active page */
.page-btn.active{
    background:#0052cc;
    color:white;
    border-color:#0052cc;
    font-weight:600;
}

.search-box{
    position:relative;
    width:350px;
}

.search{
    width:100%;
    padding:10px 10px;
    border-radius:6px;
    border:1px solid #ccc;
}

.search-results{
    position:absolute;
    top:38px;
    left:0;
    width:100%;
    background:white;
    border:1px solid #ddd;
    border-radius:6px;
    box-shadow:0 4px 10px rgba(0,0,0,0.1);
    display:none;
    z-index:1000;
    max-height:400px;
    overflow-y:auto;
}

.search-item{
    display:block;
    padding:10px;
    border-bottom:1px solid #eee;
    color:inherit;
    cursor:pointer;
    text-decoration:none;
}

.search-item:hover{
    background:#f4f5f7;
}

.search-title{
    font-size:14px;
}

.search-meta{
    font-size:12px;
    color:#888;
    margin-top:3px;
}

.search-meta-with-status{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.search-status-badge{
    font-size:11px;
    line-height:1;
    padding:5px 8px;
    border-radius:5px;
    white-space:nowrap;
    flex-shrink:0;
}

/* SETTINGS PAGE */

.settings-wrapper{
    display:flex;
    justify-content:center;
    padding:40px;
}

.settings-card{
    width:600px;
    background:#fff;
    border-radius:10px;
    padding:35px;
    box-shadow:0 4px 20px rgba(0,0,0,0.08);
}

.settings-header{
    margin-bottom:25px;
}

.settings-header h2{
    margin:0;
    font-size:24px;
    font-weight:600;
}

.settings-header p{
    margin-top:5px;
    color:#666;
    font-size:14px;
}

.company-logo-form{
    border-bottom:1px solid #e5e7eb;
    margin-bottom:24px;
    padding-bottom:24px;
}

.company-logo-preview{
    display:flex;
    align-items:center;
    justify-content:center;
    width:220px;
    min-height:82px;
    border:1px solid #d7dce5;
    border-radius:8px;
    background:#f8fafc;
    margin-bottom:10px;
    padding:10px;
}

.company-logo-preview img{
    max-width:180px;
    max-height:70px;
    object-fit:contain;
}

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

.form-group label{
    display:block;
    font-weight:600;
    margin-bottom:6px;
    font-size:14px;
}

.form-group input{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:6px;
    font-size:14px;
    transition:0.2s;
}

.form-group input:focus{
    border-color:#0052cc;
    outline:none;
    box-shadow:0 0 0 2px rgba(0,82,204,0.15);
}

.settings-actions{
    margin-top:25px;
}

.save-btn{
    background:#0052cc;
    color:#fff;
    border:none;
    padding:12px 22px;
    border-radius:6px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
}

.save-btn:hover{
    background:#0747a6;
}

.drop-zone{
    border:2px dashed #bbb;
    padding:30px;
    text-align:center;
    border-radius:6px;
    cursor:pointer;
    background:#fafafa;
}

.drop-zone.dragging{
    background:#eef5ff;
    border-color:#0052cc;
}

.progress-row{
    margin-top:10px;
}

/* Professional attachment cards */
.attachments-box {
    margin: 24px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.attachments-box h3 {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 18px;
}

.attachments-box .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #0052cc;
    font-size: 12px;
    font-weight: 800;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.attachment-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.attachment-card:hover {
    border-color: #b8c7dc;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
}

.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.img-wrap:hover .overlay {
    opacity: 1;
}

.overlay a,
.overlay button {
    border: 0;
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.file-card {
    min-height: 120px;
    padding: 18px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
    border-bottom: 1px solid #e5edf7;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: #0052cc;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.attachment-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f3f8c;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.attachment-title:hover {
    text-decoration: underline;
}

.file-meta {
    color: #64748b;
    font-size: 12px;
}

.attachment-details {
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.attachment-card .file-name {
    margin: 0;
    padding: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

.attachment-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.attachment-actions a,
.attachment-actions button {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.attachment-actions a:hover,
.attachment-actions button:hover {
    border-color: #3b82f6;
    color: #0052cc;
    background: #eff6ff;
}

.attachment-actions .delete-btn:hover {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fff1f2;
}

.upload-box {
    margin: 24px 0;
    padding: 0;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: default;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.upload-head {
    padding: 18px 20px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.upload-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.upload-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.drop-zone {
    margin: 16px 20px 20px;
    min-height: 104px;
    border: 2px dashed #b8c7dc;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.drop-zone strong {
    color: #0f172a;
    font-size: 15px;
}

.drop-zone span {
    color: #64748b;
    font-size: 13px;
}

.drop-zone:hover,
.drop-zone.dragging {
    background: #eef5ff;
    border-color: #0052cc;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08);
}

.create-attachment-upload {
    position: relative;
    min-height: 98px;
    border: 2px dashed #b8c7dc;
    border-radius: 12px;
    background: #f8fafc;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.create-attachment-upload:hover,
.create-attachment-upload:focus,
.create-attachment-upload.dragging {
    outline: none;
    border-color: #0052cc;
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08);
}

.create-attachment-upload input {
    display: none;
}

.create-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0052cc;
    color: #fff;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
}

.create-upload-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.create-upload-copy strong {
    color: #0f172a;
    font-size: 15px;
}

.create-upload-copy span,
.create-upload-note {
    color: #64748b;
    font-size: 13px;
}

.create-upload-note {
    white-space: nowrap;
    font-weight: 700;
}

.file-preview.has-files {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.file-preview .file-item {
    margin: 0;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
}

.file-preview .file-type {
    min-width: 42px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #e8f1ff;
    color: #0052cc;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.file-preview .file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.file-preview .file-size {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .create-attachment-upload {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .create-upload-note {
        grid-column: 2;
    }
}

.issue-description .ck-content h1,
.issue-description .ck-content h2,
.issue-description .ck-content h3,
.comment-body h1,
.comment-body h2,
.comment-body h3,
.activity-body h1,
.activity-body h2,
.activity-body h3 {
    color: #0f172a;
    line-height: 1.25;
    margin: 16px 0 8px;
}

.issue-description .ck-content h1,
.comment-body h1,
.activity-body h1 {
    font-size: 26px;
}

.issue-description .ck-content h2,
.comment-body h2,
.activity-body h2 {
    font-size: 22px;
}

.issue-description .ck-content h3,
.comment-body h3,
.activity-body h3 {
    font-size: 18px;
}

.progress-bar{
    width:100%;
    height:6px;
    background:#eee;
    border-radius:5px;
}

.progress{
    height:100%;
    width:0;
    background:#36b37e;
    border-radius:5px;
}

/* Modal background */
.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.45);
    z-index:999;
}

/* Modal box */
.modal-box{
    background:#fff;
    width:460px;
    margin:120px auto;
    border-radius:10px;
    padding:25px;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
    animation:modalFade .25s ease;
}

@keyframes modalFade{
    from{transform:translateY(-20px);opacity:0}
    to{transform:translateY(0);opacity:1}
}

/* header */
.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.modal-header h3{
    margin:0;
    font-size:20px;
}

.close-modal{
    cursor:pointer;
    font-size:22px;
    color:#888;
}

.close-modal:hover{
    color:#000;
}

.modal-form input,
.modal-form select,
.form-row input,
.form-row select{
    width:100%;
    padding:10px;
    border:1px solid #ddd;
    border-radius:6px;
    font-size:14px;
}

.form-row{
    margin-bottom:14px;
}

.modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:15px;
}

/* buttons */
.btn-primary{
    background:#0052cc;
    color:white;
    border:none;
    padding:10px 16px;
    border-radius:6px;
    cursor:pointer;
    font-weight:500;
}

.btn-primary:hover{
    background:#0041a8;
}

.btn-secondary{
    background:#f4f5f7;
    border:none;
    padding:10px 16px;
    border-radius:6px;
    cursor:pointer;
}

.btn-secondary:hover{
    background:#e6e6e6;
}

/* action buttons in table */

.btn-edit{
    background:#e9f2ff;
    color:#0052cc;
    border:none;
    padding:6px 12px;
    border-radius:5px;
    cursor:pointer;
    font-size:13px;
}

.btn-toggle{
    background:#fff3cd;
    color:#856404;
    padding:6px 12px;
    border-radius:5px;
    text-decoration:none;
    font-size:13px;
}

.btn-reset{
    background:#f8d7da;
    color:#721c24;
    border:none;
    padding:6px 12px;
    border-radius:5px;
    cursor:pointer;
    font-size:13px;
}

.comment-body img.jira-image {
    max-width: 50% !important;
}

.activity-body img.jira-image {
    max-width: 100%;
}

.description-history-title {
    margin-bottom: 10px;
    color: #334155;
}

.description-change {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.description-change-col {
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #f8fafc;
    min-width: 0;
    overflow: hidden;
}

.description-change-label {
    padding: 8px 10px;
    border-bottom: 1px solid #dfe6ef;
    background: #eef4ff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.description-change-content {
    padding: 12px;
    max-height: 420px;
    overflow: auto;
    color: #1f2937;
    line-height: 1.55;
    word-break: break-word;
}

.description-change-content .description-after-highlight {
    background: #dbeafe;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 6px 0;
}

.description-change-content img {
    max-width: 100%;
    height: auto;
}

.description-change-arrow {
    padding-top: 46px;
    color: #0f172a;
    font-size: 22px;
}

.ticket-toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: calc(100vw - 48px);
    padding: 14px 16px;
    border-radius: 4px;
    background: #172b4d;
    color: #fff;
    box-shadow: 0 10px 30px rgba(9, 30, 66, 0.28);
    font-size: 14px;
    font-weight: 500;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.ticket-toast a {
    color: #4c9aff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ticket-toast a:hover {
    text-decoration: underline;
}

.ticket-toast-hide {
    opacity: 0;
    transform: translateY(8px);
}
