/**
 * =============================================================================
 * ETHICAL PARTNERING - Custom Stylesheet
 * =============================================================================
 */

/* =============================================================================
   CSS Variables
   ============================================================================= */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd6;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 65px;
    --footer-height: 50px;
    
    --body-bg: #f4f6f9;
    --card-bg: #ffffff;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #667eea;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--body-bg);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =============================================================================
   Layout - Wrapper
   ============================================================================= */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Mobile Header Fix */
@media (max-width: 991.98px) {
    body {
        padding-top: 60px;
    }
    
    .navbar.sticky-top,
    .navbar.fixed-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }
    
    /* Anasayfa hero section fix */
    .hero-section,
    section:first-of-type {
        margin-top: 0;
    }
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.content-wrapper {
    flex: 1;
    padding-bottom: var(--footer-height);
}

/* =============================================================================
   Sidebar
   ============================================================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand .brand-icon {
    font-size: 28px;
    margin-right: 10px;
    color: var(--primary-color);
}

.sidebar-brand .brand-text {
    color: #fff;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-toggle:hover {
    color: #fff;
}

/* Sidebar Company Info */
.sidebar-company {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.company-avatar {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.company-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.company-info {
    overflow: hidden;
}

.company-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-status {
    font-size: 11px;
    display: flex;
    align-items: center;
}

.company-status.verified {
    color: var(--success-color);
}

.company-status.pending {
    color: var(--warning-color);
}

.company-status i {
    margin-right: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-text);
    opacity: 0.6;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    font-size: 14px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-nav .nav-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav .badge {
    font-size: 10px;
    padding: 4px 8px;
}

/* Sidebar Banner */
.sidebar-banner {
    margin: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.sidebar-banner .banner-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.sidebar-banner h6 {
    color: #fff;
    margin-bottom: 5px;
}

.sidebar-banner p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-around;
}

.sidebar-footer .footer-link {
    color: var(--sidebar-text);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-footer .footer-link i {
    font-size: 18px;
    margin-bottom: 4px;
}

.sidebar-footer .footer-link:hover {
    color: #fff;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =============================================================================
   Header
   ============================================================================= */
.main-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--box-shadow);
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header Search */
.header-search {
    min-width: 300px;
}

.header-search .input-group {
    background: var(--body-bg);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.header-search .input-group:focus-within {
    border-color: var(--primary-color);
    background: #fff;
}

.header-search .input-group-text {
    border: none;
    padding-left: 15px;
}

.header-search .form-control {
    border: none;
    background: transparent;
    padding-left: 0;
}

.header-search .form-control:focus {
    box-shadow: none;
}

/* Header Icons */
.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.header-icon-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

/* User Menu */
.user-menu-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    transition: var(--transition);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 10px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-sm {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    text-align: left;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* Header Dropdowns */
.notification-dropdown {
    width: 360px;
    padding: 0;
}

.dropdown-header {
    padding: 15px 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.dropdown-footer a {
    font-size: 13px;
    font-weight: 500;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--body-bg);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-icon.new_match {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.notification-icon.meeting_reminder,
.notification-icon.meeting_request {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.notification-icon.message {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.notification-icon.system {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-secondary);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* =============================================================================
   Footer
   ============================================================================= */
.main-footer {
    height: var(--footer-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    margin-top: auto;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--box-shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* =============================================================================
   Cards
   ============================================================================= */
.card {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card .card-body {
    padding: 24px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* =============================================================================
   Quick Actions
   ============================================================================= */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: var(--body-bg);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    color: var(--text-primary);
}

.quick-action-card:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

.quick-action-card:hover .quick-action-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 12px;
}

.quick-action-card span {
    font-weight: 500;
    font-size: 13px;
}

/* =============================================================================
   Match Card
   ============================================================================= */
.match-card {
    padding: 15px;
    background: var(--body-bg);
    border-radius: 12px;
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--box-shadow);
}

.match-avatar {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    overflow: hidden;
}

.match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================================================
   Meeting Item
   ============================================================================= */
.meeting-item {
    padding: 12px;
    background: var(--body-bg);
    border-radius: 10px;
}

.meeting-date {
    width: 50px;
    padding: 8px;
    background: var(--primary-color);
    border-radius: 8px;
    color: #fff;
}

.meeting-date .day {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.meeting-date .month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
}

/* =============================================================================
   Notification Dot
   ============================================================================= */
.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-dot.new_match { background: var(--success-color); }
.notification-dot.meeting_reminder { background: var(--info-color); }
.notification-dot.meeting_request { background: var(--warning-color); }
.notification-dot.message { background: var(--primary-color); }
.notification-dot.system { background: var(--text-muted); }

/* =============================================================================
   Tables
   ============================================================================= */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
    padding: 12px 16px;
}

/* =============================================================================
   Forms
   ============================================================================= */
.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--border-color);
    padding: 10px 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

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

.form-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* =============================================================================
   Badges
   ============================================================================= */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
}

/* =============================================================================
   Gradient Backgrounds
   ============================================================================= */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

/* =============================================================================
   DataTables Customization
   ============================================================================= */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 30px 8px 15px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
}

/* =============================================================================
   Select2 Customization
   ============================================================================= */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 8px;
    border-color: var(--border-color);
    min-height: 42px;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-search {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .header-container {
        padding: 0 15px;
    }
    
    .content-wrapper .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .stat-card .card-body {
        padding: 16px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */
@media print {
    .sidebar,
    .main-header,
    .main-footer,
    .back-to-top {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}
