/* Incoming Applications Page - Professional Dashboard */

/* Override position-detail styles */
.position-detail-main {
    background: var(--color-bg);
}

.breadcrumb-section {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 0;
    margin-bottom: 2.5rem;
}

.breadcrumb {
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--grad-new-end);
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 0.75rem;
}

.breadcrumb .current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.position-header {
    background: transparent;
    border-bottom: none;
    padding: 0 0 2.5rem 0;
    margin-bottom: 2.5rem;
}

.position-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.position-tagline {
    font-size: 1.063rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    line-height: 1.6;
}

.position-content {
    background: var(--color-bg);
}

/* Filter Section - Clean & Professional */
.filter-section {
    background: rgba(17, 17, 17, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.filter-select {
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-size: 0.938rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.4);
}

.filter-select:focus {
    outline: none;
    border-color: var(--grad-new-end);
    box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.1);
}

.filter-select option {
    background: #1a1a1a;
    color: var(--text-color);
    padding: 0.5rem;
}

/* Stats Bar - Corporate Metrics */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--grad-new-end);
    transition: all 0.3s ease;
    animation: slideInStat 0.5s ease-out backwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInStat {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}

.stat-value.updating {
    animation: countUpdate 0.5s ease-out;
}

@keyframes countUpdate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.stat-value.status-new {
    color: var(--grad-new-end);
}

.stat-value.status-reviewing {
    color: #ff9500;
}

/* Applications List */
.applications-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.loading-state,
.empty-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--color-muted);
    font-size: 1.1rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-state::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--grad-new-end);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Application Card - Professional Layout with Animations */
.application-card {
    background: rgba(17, 17, 17, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin-bottom: 1rem;
    position: relative;
}

.application-card.initial-load {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.application-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.application-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 204, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.application-card:hover {
    background: rgba(17, 17, 17, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.application-card:hover::before {
    background: var(--grad-new-end);
    width: 4px;
}

.application-card.status-updating {
    animation: statusPulse 0.6s ease-in-out;
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
}

.application-card.new::before {
    background: var(--grad-new-end);
}

.application-card.new::after {
    background: radial-gradient(circle at center, rgba(0, 204, 255, 0.15), transparent 70%);
}

.application-card.reviewing::before {
    background: #ff9500;
}

.application-card.reviewing::after {
    background: radial-gradient(circle at center, rgba(255, 149, 0, 0.15), transparent 70%);
}

.application-card.accepted::before {
    background: #00ff88;
    animation: successGlow 1s ease-in-out;
}

.application-card.accepted::after {
    background: radial-gradient(circle at center, rgba(0, 255, 136, 0.2), transparent 70%);
    opacity: 1;
    animation: fadeOutGlow 2s ease-out forwards;
}

@keyframes successGlow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(0, 255, 136, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    }
}

@keyframes fadeOutGlow {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.application-card.rejected::before {
    background: #ff4444;
}

.application-card.rejected::after {
    background: radial-gradient(circle at center, rgba(255, 68, 68, 0.15), transparent 70%);
}

/* Card Header - Clean Layout */
.app-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.app-main-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.app-position {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-status-badge {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.app-status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.app-status-badge.status-changing::before {
    left: 100%;
}

.app-status-badge.new {
    background: rgba(0, 204, 255, 0.15);
    color: var(--grad-new-end);
    border: 1px solid rgba(0, 204, 255, 0.3);
    animation: badgeFadeIn 0.4s ease-out;
}

.app-status-badge.reviewing {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
    animation: badgeFadeIn 0.4s ease-out;
}

.app-status-badge.accepted {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    animation: badgeSuccess 0.6s ease-out;
}

.app-status-badge.rejected {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
    animation: badgeReject 0.6s ease-out;
}

@keyframes badgeFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes badgeSuccess {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes badgeReject {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    25%, 75% {
        transform: scale(1) translateX(-3px);
    }
    50% {
        transform: scale(1) translateX(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

/* Card Content - Data Grid */
.app-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-detail {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.app-detail-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.app-detail-value {
    font-size: 0.938rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.app-detail-value a {
    color: var(--grad-new-end);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.app-detail-value a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Card Footer - Action Bar */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.app-date {
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.app-actions {
    display: flex;
    gap: 0.625rem;
}

.app-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.813rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.app-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.app-btn:active::before {
    width: 300px;
    height: 300px;
}

.app-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.app-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.app-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.app-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: btnSpinner 0.6s linear infinite;
}

@keyframes btnSpinner {
    to {
        transform: rotate(360deg);
    }
}

.app-btn.primary {
    background: rgba(0, 204, 255, 0.15);
    color: var(--grad-new-end);
    border: 1px solid rgba(0, 204, 255, 0.3);
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-btn.primary:hover {
    background: var(--grad-new-end);
    color: #000;
    border-color: var(--grad-new-end);
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.3);
    transform: translateY(-1px);
}

.app-btn.review-btn {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
    border-color: rgba(255, 149, 0, 0.3);
}

.app-btn.review-btn:hover {
    background: #ff9500;
    color: #000;
    border-color: #ff9500;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.app-btn.accept {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.3);
}

.app-btn.accept:hover {
    background: #00ff88;
    color: #000;
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.app-btn.reject {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.3);
}

.app-btn.reject:hover {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.app-btn.delete-btn {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.2);
    padding: 0.625rem 0.75rem;
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-btn.delete-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.app-btn.delete-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.app-btn.delete-btn:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-content {
        grid-template-columns: 1fr;
    }
    
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .app-btn {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        padding: var(--space-4);
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Application Details Modal - Completely Redesigned */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 2rem;
}

.app-modal.active {
    opacity: 1;
}

.app-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
}

.app-modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    max-width: 1000px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-modal.active .app-modal-content {
    transform: scale(1) translateY(0);
}

.app-modal-header {
    padding: 2.5rem 3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
}

.app-modal-header h2 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.02em;
}

.app-modal-close {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 1.5rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    position: relative;
    flex-shrink: 0;
}

.app-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.app-modal-close:active {
    transform: rotate(90deg) scale(1);
}

.app-modal-body {
    padding: 3rem;
    overflow-y: auto;
    flex: 1;
}

.app-modal-body::-webkit-scrollbar {
    width: 10px;
}

.app-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.app-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

.app-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

.app-modal-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.app-modal-section:last-child {
    margin-bottom: 0;
}

.app-modal-section h3 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 1.75rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-modal-section h3::before {
    content: '▸';
    color: #667eea;
    font-size: 1.75rem;
}

.app-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.app-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-modal-field.full-width {
    grid-column: 1 / -1;
}

.app-modal-field label {
    font-size: 1rem;
    font-weight: 700;
    color: #cbd5e1;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-modal-field p {
    font-size: 1.125rem;
    color: #f1f5f9;
    margin: 0;
    line-height: 1.8;
    font-weight: 500;
}

.app-modal-field a {
    color: #a5b4fc;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.app-modal-field a:hover {
    color: #c7d2fe;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.app-modal-text {
    font-size: 1.125rem;
    color: #e2e8f0;
    line-height: 1.9;
    margin: 0;
    white-space: pre-wrap;
    font-weight: 400;
}

.app-modal-footer {
    padding: 2rem 3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.6);
}

.app-modal-footer .app-btn {
    min-width: 160px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
}

.app-btn.secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.app-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .app-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .app-modal-header {
        padding: 1.5rem;
    }
    
    .app-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .app-modal-body {
        padding: 1.5rem;
    }
    
    .app-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .app-modal-footer {
        flex-direction: column;
    }
    
    .app-modal-footer .app-btn {
        width: 100%;
    }
}
