/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa; /* Match main-content background for full-width white/grey look */
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-pic-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 150px;
    margin-top: 10px;
    display: none;
    z-index: 1000;
}

.profile-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-link {
    background: none;
    color: #667eea;
    padding: 8px 16px;
}

.btn-link:hover {
    background: #f5f5f5;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

/* Dashboard */
.dashboard-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section {
    margin-bottom: 40px;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 22px;
}

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

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    min-width: 250px;
}

.search-form input:focus {
    outline: none;
    border-color: #667eea;
}

/* Vendor Form */
.vendor-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

/* Vendors Grid */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vendor-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.vendor-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.vendor-photo {
    text-align: center;
    margin-bottom: 15px;
}

.vendor-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.vendor-info h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 18px;
}

.vendor-info .company {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.vendor-info .contact {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.vendor-info .notes {
    font-size: 13px;
    color: #777;
    font-style: italic;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
}

.vendor-info .date-added {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.vendor-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Profile Page */
.profile-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .profile-section {
        grid-template-columns: 1fr;
    }
}

.profile-pic-section {
    text-align: center;
}

.profile-pic-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    margin-bottom: 20px;
}

.profile-pic-form {
    margin-top: 15px;
}

.profile-pic-form input[type="file"] {
    margin-bottom: 10px;
}

.profile-info {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.profile-info h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.profile-info p {
    margin-bottom: 10px;
    color: #555;
}

/* Email Form */
.email-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .vendors-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input {
        flex: 1;
        min-width: 0;
    }
}

