/* ===== Professional Tenders Page Styles ===== */

.tenders-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.tenders-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #006400;
    padding-bottom: 30px;
}

.tenders-header h1 {
    font-size: 2.5rem;
    color: #006400;
    margin: 0 0 10px 0;
}

.tenders-header p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Search & Filter Bar */
.tenders-search-bar {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.search-box i {
    color: #999;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #006400;
    box-shadow: 0 0 5px rgba(0,100,0,0.2);
}

/* Quick Stats */
.tender-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #006400;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #006400;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Tenders List */
.tenders-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    overflow: hidden;
}

.list-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.badge-active {
    background: #4CAF50;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tender Item */
.tender-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 25px;
}

.tender-item:last-child {
    border-bottom: none;
}

.tender-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.tender-info {
    flex: 1;
}

.tender-number {
    font-size: 0.85rem;
    color: #006400;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.tender-item h3 {
    margin: 10px 0;
    font-size: 1.3rem;
    color: #333;
    line-height: 1.4;
}

.tender-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.meta-item {
    font-size: 0.9rem;
    color: #666;
}

.meta-item i {
    color: #006400;
    margin-right: 5px;
}

.tender-status-badge {
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.open {
    background: #4CAF50;
    color: white;
}

.badge.closed {
    background: #999;
    color: white;
}

/* Tender Item Details */
.tender-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-col label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.detail-col span {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.deadline {
    color: #d32f2f;
    font-weight: 600;
}

.time-remaining {
    color: #ff9800;
    font-weight: 600;
}

/* Tender Item Footer */
.tender-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tender-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: #006400;
    color: white;
}

.btn-primary:hover {
    background: #008000;
    box-shadow: 0 4px 12px rgba(0,100,0,0.3);
}

.btn-secondary {
    background: white;
    color: #006400;
    border: 2px solid #006400;
}

.btn-secondary:hover {
    background: #f0f8f0;
}

.btn-download {
    background: #006400;
    color: white;
}

.btn-download:hover {
    background: #008000;
}

.urgent-badge {
    background: #fff3cd;
    color: #856404;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse-warning 1.5s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Documents Section */
.documents-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.documents-section h2 {
    color: #006400;
    margin-top: 0;
    margin-bottom: 10px;
}

.documents-section p {
    color: #666;
    margin-bottom: 20px;
}

.document-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.document-item:hover {
    border-color: #006400;
    box-shadow: 0 4px 12px rgba(0,100,0,0.1);
}

.document-icon {
    font-size: 3rem;
    color: #d32f2f;
}

.document-info {
    flex: 1;
}

.document-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.document-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Admin Login Modal */
.admin-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.modal-content h2 {
    color: #006400;
    margin: 0 0 30px 0;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label {
    font-weight: 600;
    color: #333;
}

.login-form input[type="password"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: #006400;
    box-shadow: 0 0 5px rgba(0, 100, 0, 0.2);
}

.login-form .btn {
    padding: 12px;
}

.login-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    display: none;
    text-align: center;
}

.login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

/* Details Modal */
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 999;
    overflow-y: auto;
    padding: 20px;
}

.details-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #333;
}

.details-content h2 {
    color: #006400;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-box {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-box label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.detail-box p {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #006400;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.detail-section p {
    color: #555;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.detail-section ul,
.detail-section ol {
    color: #555;
    line-height: 1.8;
    margin: 0;
    padding-left: 20px;
}

.detail-section li {
    margin-bottom: 8px;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.timeline-item {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #006400;
    border-radius: 4px;
}

.timeline-item strong {
    display: block;
    color: #006400;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.timeline-item p {
    margin: 0;
    color: #333;
}

.details-content .btn {
    margin-top: 10px;
    margin-right: 10px;
}

.upload-section h2 {
    color: #006400;
    margin-top: 0;
}

.upload-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #006400;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
}

.upload-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    display: none;
}

.upload-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.upload-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Contact Section */
.contact-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.contact-section h2 {
    color: #006400;
    margin-top: 0;
    margin-bottom: 25px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.contact-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #006400;
}

.contact-card h4 {
    color: #006400;
    margin: 0 0 15px 0;
}

.contact-card p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Guidelines */
.guidelines-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.guidelines-section h2 {
    color: #006400;
    text-align: center;
    margin-bottom: 30px;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.guideline-card {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 6px;
    border-top: 4px solid #006400;
}

.guideline-card i {
    font-size: 2.5rem;
    color: #006400;
    margin-bottom: 15px;
    display: block;
}

.guideline-card h3 {
    color: #333;
    margin: 0 0 15px 0;
}

.guideline-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guideline-card li {
    padding: 8px 0;
    color: #666;
    font-size: 0.95rem;
    border-bottom: 1px solid #e0e0e0;
}

.guideline-card li:last-child {
    border-bottom: none;
}

.guideline-card li::before {
    content: "✓ ";
    color: #006400;
    font-weight: bold;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .tenders-header h1 {
        font-size: 1.8rem;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .tender-item-header {
        flex-direction: column;
    }

    .tender-item-details {
        grid-template-columns: 1fr 1fr;
    }

    .tender-item-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .tender-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .document-item {
        flex-direction: column;
        text-align: center;
    }

    .upload-form {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}