/* ==========================================
   HOME FIXR - MAIN STYLESHEET
   Final Year Project
   ========================================== */

/* === GLOBAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* === HEADER STYLES === */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
}

/* === NAVIGATION STYLES === */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
    border-radius: 4px;
}

nav ul li a:hover {
    background-color: #34495e;
}

/* === MAIN CONTENT STYLES === */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* === HERO SECTION === */
.hero {
    background-color: white;
    padding: 3rem 0;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* === FEATURES SECTION === */
.features {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.feature-box {
    flex: 1;
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 250px;
}

.feature-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feature-box p {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

/* === BUTTON STYLES === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    margin: 0.5rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.cta-buttons {
    margin-top: 2rem;
}

/* === CARD LAYOUTS === */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.dashboard-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

/* === JOB CARDS === */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.job-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.job-title {
    color: #2c3e50;
    font-size: 1.5rem;
}

.job-category {
    background-color: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.job-description {
    color: #555;
    margin-bottom: 1rem;
}

.job-info p {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.job-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* === BID CARDS === */
.bids-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.bid-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.bid-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.bid-status.pending {
    background-color: #f39c12;
    color: white;
}

.bid-status.accepted {
    background-color: #27ae60;
    color: white;
}

.bid-status.rejected {
    background-color: #e74c3c;
    color: white;
}

.bidder-info p {
    color: #555;
    margin-bottom: 0.5rem;
}

.bid-message {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #ecf0f1;
    border-radius: 5px;
}

.bid-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* === FORM STYLES === */
.form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

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

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* === MESSAGE STYLES === */
.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    display: none;
}

.success-message {
    background-color: #27ae60;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    display: none;
}

/* === CHAT STYLES === */
.chat-container {
    display: flex;
    gap: 1rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 600px;
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 1rem;
}

.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: background-color 0.3s;
}

.conversation-item:hover {
    background-color: #ecf0f1;
}

.conversation-item.active {
    background-color: #3498db;
    color: white;
}

.conversation-item h4 {
    margin-bottom: 0.5rem;
}

.last-message {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.conversation-item.active .last-message,
.conversation-item.active .message-time {
    color: white;
}

.message-time {
    font-size: 0.8rem;
    color: #95a5a6;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    background-color: #ecf0f1;
}

.chat-header h3 {
    color: #2c3e50;
}

.chat-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-content {
    padding: 0.75rem;
    border-radius: 8px;
}

.message.sent .message-content {
    background-color: #3498db;
    color: white;
}

.message.received .message-content {
    background-color: #ecf0f1;
    color: #333;
}

.message-timestamp {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    display: block;
}

.message.sent .message-timestamp {
    color: rgba(255,255,255,0.8);
}

.message.received .message-timestamp {
    color: #7f8c8d;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #ddd;
}

.chat-input-container form {
    display: flex;
    gap: 0.5rem;
}

.chat-input-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* === PROFILE STYLES === */
.profile-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background-color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    font-size: 2.5rem;
    color: white;
    font-weight: bold;
}

.profile-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.user-type-badge {
    background-color: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.verification-status {
    color: #27ae60;
    font-weight: bold;
}

.status-icon {
    font-size: 1.2rem;
}

.profile-details h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.detail-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.detail-row label {
    width: 200px;
    color: #7f8c8d;
    font-weight: bold;
}

.detail-row p {
    flex: 1;
    color: #2c3e50;
}

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.profile-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.profile-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: #7f8c8d;
}

/* === ADMIN STYLES === */
.admin-stats {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.verification-section {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.verification-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.verification-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: #ecf0f1;
    border-radius: 8px;
}

.user-info {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background-color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar .avatar-placeholder {
    font-size: 1.5rem;
}

.user-details h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.user-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.verification-actions {
    display: flex;
    gap: 0.5rem;
}

.users-section {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.users-table {
    margin-top: 1rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #2c3e50;
    color: white;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #ecf0f1;
}

.status-pending {
    color: #f39c12;
    font-weight: bold;
}

/* === MODAL STYLES === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.close-modal:hover {
    color: #2c3e50;
}

/* === ABOUT AND STEPS === */
.about {
    background-color: white;
    padding: 3rem 0;
    margin-top: 2rem;
    border-radius: 8px;
}

.about h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.step h4 {
    color: #3498db;
    margin-bottom: 1rem;
}

.step p {
    color: #7f8c8d;
}

/* === FOOTER STYLES === */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

/* === UTILITY CLASSES === */
.no-jobs-message,
.no-bids-message,
.no-chats-message,
.no-verifications-message {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    background-color: white;
    border-radius: 8px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .features {
        flex-direction: column;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .chat-container {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .verification-card {
        flex-direction: column;
        gap: 1rem;
    }

    .users-table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.5rem;
    }
}
