/* Network Container */
.network-container {
    display: flex;
    height: 100vh;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Sidebar */
.network-sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 30px;
}

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

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    padding: 0 20px 12px;
    margin: 0 0 12px;
    border-bottom: 2px solid #0066cc;
    color: #333;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: #0066cc;
}

.sidebar-link.active {
    background: #e8f2ff;
    color: #0066cc;
    border-left-color: #0066cc;
}

.sidebar-link .icon {
    font-size: 16px;
}

/* Main Content */
.network-main {
    flex: 1;
    overflow-y: auto;
    background: #f5f5f5;
}

.network-section {
    display: none;
    padding: 30px;
}

.network-section.active {
    display: block;
}

.section-header {
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Company Profile Form */
.company-profile-form {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 30px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.form-section:first-child {
    border-top: none;
    padding-top: 0;
}

.section-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
}

.subtitle-note {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    font-style: italic;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.flex-1 {
    flex: 1;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.form-label.required::after {
    content: " *";
    color: #d32f2f;
}

.form-input,
.form-textarea {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.form-note {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 8px;
}

.country-code {
    width: 90px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.phone-input-group .form-input {
    flex: 1;
}

/* Checkbox Group */
.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Info Message */
.info-message {
    background: #fff9e6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
}

.info-message p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.info-message p:last-child {
    margin-bottom: 0;
}

.info-message strong {
    color: #333;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background: #0052a3;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Placeholder Content */
.placeholder-content {
    background: #fff;
    border-radius: 8px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.placeholder-content p {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

.placeholder-content p:first-child {
    font-size: 20px;
    color: #333;
    font-weight: 500;
}

/* Locate Affiliates Section */
.section-description {
    font-size: 14px;
    color: #666;
    margin: 8px 0 0;
}

.affiliates-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-bar {
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Country Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 30px;
    margin-bottom: 30px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
    transition: all 0.2s;
}

.country-item:hover {
    background: #f0f7ff;
    border-color: #0066cc;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.country-item.hidden {
    display: none;
}

.country-flag {
    font-size: 28px;
    line-height: 1;
    min-width: 32px;
    text-align: center;
}

.country-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    text-align: right;
    transition: color 0.2s;
}

.country-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Regions Section */
.regions-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.regions-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
}

.regions-section .country-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 0;
}

/* Network Requests Section */
.requests-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.requests-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.requests-column {
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.requests-header {
    padding-bottom: 15px;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 20px;
}

.requests-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.requests-list {
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
    padding-right: 8px;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.request-item:hover {
    background: #f0f7ff;
    border-color: #0066cc;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.request-info {
    flex: 1;
    min-width: 0;
}

.request-company {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-date {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.request-status {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 10px;
}

.status-accepted {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.page-btn.page-active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.page-btn.page-active:hover {
    background: #0052a3;
    border-color: #0052a3;
}

/* Scrollbar for requests list */
.requests-list::-webkit-scrollbar {
    width: 8px;
}

.requests-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.requests-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.requests-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Partner Trips Section */
.partner-trips-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-options {
    margin-bottom: 25px;
}

.search-links {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.search-link {
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.search-link:hover {
    color: #0066cc;
}

.search-link.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Trip Search Form */
.trip-search-form {
    margin-bottom: 30px;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.filter-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.btn-search {
    padding: 9px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-search:hover {
    background: #0052a3;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-search:active {
    transform: translateY(1px);
}

/* Trips Table */
.trips-table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.trips-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.trips-table thead {
    background: #f5f5f5;
}

.trips-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.trips-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.trips-table tbody tr:hover {
    background: #f8f9fa;
}

.trips-table tbody tr:last-child td {
    border-bottom: none;
}

.no-results {
    background: transparent !important;
}

.no-results-message {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    opacity: 0.3;
}

.no-results-message p {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin: 0 0 8px;
}

.no-results-message small {
    font-size: 13px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .form-layout {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .form-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-right {
        order: 2;
    }
}

@media (max-width: 1024px) {
    .country-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .requests-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .network-container {
        flex-direction: column;
    }
    
    .network-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 200px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .sidebar-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-link.active {
        border-left: none;
        border-bottom-color: #0066cc;
    }
    
    .network-main {
        padding: 15px;
    }
    
    .company-profile-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .country-code {
        width: 100%;
    }
    
    .country-grid {
        grid-template-columns: 1fr;
    }
    
    .regions-section .country-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .search-links {
        flex-wrap: wrap;
    }
    
    .trips-table {
        font-size: 12px;
    }
    
    .trips-table th,
    .trips-table td {
        padding: 8px 10px;
    }
}

/* Scrollbar Styling */
.network-main::-webkit-scrollbar {
    width: 10px;
}

.network-main::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.network-main::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.network-main::-webkit-scrollbar-thumb:hover {
    background: #999;
}