/* ========================================
   TRUFFLELINK - EARTH TONE DESIGN SYSTEM
   Professional, Natural, Sophisticated
   ======================================== */

/* ===== COLOR PALETTE ===== */
:root {
    --truffle-brown: #C49A6C;        /* Truffle gold accent */
    --truffle-gold: #D1A76F;         /* Fine gold for icons */
    --truffle-dark: #2B1D12;         /* Dark brown text */
    --truffle-medium: #3B2A1A;       /* Medium brown text */
    --cream-bg: #FAF8F3;             /* Primary background - LIGHT */
    --off-white: #FFFFFF;            /* Pure white for cards */
    --pure-white: #FFFFFF;           /* Pure white */
    --light-border: #E8DCC8;         /* Light border */
    --text-primary: #2B1D12;         /* Dark brown text */
    --text-secondary: #3B2A1A;       /* Medium brown text */
    --hover-color: #B88650;          /* Hover state */
    --header-bg: #1E140C;            /* Dark header only */
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--cream-bg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ===== HEADER ===== */
.site-header {
    background: var(--pure-white);
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative;
    min-height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--truffle-brown);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--truffle-gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: space-between;
}

.main-nav {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--truffle-brown);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--truffle-brown);
    transition: width 0.2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--off-white);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--light-border);
    font-size: 14px;
}

.header-btn:hover {
    background: var(--truffle-brown);
    color: var(--pure-white);
    border-color: var(--truffle-brown);
    transform: translateY(-1px);
}

.header-btn.primary {
    background: var(--truffle-brown);
    color: var(--pure-white);
    border-color: var(--truffle-brown);
}

.header-btn.primary:hover {
    background: var(--truffle-dark);
    border-color: var(--truffle-dark);
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--off-white);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 44px;
    box-sizing: border-box;
    font-size: 14px;
    color: var(--text-secondary);
}

.user-btn:hover {
    background: var(--cream-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--truffle-brown);
    color: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--pure-white);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(61, 40, 23, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--off-white);
    color: var(--truffle-brown);
}

.dropdown-divider {
    height: 1px;
    background: var(--light-border);
    margin: 8px 0;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 0;
    margin: 0;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--off-white);
    border-top: 1px solid var(--light-border);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
    align-items: start;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--truffle-brown);
    text-align: left;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--truffle-medium);
    text-align: left;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--truffle-brown);
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--pure-white);
    color: var(--truffle-medium);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--light-border);
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--truffle-brown);
    color: var(--pure-white);
    border-color: var(--truffle-brown);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--light-border);
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ===== COMPONENTS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--off-white);
    color: var(--text-secondary);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(61, 40, 23, 0.15);
}

.btn-primary {
    background: var(--truffle-brown);
    color: var(--pure-white);
    border-color: var(--truffle-brown);
}

.btn-primary:hover {
    background: var(--truffle-dark);
    border-color: var(--truffle-dark);
}

.btn-secondary {
    background: var(--pure-white);
    color: var(--text-secondary);
    border-color: var(--light-border);
}

.btn-secondary:hover {
    background: var(--off-white);
    border-color: var(--truffle-gold);
}

.card {
    background: var(--pure-white);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.card-header {
    padding: 20px;
    background: var(--off-white);
    border-bottom: 1px solid var(--light-border);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    background: var(--off-white);
    border-top: 1px solid var(--light-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--light-border);
    border-radius: 6px;
    transition: border-color 0.2s ease;
    background: var(--pure-white);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--truffle-brown);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.15);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.table th {
    background: var(--off-white);
    font-weight: 600;
    color: var(--truffle-dark);
}

.table tbody tr:hover {
    background: var(--off-white);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.badge-primary {
    background: var(--truffle-brown);
    color: var(--pure-white);
}

.badge-success {
    background: #5a7a4d;
    color: var(--pure-white);
}

.badge-warning {
    background: var(--truffle-gold);
    color: var(--truffle-dark);
}

.badge-danger {
    background: #a0522d;
    color: var(--pure-white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-btn span {
        display: none;
    }
    
    .user-btn span {
        display: none;
    }
    
    .logo {
        order: -1;
        font-size: 24px;
    }
    
    .dropdown {
        right: 0;
        left: auto;
        min-width: 180px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 15px 0;
    }
    
    .main-content {
        padding: 30px 0;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

/* ===== PRINT ===== */
@media print {
    .top-bar,
    .site-header,
    .site-footer {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
}
