/* ============================================================
   FindAndWorks — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ─── VARIABLES ─── */
:root {
    --bg: #07090f;
    --bg2: #0d1017;
    --card: #141720;
    --card-hover: #1a1f2e;
    --blue: #4f8ef7;
    --blue-dark: #2d6bef;
    --violet: #9b72f5;
    --teal: #00d4a0;
    --text: #eef2ff;
    --muted: #7c8db5;
    --border: #1f2640;
    --border-l: #2a3356;
    --grad: linear-gradient(135deg, #4f8ef7 0%, #9b72f5 100%);
    --radius: 18px;
    --radius-sm: 10px;
}

/* ─── RESET ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ─── CONTAINER ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* ─── NAVBAR ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 9, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.user-messages {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    font-size: 1.2rem;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--blue);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ─── BUTTONS ─── */
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-l);
    color: var(--text);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--blue);
    background: rgba(79, 142, 247, 0.1);
}

.btn-primary {
    background: var(--grad);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 142, 247, 0.4);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ─── FOOTER ─── */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .logo {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-col h4 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--blue);
}

/* ─── LOADING & ERRORS ─── */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--blue);
}

.error-message,
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

.error-message i,
.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--violet);
}

/* ─── TOAST ─── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast-success {
    border-left: 4px solid #28a745;
}
.toast-success i {
    color: #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}
.toast-error i {
    color: #dc3545;
}

.toast-info {
    border-left: 4px solid var(--blue);
}
.toast-info i {
    color: var(--blue);
}

.toast-hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg2);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .nav-user {
        display: none !important;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}