/* ============================================
   CH MARİN PAZARYERİ - MAIN STYLESHEET
   Modern, Mobile-First Design
   ============================================ */

:root {
    --primary: #0a3d62;
    --primary-light: #1e5f8a;
    --primary-dark: #062742;
    --secondary: #0097e6;
    --accent: #00b894;
    --accent-dark: #009975;
    --warning: #f39c12;
    --warning-dark: #e67e22;
    --danger: #e74c3c;
    --success: #27ae60;
    --info: #3498db;
    --dark: #1a1a2e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --gradient-primary: linear-gradient(135deg, #0a3d62, #0097e6);
    --gradient-accent: linear-gradient(135deg, #00b894, #0097e6);
    --gradient-warm: linear-gradient(135deg, #f39c12, #e74c3c);
    --gradient-dark: linear-gradient(135deg, #1a1a2e, #16213e);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --shadow-glow: 0 0 30px rgba(0,151,230,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* RTL Support */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }

/* ============================================
   HEADER
   ============================================ */
.main-header {
    background: var(--gradient-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.main-header .navbar {
    padding: 0.75rem 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    font-size: 2rem;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    display: block;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.3);
    padding: 6px 10px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.header-btn {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.btn-primary-custom {
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,184,148,0.4);
    color: #fff;
}

.btn-success-custom {
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 500;
}

.btn-success-custom:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-warning-custom {
    background: var(--warning);
    color: #fff;
    border: none;
    font-weight: 500;
}

.btn-warning-custom:hover {
    background: var(--warning-dark);
    color: #fff;
    transform: translateY(-1px);
}

.lang-dropdown {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-menu .dropdown-item {
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.lang-menu .dropdown-item:hover,
.lang-menu .dropdown-item.active {
    background: var(--gradient-primary);
    color: #fff;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    min-height: calc(100vh - 200px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: var(--gradient-dark);
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,151,230,0.1) 0%, transparent 70%);
    animation: pulse-bg 8s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 25px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FILTERS
   ============================================ */
.filters-bar {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: -20px auto 30px;
    position: relative;
    z-index: 10;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group .form-select,
.filter-group .form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
    transition: var(--transition);
    min-width: 150px;
}

.filter-group .form-select:focus,
.filter-group .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0,151,230,0.15);
}

/* ============================================
   LISTING CARDS
   ============================================ */
.listing-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
    cursor: pointer;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--secondary);
}

.listing-card .listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.listing-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    flex: 1;
}

.listing-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    margin-left: 12px;
}

.listing-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.listing-meta-item {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-meta-item i {
    color: var(--secondary);
    font-size: 0.75rem;
}

.listing-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge-offer {
    background: var(--gradient-warm);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-offer {
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,184,148,0.4);
    color: #fff;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 20px 24px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 16px 24px;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0,151,230,0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-gradient {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: #fff;
}

.btn-gradient-accent {
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-gradient-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,184,148,0.4);
    color: #fff;
}

.btn-gradient-danger {
    background: var(--gradient-warm);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-gradient-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231,76,60,0.4);
    color: #fff;
}

/* ============================================
   GLASS CARDS
   ============================================ */
.glass-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.2);
}

.glass-alert {
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-sm);
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.dashboard-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dashboard-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 16px;
}

.icon-primary { background: var(--gradient-primary); }
.icon-accent { background: var(--gradient-accent); }
.icon-warning { background: var(--gradient-warm); }
.icon-info { background: linear-gradient(135deg, #3498db, #2980b9); }

.dashboard-card .card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.dashboard-card .card-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   SIDEBAR (PANEL LAYOUTS)
   ============================================ */
.panel-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.panel-sidebar {
    width: 260px;
    background: var(--gradient-dark);
    padding: 24px 0;
    flex-shrink: 0;
}

.panel-sidebar .sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-sidebar .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.panel-sidebar .sidebar-menu li a:hover,
.panel-sidebar .sidebar-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--secondary);
}

.panel-sidebar .sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.panel-content {
    flex: 1;
    padding: 30px;
    background: var(--gray-100);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-modern {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-modern thead {
    background: var(--gradient-primary);
    color: #fff;
}

.table-modern thead th {
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.table-modern tbody td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.table-modern tbody tr:hover {
    background: rgba(0,151,230,0.04);
}

.table-modern .action-btns {
    display: flex;
    gap: 6px;
}

.table-modern .action-btns .btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-active { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
.status-accepted { background: #cce5ff; color: #004085; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-completed { background: #d1ecf1; color: #0c5460; }
.status-paid { background: #d4edda; color: #155724; }
.status-escrow { background: #e2e3e5; color: #383d41; }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,151,230,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,184,148,0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.auth-card {
    background: rgba(255,255,255,0.97);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .auth-logo i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .auth-logo h2 {
    font-weight: 800;
    color: var(--primary-dark);
    margin-top: 10px;
    font-size: 1.4rem;
}

.auth-card .auth-logo p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Step indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 0;
}

.step-indicator .step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    position: relative;
}

.step-indicator .step.active {
    color: var(--secondary);
}

.step-indicator .step.completed {
    color: var(--accent);
}

.step-indicator .step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 700;
}

.step-indicator .step.active .step-num {
    background: var(--gradient-primary);
    color: #fff;
}

.step-indicator .step.completed .step-num {
    background: var(--accent);
    color: #fff;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--gray-300);
    align-self: center;
}

.step-connector.active {
    background: var(--secondary);
}

/* Phone input with country code */
.phone-input-group {
    display: flex;
    gap: 8px;
}

.phone-input-group .country-select {
    width: 120px;
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--gradient-dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.footer-brand span {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.footer-desc {
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.footer-links li a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links li a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    border: none;
    color: var(--primary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin: 0 2px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--secondary);
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border: none;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-wave {
    display: flex;
    gap: 4px;
}

.spinner-wave span {
    width: 6px;
    height: 30px;
    background: var(--secondary);
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite;
}

.spinner-wave span:nth-child(2) { animation-delay: 0.1s; }
.spinner-wave span:nth-child(3) { animation-delay: 0.2s; }
.spinner-wave span:nth-child(4) { animation-delay: 0.3s; }
.spinner-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.5); }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h5 {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.empty-state p {
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .panel-layout {
        flex-direction: column;
    }

    .panel-sidebar {
        width: 100%;
        padding: 12px 0;
    }

    .panel-sidebar .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 12px;
        gap: 4px;
    }

    .panel-sidebar .sidebar-menu li a {
        padding: 10px 16px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        font-size: 0.8rem;
    }

    .panel-sidebar .sidebar-menu li a.active {
        border-bottom-color: var(--secondary);
    }

    .panel-content {
        padding: 20px 16px;
    }

    .hero-title { font-size: 1.5rem; }
    .hero-stats { gap: 16px; }
    .stat-number { font-size: 1.4rem; }

    .header-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 24px;
    }

    .filters-bar {
        padding: 14px;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group .form-select,
    .filter-group .form-control {
        min-width: 100%;
    }

    .listing-card {
        padding: 14px;
    }

    .listing-header {
        flex-direction: column;
    }

    .listing-date {
        margin-left: 0;
        margin-top: 4px;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .step-indicator {
        flex-wrap: wrap;
    }

    .step-indicator .step {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}
