/* =========================================================================
   Task Platform - Main Stylesheet
   Modern, premium, dark/light themeable
   ========================================================================= */

:root {
    --tp-primary: #4f46e5;
    --tp-primary-dark: #4338ca;
    --tp-primary-light: #6366f1;
    --tp-secondary: #7c3aed;
    --tp-success: #10b981;
    --tp-warning: #f59e0b;
    --tp-danger: #ef4444;
    --tp-info: #06b6d4;
    --tp-dark: #1e293b;
    --tp-gray-50: #f8fafc;
    --tp-gray-100: #f1f5f9;
    --tp-gray-200: #e2e8f0;
    --tp-gray-300: #cbd5e1;
    --tp-gray-400: #94a3b8;
    --tp-gray-500: #64748b;
    --tp-gray-600: #475569;
    --tp-gray-700: #334155;
    --tp-gray-800: #1e293b;
    --tp-gray-900: #0f172a;
    --tp-radius: 12px;
    --tp-radius-sm: 8px;
    --tp-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --tp-shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --tp-shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
    --tp-shadow-lg: 0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.04);
}

[data-bs-theme="dark"] {
    --tp-gray-50: #1e293b;
    --tp-gray-100: #0f172a;
    --tp-gray-200: #334155;
    --tp-gray-300: #475569;
    --tp-gray-800: #f1f5f9;
    --tp-gray-900: #f8fafc;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--tp-gray-50);
    color: var(--tp-gray-800);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--tp-primary); text-decoration: none; }
a:hover { color: var(--tp-primary-dark); text-decoration: underline; }

.btn { font-weight: 500; border-radius: var(--tp-radius-sm); transition: all .15s ease; }
.btn-primary { background: var(--tp-primary); border-color: var(--tp-primary); }
.btn-primary:hover { background: var(--tp-primary-dark); border-color: var(--tp-primary-dark); transform: translateY(-1px); box-shadow: var(--tp-shadow-md); }

.btn-gradient {
    background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    color: #fff;
    border: none;
}
.btn-gradient:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--tp-shadow-lg); }

/* Navbar */
.navbar { padding-top: .75rem; padding-bottom: .75rem; }
.navbar-brand { font-weight: 800; font-size: 1.25rem; }
.brand-icon {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    color: #fff; border-radius: 10px;
    font-size: 1.1rem;
}
.brand-text {
    background: linear-gradient(90deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--tp-gray-600);
    padding: .5rem 1rem !important;
    border-radius: var(--tp-radius-sm);
    transition: all .15s ease;
}
.navbar-nav .nav-link:hover { color: var(--tp-primary); background: rgba(79, 70, 229, .08); }
.navbar-nav .nav-link.active { color: var(--tp-primary); background: rgba(79, 70, 229, .12); font-weight: 600; }

/* Avatars */
.avatar-sm {
    display: inline-flex; width: 28px; height: 28px;
    align-items: center; justify-content: center;
    overflow: hidden;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
    display: inline-flex; width: 100%; height: 100%;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    color: #fff; font-weight: 600; font-size: 0.875rem;
}
.avatar-md { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: inline-flex; }
.avatar-md img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; display: inline-flex; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* Cards */
.card {
    border: 1px solid var(--tp-gray-200);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow-sm);
    background: #fff;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--tp-gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}
.card-body { padding: 1.25rem; }

/* Stat card */
.stat-card {
    padding: 1.5rem;
    border-radius: var(--tp-radius);
    background: #fff;
    border: 1px solid var(--tp-gray-200);
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--tp-shadow-md); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: var(--tp-gray-500); font-size: .875rem; font-weight: 500; margin-top: .25rem; }
.stat-card .stat-trend {
    font-size: .75rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .25rem;
}
.stat-trend.up { color: var(--tp-success); }
.stat-trend.down { color: var(--tp-danger); }

/* Hero section */
.hero {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: #fff;
    padding: 4rem 0;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 500px; height: 500px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: 1.25rem; opacity: .9; margin-bottom: 1.5rem; }
.hero .btn { padding: .75rem 2rem; font-size: 1.05rem; }

/* Stats section */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    background: #fff;
    border-radius: var(--tp-radius);
    padding: 1.5rem;
    margin-top: -2rem;
    position: relative; z-index: 10;
    box-shadow: var(--tp-shadow-lg);
}
.stats-item .stats-value { font-size: 2rem; font-weight: 800; color: var(--tp-primary); line-height: 1; }
.stats-item .stats-label { color: var(--tp-gray-500); font-size: .875rem; font-weight: 500; }

/* Task card */
.task-card {
    background: #fff;
    border: 1px solid var(--tp-gray-200);
    border-radius: var(--tp-radius);
    padding: 1.25rem;
    transition: all .2s ease;
    height: 100%;
    display: flex; flex-direction: column;
}
.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tp-shadow-lg);
    border-color: var(--tp-primary);
}
.task-card .task-category-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .625rem;
    background: var(--tp-gray-100);
    border-radius: 999px;
    font-size: .75rem; font-weight: 600;
    color: var(--tp-gray-600);
    margin-bottom: .5rem;
}
.task-card.featured {
    border-color: var(--tp-warning);
    background: linear-gradient(to right, rgba(245, 158, 11, .05), #fff);
}
.task-card.urgent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--tp-danger);
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
}
.task-card .task-title {
    font-weight: 600;
    color: var(--tp-gray-800);
    margin-bottom: .5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.task-card .task-meta {
    display: flex; justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tp-gray-100);
    font-size: .875rem;
}
.task-reward {
    color: var(--tp-success);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Badges */
.badge-featured { background: var(--tp-warning); color: #fff; }
.badge-urgent { background: var(--tp-danger); color: #fff; }
.badge-premium { background: var(--tp-secondary); color: #fff; }

/* Status badges */
.status-badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .75rem; font-weight: 600;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-active, .status-approved, .status-paid, .status-completed { background: #d1fae5; color: #065f46; }
.status-rejected, .status-cancelled, .status-banned { background: #fee2e2; color: #991b1b; }
.status-in_review, .status-reviewing { background: #dbeafe; color: #1e40af; }
.status-draft { background: #e5e7eb; color: #374151; }
.status-abandoned { background: #450a0a; color: #fecaca; }
.status-started { background: #ede9fe; color: #5b21b6; }

/* Süreli görev (video izleme) rozeti */
.badge-watch { background: #450a0a; color: #fecaca; }

/* Zorunlu izleme süresi sayacı */
.watch-countdown {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: .05em;
    font-variant-numeric: tabular-nums;
    color: var(--tp-danger, #dc3545);
    line-height: 1.1;
}
.watch-progress { height: 10px; border-radius: 999px; overflow: hidden; }
.watch-progress .progress-bar { background: linear-gradient(90deg, #ef4444, #f97316); }

/* Gömülü görev videosu */
.task-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--tp-radius-sm, .5rem);
    overflow: hidden;
}
.task-video iframe,
.task-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--tp-radius-sm);
    border-color: var(--tp-gray-300);
    padding: .5rem .75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.form-label { font-weight: 500; color: var(--tp-gray-700); margin-bottom: .375rem; }

/* Section divider */
.section-divider {
    text-align: center;
    margin: 4rem 0 2rem;
}
.section-divider h2 {
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--tp-gray-800);
}
.section-divider p {
    color: var(--tp-gray-500);
}

/* How it works */
.how-step {
    text-align: center;
    padding: 1.5rem;
}
.how-step .step-number {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700;
    margin-bottom: 1rem;
}
.how-step h4 { font-weight: 600; margin-bottom: .5rem; }
.how-step p { color: var(--tp-gray-500); }

/* Footer */
.footer { font-size: .875rem; }
.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; }

/* Notification item */
.notification-item:hover { background: var(--tp-gray-100) !important; }

/* Dashboard widgets */
.widget {
    background: #fff;
    border: 1px solid var(--tp-gray-200);
    border-radius: var(--tp-radius);
    padding: 1.25rem;
}
.widget-header {
    font-weight: 600;
    color: var(--tp-gray-700);
    margin-bottom: 1rem;
    display: flex; justify-content: space-between; align-items: center;
}

/* Wallet balance */
.wallet-balance-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    padding: 2rem;
    border-radius: var(--tp-radius);
    position: relative;
    overflow: hidden;
}
.wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
}
.wallet-balance-card .balance-label { opacity: .8; font-size: .875rem; font-weight: 500; }
.wallet-balance-card .balance-value { font-size: 2.5rem; font-weight: 800; line-height: 1; margin: .5rem 0; }
.wallet-balance-card .balance-secondary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }

/* Tables */
.table { color: var(--tp-gray-800); }
.table thead th { background: var(--tp-gray-100); border-bottom: 1px solid var(--tp-gray-200); font-weight: 600; }
.table-hover tbody tr:hover { background: var(--tp-gray-50); }

/* Pagination */
.pagination .page-link { color: var(--tp-primary); border-radius: var(--tp-radius-sm); }
.pagination .page-item.active .page-link { background: var(--tp-primary); border-color: var(--tp-primary); }

/* Utilities */
.text-gradient {
    background: linear-gradient(90deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--tp-gray-400);
}
.empty-state i { font-size: 4rem; }
.empty-state h5 { color: var(--tp-gray-500); margin-top: 1rem; }

/* Progress bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--tp-gray-200);
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--tp-primary) 0%, var(--tp-secondary) 100%);
    border-radius: 4px;
    transition: width .3s ease;
}

/* Badge grid */
.badge-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--tp-gray-50);
    border-radius: var(--tp-radius-sm);
    text-align: center;
    transition: all .2s ease;
}
.badge-item:hover { transform: translateY(-2px); box-shadow: var(--tp-shadow); }
.badge-item .badge-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .5rem;
    color: #fff;
}

/* Message bubbles */
.message-bubble {
    padding: .75rem 1rem;
    border-radius: var(--tp-radius);
    margin-bottom: .5rem;
    max-width: 70%;
}
.message-bubble.sent {
    background: var(--tp-primary);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.message-bubble.received {
    background: var(--tp-gray-100);
    border-bottom-left-radius: 4px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem; height: 1rem;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 2rem 0; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat-card .stat-value { font-size: 1.25rem; }
}

/* RTL support for Arabic */
[dir="rtl"] .navbar-nav .nav-link { text-align: right; }
[dir="rtl"] .message-bubble.sent { margin-left: 0; margin-right: auto; }
[dir="rtl"] .message-bubble.received { border-bottom-left-radius: var(--tp-radius); border-bottom-right-radius: 4px; }

/* =========================================================================
   Missing component styles (audit fixes)
   ========================================================================= */
.hover-shadow { transition: box-shadow .2s ease, transform .2s ease; }
.hover-shadow:hover { box-shadow: var(--tp-shadow-lg) !important; transform: translateY(-3px); }

.hero-card { border: 1px solid var(--tp-gray-100); transition: transform .2s ease; }
.hero-card:hover { transform: translateY(-2px); }

.notification-list { width: 100%; }
.notification-list::-webkit-scrollbar { width: 6px; }
.notification-list::-webkit-scrollbar-thumb { background: var(--tp-gray-300); border-radius: 3px; }

.btn-copy { cursor: pointer; }
.text-purple { color: #7c3aed !important; }
.opacity-90 { opacity: .9; }

@media (min-width: 768px) {
    .col-md-1_5 { flex: 0 0 auto; width: 16.66666667%; }
}

.announcement-bar { font-size: .9rem; letter-spacing: .2px; }
.auth-page .card { border: 0; }
