/* WeCare Tickets Styles */
/* Scoped to .aot-page to avoid conflicts */

.aot-page {
    padding: 24px;
    background: #f8fafc;
    min-height: 100vh;
}

.aot-page .aot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.aot-page .aot-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.aot-page .aot-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
}

/* Stats Cards */
.aot-page .aot-stats {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}

.aot-page .aot-stats::-webkit-scrollbar {
    height: 6px;
}

.aot-page .aot-stats::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.aot-page .aot-stats::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.aot-page .stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 190px;
    flex: 1 0 0;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.aot-page .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.25s;
}

.aot-page .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.aot-page .stat-card:hover::before {
    opacity: 1;
}

.aot-page .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aot-page .stat-icon i {
    font-size: 18px;
    line-height: 1;
}

.aot-page .stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.aot-page .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.aot-page .stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stat Card Colors */
.aot-page .stat-new { --stat-color: #2563eb; --stat-bg: #dbeafe; }
.aot-page .stat-new::before { background: var(--stat-color); }
.aot-page .stat-new .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-new .stat-value { color: var(--stat-color); }

.aot-page .stat-progress { --stat-color: #d97706; --stat-bg: #fef3c7; }
.aot-page .stat-progress::before { background: var(--stat-color); }
.aot-page .stat-progress .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-progress .stat-value { color: var(--stat-color); }

.aot-page .stat-hold { --stat-color: #64748b; --stat-bg: #f1f5f9; }
.aot-page .stat-hold::before { background: var(--stat-color); }
.aot-page .stat-hold .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-hold .stat-value { color: var(--stat-color); }

.aot-page .stat-urgent { --stat-color: #dc2626; --stat-bg: #fee2e2; }
.aot-page .stat-urgent::before { background: var(--stat-color); }
.aot-page .stat-urgent .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-urgent .stat-value { color: var(--stat-color); }

.aot-page .stat-resolved { --stat-color: #059669; --stat-bg: #d1fae5; }
.aot-page .stat-resolved::before { background: var(--stat-color); }
.aot-page .stat-resolved .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-resolved .stat-value { color: var(--stat-color); }

.aot-page .stat-closed { --stat-color: #b91c1c; --stat-bg: #fee2e2; }
.aot-page .stat-closed::before { background: var(--stat-color); }
.aot-page .stat-closed .stat-icon { background: var(--stat-bg); color: var(--stat-color); }
.aot-page .stat-closed .stat-value { color: var(--stat-color); }

/* Avatar */
.aot-page .avatar-xs {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.aot-page .aot-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.aot-page .aot-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

.aot-page .aot-search input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aot-page .aot-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.aot-page .aot-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.aot-page .aot-filters select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    min-width: 130px;
}

.aot-page .aot-filters select:focus {
    outline: none;
    border-color: #6366f1;
}

/* Unified form controls (form-select / form-control) to match the aot-filters look */
.aot-page .form-select,
.aot-page .form-control,
.aot-page input.form-control,
.aot-page select.form-select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    min-width: 130px;
    height: auto;
    line-height: 1.4;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.aot-page .form-select:focus,
.aot-page .form-control:focus,
.aot-page input.form-control:focus,
.aot-page select.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aot-page .form-select:hover:not(:focus),
.aot-page .form-control:hover:not(:focus) {
    border-color: #cbd5e1;
}

.aot-page select.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

.aot-page select.form-select::-ms-expand {
    display: none;
}

.aot-page .aot-table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.aot-page .aot-table {
    width: 100%;
    border-collapse: collapse;
}

.aot-page .aot-table thead {
    background: #f8fafc;
}

.aot-page .aot-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.aot-page .aot-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.aot-page .aot-table tbody tr:hover {
    background: #f8fafc;
}

.aot-page .unit-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.aot-page .unit-link:hover {
    text-decoration: underline;
}

.aot-page .meta {
    color: #64748b;
    font-size: 13px;
}

.aot-page .person {
    color: #475569;
    font-weight: 500;
}

.aot-page .date {
    color: #94a3b8;
    font-size: 12px;
}

.aot-page .aot-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.aot-page .aot-badge-new { background: #eef2ff; color: #4338ca; }
.aot-page .aot-badge-assigned { background: #ecfeff; color: #0891b2; }
.aot-page .aot-badge-in_progress { background: #fef3c7; color: #b45309; }
.aot-page .aot-badge-on_hold { background: #f1f5f9; color: #475569; }
.aot-page .aot-badge-resolved { background: #dcfce7; color: #15803d; }
.aot-page .aot-badge-closed { background: #fee2e2; color: #b91c1c; }

.aot-page .aot-badge-urgent { background: #fee2e2; color: #dc2626; }
.aot-page .aot-badge-high { background: #ffedd5; color: #c2410c; }
.aot-page .aot-badge-medium { background: #fef3c7; color: #a16207; }
.aot-page .aot-badge-low { background: #f1f5f9; color: #475569; }

.aot-page .aot-btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
}

.aot-page .aot-btn-view:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.aot-page .aot-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.aot-page .aot-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.aot-page .aot-empty h4 {
    font-size: 18px;
    color: #475569;
    margin: 0 0 8px 0;
}

.aot-page .aot-empty p {
    font-size: 14px;
    margin: 0;
}

.aot-page .aot-pagination {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
}

.aot-page .aot-pagination .pagination {
    margin: 0;
    gap: 4px;
}

.aot-page .aot-pagination .page-link {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    font-size: 13px;
    margin: 0;
}

.aot-page .aot-pagination .page-link:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4f46e5;
}

.aot-page .aot-pagination .page-link:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    outline: none;
}

.aot-page .aot-pagination .page-item.disabled .page-link {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.aot-page .aot-pagination .page-item.active .page-link {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

@media (max-width: 768px) {
    .aot-page { padding: 16px; }
    .aot-page .aot-header { flex-direction: column; align-items: flex-start; }
    .aot-page .aot-search { max-width: 100%; width: 100%; }
    .aot-page .aot-filters { width: 100%; }
    .aot-page .aot-filters select { flex: 1; min-width: 100px; }
    .aot-page .stat-card { min-width: 150px; padding: 16px; }
    .aot-page .stat-value { font-size: 24px; }
    .aot-page .stat-icon { width: 40px; height: 40px; }
}

/* ============================================
   Choose Service Item Page
   ============================================ */

.aot-choose {
    --wc-primary: #4f46e5;
    --wc-primary-light: #eef2ff;
    --wc-text: #111827;
    --wc-muted: #6b7280;
    --wc-border: #e5e7eb;
    --wc-bg: #f8fafc;
    --wc-card: #ffffff;
    --wc-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    
    background: var(--wc-bg);
    min-height: calc(100vh - 120px);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .aot-choose { padding: 2rem; }
}

.aot-choose .wc-card {
    background: var(--wc-card);
    border-radius: 12px;
    box-shadow: var(--wc-shadow);
    border: 1px solid var(--wc-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.aot-choose .wc-service-card {
    background: var(--wc-card);
    border-radius: 10px;
    box-shadow: var(--wc-shadow);
    border: 1px solid var(--wc-border);
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    height: auto;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aot-choose .wc-service-card:hover {
    border-color: var(--wc-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.12);
}

.aot-choose .wc-service-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--wc-primary-light);
    color: var(--wc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.aot-choose .wc-service-card__name {
    font-weight: 600;
    color: var(--wc-text);
    font-size: 0.85rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aot-choose .wc-service-card__desc {
    font-size: 0.75rem;
    color: var(--wc-muted);
    display: none;
}

.aot-choose .wc-department-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.aot-choose .wc-department-tab {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1.5px solid var(--wc-border);
    background: var(--wc-card);
    color: var(--wc-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aot-choose .wc-department-tab:hover {
    border-color: var(--wc-primary);
    color: var(--wc-primary);
}

.aot-choose .wc-department-tab--active {
    background: var(--wc-primary);
    border-color: var(--wc-primary);
    color: white;
}

.aot-choose .wc-search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.aot-choose .wc-search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--wc-border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--wc-card);
    transition: all 0.2s ease;
}

.aot-choose .wc-search-box input:focus {
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.aot-choose .wc-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wc-muted);
}

.aot-choose .wc-info-bar {
    background: var(--wc-primary-light);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--wc-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.aot-choose .wc-form-label {
    display: block;
    font-weight: 600;
    color: var(--wc-text);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.aot-choose .wc-form-control {
    border: 1px solid var(--wc-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    background: var(--wc-card);
    transition: all 0.2s ease;
    height: auto;
}

.aot-choose .wc-form-control:focus {
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.aot-choose .wc-form-control:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.aot-choose .wc-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--wc-muted);
}

.aot-choose .wc-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Priority Badges */
.aot-choose .wc-priority-badge {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.aot-choose .wc-priority-low {
    background: #6b728020;
    color: #6b7280;
}

.aot-choose .wc-priority-medium {
    background: #3b82f620;
    color: #3b82f6;
}

.aot-choose .wc-priority-high {
    background: #f59e0b20;
    color: #f59e0b;
}

.aot-choose .wc-priority-critical {
    background: #ef444420;
    color: #ef4444;
}

/* Custom 5-column grid for xl screens */
.col-xl-2-4 {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 576px) {
    .col-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

