/* Glassmorphic Cards */
.card {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: var(--glow-effect);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #5146e5 100%);
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, #00b08f 100%);
    color: var(--bg-main);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 217, 177, 0.4);
}

.btn-danger {
    background-color: rgba(255, 77, 109, 0.1);
    border: 1px solid rgba(255, 77, 109, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: var(--text-primary);
}

.btn-icon {
    padding: 10px;
    aspect-ratio: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Inputs, Textareas, Selects */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background-color: rgba(10, 13, 20, 0.6);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-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='%238896A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.table th {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid rgba(30, 45, 69, 0.4);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(26, 34, 53, 0.3);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-new { background: rgba(108, 99, 255, 0.1); color: #a5a1ff; border-color: rgba(108, 99, 255, 0.2); }
.badge-analyzing { background: rgba(255, 170, 0, 0.1); color: #ffca66; border-color: rgba(255, 170, 0, 0.2); }
.badge-analyzed { background: rgba(0, 217, 177, 0.1); color: #6efce2; border-color: rgba(0, 217, 177, 0.2); }
.badge-outreach-ready { background: rgba(0, 217, 177, 0.1); color: #6efce2; border-color: rgba(0, 217, 177, 0.2); }
.badge-sent { background: rgba(136, 150, 169, 0.1); color: #b1bdcd; border-color: rgba(136, 150, 169, 0.2); }
.badge-replied { background: rgba(108, 99, 255, 0.15); color: #b6b1ff; border-color: rgba(108, 99, 255, 0.3); }
.badge-closing { background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 77, 109, 0.15)); color: #ff9e9e; border-color: rgba(255, 77, 109, 0.3); }
.badge-closed { background: rgba(0, 217, 177, 0.2); color: #00ffcc; border-color: rgba(0, 217, 177, 0.4); }
.badge-skipped { background: rgba(136, 150, 169, 0.05); color: var(--text-muted); border-color: rgba(136, 150, 169, 0.1); }

/* Opportunity score badges */
.score-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.score-high { background-color: rgba(0, 217, 177, 0.15); color: #00ffcc; border: 1px solid rgba(0, 217, 177, 0.3); }
.score-medium { background-color: rgba(255, 170, 0, 0.15); color: #ffbe4b; border: 1px solid rgba(255, 170, 0, 0.3); }
.score-low { background-color: rgba(255, 77, 109, 0.15); color: #ff778f; border: 1px solid rgba(255, 77, 109, 0.3); }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 13, 20, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-width: 600px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

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

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

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(10, 13, 20, 0.3);
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%;
}

.toast {
    padding: 16px;
    border-radius: 8px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateY(50px);
    opacity: 0;
    animation: toastIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.3s, transform 0.3s;
}

.toast-success { border-left: 4px solid var(--secondary); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

.toast-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.toast-success .toast-icon { color: var(--secondary); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--primary); }

.toast-content {
    flex-grow: 1;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

@keyframes toastIn {
    to { transform: translateY(0); opacity: 1; }
}

/* AI Spinner Overlay */
.ai-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 13, 20, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ai-spinner-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(108, 99, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-right: 4px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
}

.ai-spinner-text {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    animation: pulse 1.5s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Skeleton Shimmer Loaders */
.skeleton {
    background: linear-gradient(90deg, #111827 25%, #1d2636 50%, #111827 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short { width: 50%; }
.skeleton-text.medium { width: 75%; }

.skeleton-card {
    height: 150px;
    border-radius: 12px;
}

.skeleton-row {
    height: 50px;
    margin-bottom: 8px;
    border-radius: 4px;
}

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