/**
 * Application Tracker Modal Styles
 */

/* Modal Overlay */
.app-tracker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.app-tracker-modal.show {
    opacity: 1;
    visibility: visible;
}

.app-tracker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.app-tracker-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    background: var(--primary-bg);
    border-radius: 24px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .app-tracker-content {
    background: var(--secondary-bg);
    border: 1px solid rgba(160, 123, 204, 0.2);
}

/* Header */
.app-tracker-header {
    padding: 2rem;
    background: var(--gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-tracker-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-tracker-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.app-tracker-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Stats Row */
.app-tracker-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background: var(--secondary-bg);
    border-bottom: 2px solid rgba(160, 123, 204, 0.1);
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--primary-bg);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.stat-mini:hover {
    transform: translateY(-4px);
}

.stat-mini-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-mini-content {
    flex: 1;
}

.stat-mini-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-mini-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Actions Bar */
.app-tracker-actions {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--primary-bg);
    border-bottom: 1px solid rgba(160, 123, 204, 0.1);
}

.app-tracker-filters {
    display: flex;
    gap: 1rem;
}

.app-tracker-filters select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(160, 123, 204, 0.2);
    border-radius: 12px;
    background: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-tracker-filters select:hover {
    border-color: var(--accent-color);
}

.app-tracker-filters select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(160, 123, 204, 0.1);
}

/* Application Grid */
.app-tracker-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 400px);
}

/* Application Card */
.app-card {
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid rgba(160, 123, 204, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(160, 123, 204, 0.2);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.app-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.app-card-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-planning {
    background: rgba(156, 163, 175, 0.2);
    color: #6b7280;
}

.badge-in_progress {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-submitted {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge-accepted {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-waitlisted {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-type {
    background: var(--gradient);
    color: white;
}

/* Card Body */
.app-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.app-detail i {
    width: 20px;
    color: var(--accent-color);
}

/* Progress Bar */
.app-progress {
    margin-top: 0.5rem;
}

.app-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.app-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(160, 123, 204, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.app-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Notes */
.app-notes {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--primary-bg);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.app-notes i {
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Card Footer */
.app-card-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(160, 123, 204, 0.1);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    flex: 1;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Empty State */
.app-tracker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.app-tracker-empty i {
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.app-tracker-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.app-tracker-empty p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Modal */
.app-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
}

.app-form-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--primary-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    animation: slideIn 0.3s ease;
}

[data-theme="dark"] .app-form-modal {
    background: var(--secondary-bg);
    border: 1px solid rgba(160, 123, 204, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.app-form-modal h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-form-modal h3 i {
    color: var(--accent-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(160, 123, 204, 0.2);
    border-radius: 12px;
    background: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(160, 123, 204, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Status Options */
.status-modal {
    max-width: 500px;
}

.status-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.status-option {
    padding: 1rem;
    background: var(--secondary-bg);
    border: 2px solid rgba(160, 123, 204, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-option:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.status-option.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.status-option i {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-tracker-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .app-tracker-header {
        padding: 1.5rem;
    }

    .app-tracker-header h2 {
        font-size: 1.3rem;
    }

    .app-tracker-stats {
        grid-template-columns: 1fr 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .app-tracker-actions {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .app-tracker-filters {
        flex-direction: column;
    }

    .app-tracker-grid {
        padding: 1rem;
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .status-options {
        grid-template-columns: 1fr;
    }
}
