/* Application-specific styles */

/* Header layout */
.app-layout {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.app-main-content {
    flex: 1;
    min-width: 0;
}

/* Page Header */
.app-page-header {
    margin-bottom: 8px;
}

.app-page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

/* Toolbar */
.app-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px 0 16px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.app-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: white;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-toolbar-btn:not(.app-inactive) {
    border-color: #3498db;
    color: #2c3e50;
}

.app-toolbar-btn:not(.app-inactive) i {
    color: #3498db;
}

.app-toolbar-btn.app-inactive {
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: default;
}

.app-toolbar-btn.app-inactive i {
    color: #94a3b8;
}

.app-toolbar-btn:not(.app-inactive):hover {
    background-color: #f8fafc;
    border-color: #2980b9;
}

/* List Actions */
.app-list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
}

/* Search Bar */
.app-search-bar {
    position: relative;
    flex: 1;
}

.app-search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.875rem;
}

.app-search-bar input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1e293b;
    background: white;
}

.app-search-bar input:focus {
    outline: none;
    border-color: #3498db;
}

.app-search-bar input::placeholder {
    color: #94a3b8;
}

/* Add Button */
.app-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.app-btn-primary:hover {
    background: #2980b9;
}

.app-btn-primary i {
    font-size: 0.875rem;
}

/* Label Filters */
.app-label-filters {
    display: none;
}

/* Ticket Lists */
.app-ticket-lists {
    margin-top: 24px;
}

.app-list-tabs {
    border-bottom: 1px solid #e2e8f0;
}

.app-list-header {
    display: flex;
    gap: 24px;
}

.app-list-tab {
    padding: 12px 0;
    color: #64748b;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-list-tab:hover {
    color: #1e293b;
}

.app-list-tab.app-active {
    color: #3498db;
}

.app-list-tab.app-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3498db;
}

.app-ticket-count {
    font-size: 0.75rem;
    background: #f8fafc;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Ticket List */
.app-ticket-list {
    display: none;
    margin-top: 16px;
}

.app-ticket-list.app-active {
    display: block;
}

/* Ticket Table */
.app-ticket-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    table-layout: fixed;
}

.app-ticket-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.app-ticket-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.app-priority-col {
    width: 8px;
    padding: 0 !important;
}

.app-points-col {
    width: 80px;
    text-align: center !important;
}

.app-due-col {
    width: 120px;
    white-space: nowrap;
}

.app-ticket-col {
    min-width: 0;
}

.app-priority-col.app-urgent {
    background-color: #ef4444;
}

.app-priority-col.app-high {
    background-color: #f97316;
}

.app-priority-col.app-medium {
    background-color: #facc15;
}

.app-priority-col.app-low {
    background-color: #22c55e;
}

.app-ticket-number {
    color: #64748b;
    margin-right: 8px;
}

.app-due-col.app-overdue {
    color: #ef4444;
}

.app-ticket-table tr:last-child td {
    border-bottom: none;
}

.app-ticket-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.app-ticket-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.app-ticket-table .app-ticket-row {
    transition: background-color 0.2s;
}

.app-ticket-table .app-ticket-row:hover {
    background: #f8fafc;
    cursor: pointer;
}

/* Cards */
.app-card {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-bottom: 24px !important;
    display: block !important;
}

.app-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 0 !important;
}

.app-card-header h2 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
}

.app-card-header .app-agent-icon {
    height: 24px !important;
    width: auto !important;
}

 .app-header-link {
    margin-left: auto !important;
    text-decoration: none !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    float:right;
    margin-top:-4px;
}

 .app-header-link:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* Support Features */
.app-support-features {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.app-feature-item {
    display: flex !important;
    align-items: center !important;
    padding: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.app-feature-item:last-child {
    border-bottom: none !important;
}

.app-feature-item i:first-child {
    color: #64748b !important;
    width: 20px !important;
    text-align: center !important;
    margin-right: 12px !important;
    font-size: 0.9rem !important;
}

.app-feature-item span {
    font-size: 0.9rem !important;
    color: #475569 !important;
    flex: 1 !important;
}

.app-feature-item .app-status-icon {
    margin-left: auto !important;
    font-size: 0.9rem !important;
    width: 20px !important;
    text-align: center !important;
}

.app-feature-item.app-active i:first-child {
    color: #22c55e !important;
}

.app-feature-item.app-active .app-status-icon {
    color: #22c55e !important;
}

.app-feature-item:not(.app-active) .app-status-icon {
    color: #ef4444 !important;
}

/* Resource Groups */
.app-resource-groups {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.app-resource-group {
    display: flex !important;
    align-items: center !important;
    padding: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.app-resource-group:last-child {
    border-bottom: none !important;
}

.app-resource-icon {
    color: #64748b !important;
    width: 20px !important;
    text-align: center !important;
    margin-right: 12px !important;
    font-size: 0.9rem !important;
}

.app-resource-name {
    font-size: 0.9rem !important;
    color: #475569 !important;
    flex: 1 !important;
}

.app-resource-percent {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    min-width: 48px !important;
    text-align: right !important;
    margin-left: 16px !important;
}

.app-resource-percent.app-good {
    color: #22c55e !important;
}

.app-resource-percent.app-warning {
    color: #f59e0b !important;
}

.app-resource-percent.app-critical {
    color: #ef4444 !important;
}

/* Ticket Links */
.app-ticket-link {
    color: #1e293b;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.app-ticket-link:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Iteration Groups */
.app-iteration-group {
    margin-top: 24px;
    margin-bottom: 32px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.app-iteration-group:first-child {
    margin-top: 0;
}

.app-iteration-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.app-iteration-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.app-iteration-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.app-iteration-link:hover {
    text-decoration: underline;
}

.app-iteration-link .app-ticket-number {
    color: #64748b;
    font-weight: 500;
}

.app-iteration-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.app-iteration-tags {
    display: flex;
    gap: 8px;
}

.app-iteration-points {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    white-space: nowrap;
}

/* Label Colors */
.app-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.app-label[data-label="api"] {
    background: #dbeafe;
    color: #1e40af;
}

.app-label[data-label="authentication"] {
    background: #fae8ff;
    color: #86198f;
}

.app-label[data-label="bug"] {
    background: #fee2e2;
    color: #991b1b;
}

.app-label[data-label="database"] {
    background: #e0f2fe;
    color: #075985;
}

.app-label[data-label="performance"] {
    background: #dcfce7;
    color: #166534;
}

.app-label[data-label="security"] {
    background: #fef3c7;
    color: #92400e;
}

.app-label[data-label="ui"] {
    background: #f3e8ff;
    color: #6b21a8;
}

.app-label[data-label="feature"] {
    background: #e0e7ff;
    color: #3730a3;
}

.app-label[data-label="accessibility"] {
    background: #ffedd5;
    color: #9a3412;
}

.app-label[data-label="testing"] {
    background: #f1f5f9;
    color: #334155;
}

.app-label[data-label="documentation"] {
    background: #f3f4f6;
    color: #374151;
}

/* Update ticket table styles for iteration groups */
.app-iteration-group .app-ticket-table {
    margin: 0;
    border: none;
}

.app-iteration-group .app-ticket-table thead th {
    background: #f8fafc;
    padding: 12px 24px;
}

.app-iteration-group .app-ticket-table td {
    padding: 12px 24px;
}

.app-iteration-group .app-ticket-table tbody tr:last-child td {
    border-bottom: none;
} 