/* Customer Portal - Premium Components & Badges Styling */

/* Glassmorphic Stats Grid & Interactive Filters */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
}

.stat-info .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.5px;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Quick Filter Pills Bar */
.filter-pills-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-pill:hover, .filter-pill.active {
    background: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px currentColor;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

/* Status Colors & Glows */
.badge-yeni { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-yeni .badge-dot { background: #3b82f6; }

.badge-inceleniyor { background: rgba(139, 92, 246, 0.18); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-inceleniyor .badge-dot { background: #8b5cf6; }

.badge-planlandi { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-planlandi .badge-dot { background: #06b6d4; }

.badge-yapiliyor { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-yapiliyor .badge-dot { background: #f59e0b; }

.badge-bilgi-bekleniyor { background: rgba(234, 179, 8, 0.18); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-bilgi-bekleniyor .badge-dot { background: #eab308; }

.badge-test-asamasinda { background: rgba(20, 184, 166, 0.18); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }
.badge-test-asamasinda .badge-dot { background: #14b8a6; }

.badge-tamamlandi { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tamamlandi .badge-dot { background: #10b981; }

.badge-reddedildi, .badge-kapatildi { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-reddedildi .badge-dot, .badge-kapatildi .badge-dot { background: #ef4444; }

.badge-yeniden-acildi { background: rgba(249, 115, 22, 0.18); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-yeniden-acildi .badge-dot { background: #f97316; }

/* Priority Badges */
.priority-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: inline-block;
}

.priority-low { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.2); }
.priority-normal { background: var(--info-light); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.priority-high { background: var(--warning-light); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.priority-urgent { background: var(--danger-light); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); animation: urgentPulse 1.8s infinite; }

@keyframes urgentPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.6); }
}

/* Data Tables */
.card-table {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.custom-table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.6px;
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

.custom-table tr:hover td {
    background-color: var(--bg-card-hover);
}

/* Buttons & Form Controls */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-control, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 16px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: rgba(0, 0, 0, 0.5);
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}

/* Custom Styled File Input Buttons */
input[type="file"] {
    padding: 8px 12px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border: none;
    color: white;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--primary-glow);
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--primary-glow);
    filter: brightness(1.1);
}

input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border: none;
    color: white;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--primary-glow);
}

input[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--primary-glow);
    filter: brightness(1.1);
}

/* Skeleton Loading State for Instant UX */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.94);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 19px;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Chat & Discussion Stream */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.chat-bubble {
    background-color: rgba(18, 25, 41, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.chat-bubble.internal-note {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1);
}

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

.chat-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-author-name {
    font-size: 14px;
    font-weight: 700;
}

.chat-time {
    font-size: 11.5px;
    color: var(--text-muted);
}

.chat-body {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    white-space: pre-line;
}
