/* FarmX PRO Styles */

:root {
    /* Light Mode Variables - 商务浅色 */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-surface: #F1F5F9;
    --bg-input: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-dim: #94A3B8;
    --border-color: #CBD5E1;

    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(226, 232, 240, 0.9);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);

    --grid-dot: #E2E8F0;
}

.dark {
    /* Dark Mode Variables - 商务深色 */
    --bg-main: #0F172A;
    --bg-card: #1E293B;
    --bg-surface: #334155;
    --bg-input: #1E293B;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --border-color: #475569;

    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --grid-dot: #334155;
}

body {
    font-family: 'Segoe UI', "Microsoft YaHei", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s, color 0.3s;
}

/* View Container - Ensures proper stacking context */
#view-container {
    position: relative;
    z-index: 1;
    isolation: isolate; /* Creates new stacking context */}

/* Glassmorphism & Business-Tech Effects */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--tech-primary);
}

.tech-border {
    border: 1px solid var(--border-color);
}

.nav-item-active {
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.18) 0%, transparent 100%);
    border-left: 3px solid #1E40AF;
    color: #1E40AF;
}
.dark .nav-item-active {
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.25) 0%, transparent 100%);
    color: #60A5FA;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}

.status-badge {
    position: relative;
    overflow: hidden;
}
.status-badge::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.15), transparent);
    transform: translateX(-100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    100% { transform: translateX(100%); }
}

/* Business Card Hover Effect */
.business-card {
    position: relative;
    overflow: hidden;
}
.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.business-card:hover::before {
    opacity: 1;
}

/* Premium Gold Accent */
.gold-accent {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Professional Gradient */
.pro-gradient {
    background: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 50%, #2563EB 100%);
}

/* Modern Input Styles */
.modern-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-input:focus {
    border-color: var(--tech-primary, #1E40AF);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.modern-input::placeholder {
    color: var(--text-dim);
}

/* Modern Select */
.modern-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 2.5rem 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.modern-select:focus {
    border-color: var(--tech-primary, #1E40AF);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Modern Button */
.modern-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modern-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-btn:active {
    transform: translateY(0);
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modern-table thead {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-input) 100%);
}

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

.modern-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color/30);
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: background-color 0.2s ease;
}

.modern-table tbody tr:hover {
    background-color: var(--bg-surface);
}

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

/* Modern Card */
.modern-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(30, 64, 175, 0.1);
    color: #1E40AF;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

.badge-secondary {
    background: rgba(217, 119, 6, 0.1);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Pulse Animation */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--tech-primary, #1E40AF);
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Dashboard Stats Animations */
@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-in {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-bounce {
    animation: bounce-in 2s ease-in-out infinite;
}

.drop-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Pipeline Progress Animations */
@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.pipeline-step-glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes progress-fill {
    from { width: 0%; }
    to { width: var(--progress-width, 0%); }
}

.progress-bar-animated {
    animation: progress-fill 1s ease-out;
}

/* Glass Card Hover Effect */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--tech-primary, #1E40AF);
}

/* Fade Transition */
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s ease, transform 0.3s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; transform: translateY(10px); }

/* Notification Styles */
.notification {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.notification-enter {
    transform: translateX(100%);
    opacity: 0;
}

.notification-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.3);
}

.notification-error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.notification-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
    border-color: rgba(245, 158, 11, 0.3);
}

.notification-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    border-color: rgba(59, 130, 246, 0.3);
}

.notification-close {
    margin-left: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}
