@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #f8fafc; --bg-surface: #ffffff; --border: #e2e8f0;
    --primary: #4285F4; --primary-hover: #2b6cb0; --text-main: #1e293b; --text-muted: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); height: 100vh; display: flex; flex-direction: column; }

.btn-primary { background: var(--primary); color: white; border: none; padding: 12px 20px; border-radius: 12px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(66, 133, 244, 0.3); }
.btn-primary:active { transform: scale(0.96); }
.btn-secondary { background: #f1f5f9; border: 1px solid var(--border); color: var(--text-main); padding: 10px 14px; border-radius: 12px; cursor: pointer; transition: 0.2s; font-weight: 500;}
.btn-secondary:hover { background: #e2e8f0; }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 40px; background: rgba(255,255,255,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;}
.dashboard-header .brand { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 12px; color: var(--text-main); letter-spacing: -0.5px;}
.md-colab-banner { font-size: 0.85rem; color: var(--text-muted); font-weight: 500;}

.dashboard-main { flex: 1; padding: 40px; overflow-y: auto; max-width: 1400px; margin: 0 auto; width: 100%; }

.user-profile-btn { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; background: #f8fafc; border: 1px solid var(--border); border-radius: 100px; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.user-profile-btn:hover { background: white; border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-1px); }
.user-profile-btn:active { transform: scale(0.96); }
.user-profile-btn .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #4285F4, #8b5cf6); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.5px; box-shadow: 0 2px 6px rgba(66, 133, 244, 0.3); }
.user-profile-btn .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid rgba(0, 0, 0, 0.05); }
.user-info { display: flex; flex-direction: column; justify-content: center; }
.user-name { font-size: 0.9rem; font-weight: 600; color: var(--text-main); line-height: 1.2; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-profile-text { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

.tabs { display: inline-flex; background: #e2e8f0; padding: 4px; border-radius: 12px; gap: 4px; margin-bottom: 30px; border-bottom: none; }
.tab-btn { border: none; padding: 8px 20px; font-size: 0.95rem; border-radius: 8px; color: var(--text-muted); font-weight: 600; transition: all 0.2s ease; margin-bottom: 0; background: transparent; cursor: pointer; }
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 6px rgba(0,0,0,0.05); }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-header h2 { font-size: 1.6rem; letter-spacing: -0.5px; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.project-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); position: relative; display: flex; flex-direction: column; height: 180px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02); }
.project-card:hover { border-color: #cbd5e1; box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -5px rgba(0, 0, 0, 0.04); transform: translateY(-4px); }
.project-card:active { transform: scale(0.98); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); }

.card-title { margin-top: 6px; margin-bottom: 6px; font-size: 1.15rem; color: var(--text-main); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-date { font-size: 0.85rem; color: var(--text-muted); flex: 1; }
.badge { font-size: 0.75rem; padding: 6px 10px; border-radius: 100px; font-weight: 600; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;}

.card-actions { display: flex; gap: 8px; margin-top: auto; justify-content: flex-end; opacity: 0; transform: translateY(5px); transition: all 0.2s ease;}
.project-card:hover .card-actions { opacity: 1; transform: translateY(0); }
.card-actions button { background: #f8fafc; border: 1px solid #e2e8f0; width: 36px; height: 36px; border-radius: 50%; color: var(--text-muted); cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.card-actions button:hover { background: #e2e8f0; color: var(--text-main); transform: scale(1.05);}
.card-actions button.delete-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

.card-team { font-size: 0.8rem; color: var(--text-main); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.card-team i { color: var(--primary); background: #EFF6FF; padding: 4px; border-radius: 4px; font-size: 0.75rem; }
.card-team.private-label { color: var(--text-muted); font-weight: 500; }
.card-team.private-label i { color: #94A3B8; background: #F1F5F9; }

.empty-state { grid-column: 1/-1; text-align: center; margin-top: 60px; color: var(--text-muted); font-size: 1.1rem; }
.empty-state i { font-size: 3.5rem; color: #cbd5e1; margin-bottom: 16px; display: block; }

.skeleton { pointer-events: none; border-color: transparent !important; background: var(--bg-surface); }
.skeleton:hover { transform: none; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); }
.skeleton-badge { width: 75px; height: 24px; border-radius: 100px; background: #f1f5f9; animation: shimmer 1.5s infinite; margin-bottom: 16px; }
.skeleton-title { width: 85%; height: 22px; border-radius: 6px; background: #f1f5f9; animation: shimmer 1.5s infinite; margin-bottom: 8px; }
.skeleton-date { width: 45%; height: 14px; border-radius: 6px; background: #f8fafc; animation: shimmer 1.5s infinite; flex: 1; }
.skeleton-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; opacity: 1 !important; transform: none !important; }
.skeleton-btn { width: 36px; height: 36px; border-radius: 50%; background: #f1f5f9; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

#toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #1e293b; padding: 14px 24px; border-radius: 100px; color: white; animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 25px rgba(0,0,0,0.15); font-weight: 500;}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 16, 21, 0.7); backdrop-filter: blur(8px); z-index: 5000; display: flex; justify-content: center; align-items: center; animation: fadeIn 0.3s ease; }
.modal { background: white; width: 90%; max-width: 420px; padding: 32px; border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); position: relative; animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.close-btn { background: transparent; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0; line-height: 1; transition: 0.2s; }
.close-btn:hover { color: var(--text-main); transform: scale(1.1); }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.input-group input, .input-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.95rem; outline: none; transition: 0.2s; background: #fff; }
.input-group input:focus, .input-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15); }
.full-width { width: 100%; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUpModal { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 850px) {
    .hide-mobile { display: none !important; }
    .dashboard-header { padding: 16px 20px; }
    .dashboard-main { padding: 20px; }
    .project-card .card-actions { opacity: 1; transform: none; }
    .projects-grid { grid-template-columns: 1fr; }
    .user-profile-btn { padding: 4px; }
    .user-profile-btn .avatar { width: 32px; height: 32px; font-size: 0.8rem; }
}
