/* Main Content Area */
.main-content {
    grid-area: main;
    overflow-y: auto;
    background: #f8fafc;
    position: relative;
}

/* Status Navigation Tabs */
.status-nav {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
    width: fit-content;
}

.status-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    font-size: 14px;
}

.status-tab.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    transition: all 0.2s;
}

.status-tab.active .status-count {
    background: #3b82f6;
    color: white;
}

/* Cards and Sections */
.content-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 2fr 1fr;
}

div.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.list-card-header,
.custom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.stat-trend {
    margin-top: 8px;
    font-size: 12px;
}

.ticket-emergency {
    border: 2px solid #ef4444 !important;
    background: #fef2f2 !important;
}

/* Status dropdown */
.status-dropdown {
    position: relative;
    display: inline-block;
}

.status-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 160px;
    display: none;
}

.status-dropdown-item {
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dropdown-item:hover {
    background: #f8fafc;
}

.status-dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

/* Animate the default Bootstrap caret */
.dropdown-toggle::after {
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Ticket List */
.ticket-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto 0.5fr;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.small-sidebar .ticket-item {
    display: flex;
    flex-direction: column;
}

.ticket-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #c7d2fe;
}

.ticket-content {
    flex: auto;
    min-width: 0;
    width: calc(100%);
}

.ticket-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-category {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.small-sidebar * .ticket-item {
    padding: 8px 10px
}


.ticket-right {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 16px;
    flex-shrink: 0;
    width: --webkit-fill-available;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: #dbeafe;
    color: #1e40af;
}

.status-progress {
    background: #fef3c7;
    color: #d97706;
}

.status-hold {
    background: #fee2e2;
    color: #dc2626;
}

.status-closed {
    background: #f1f5f9;
    color: #475569;
}

.assignee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Content Views */
.content-view {
    display: none;
}

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

/* Pagination */
.tickets-page {
    display: block;
}

.pagination-btn {
    background: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    min-width: 40px;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #f8fafc;
    border-color: #c7d2fe;
}

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Tables & scrolling */
.table.glass-table>:not(caption)>*>* {
    padding: 16px 20px;
    transition: background 0.2s;
    cursor: pointer;
}

.clickable-row {
    cursor: pointer;
}

.page-item, .dropdown-item, .ticket-card{
    cursor: pointer;
}

/* List card grid like generic list */
.list-card-grid {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: calc(100vh - 32px);
  min-height: 520px;
}

.table-shell { min-height: 0; }

.table-scroller {
  height:100%;
  overflow: auto;
}

.table-fixed {
  width: 100%;
}

.table-fixed thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.table-fixed thead,
.table-fixed tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.table-fixed tbody {
  display: block;
  max-height: 70vh;
}

.table-fixed td{
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

tr.is-active > td {
    background: rgba(0,0,0,0.075);
}

/* Related Tickets Card table */
#RelatedTicketsCard .table {
  width: 100%;
  margin-bottom: 0;
}

#RelatedTicketsCard th,
#RelatedTicketsCard td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

#RelatedTicketsCard .ticket-title,
#RelatedTicketsCard .ticket-category {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

#RelatedTicketsCard td:nth-child(3),
#RelatedTicketsCard td:nth-child(4) {
  width: 1%;
}

#RelatedTicketsCard.card {
  overflow: hidden;
}

/* Data grid */
.grid-cell-card{
    min-height: 32px;
}

.data-grid{
    display: grid;
    grid-template-columns: minmax(100px, 200px) 2fr;
}

.data-grid > div {
    margin-bottom: 8px ;
}

/* Global padding toggles */
.no_global_padding * .main-content {
    padding: 0 32px  32px 0
}

.no_global_padding * .container-fluid.mt-3 {
    margin-top: 0 !important;
}

/* Ticket card active states */
.ticket-card.is-active .ticket-item {
  border-color: var(--primary);
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

.ticket-card.active .ticket-item{
    background-color: var(--aradoo-light-grey);
}
h3.custom-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

