/**
 * =====================================================
 * Teklif ve Görev Yönetim Sistemi - Ana Stil Dosyası
 * =====================================================
 * Bootstrap 5 üzerine kurulu özel stiller
 */

/* =====================================================
   GENEL AYARLAR
   ===================================================== */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-bg: #4e73df;
    --sidebar-hover: #224abe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
    min-height: 100vh;
}

/* =====================================================
   SIDEBAR (SOL MENÜ) STILLERI
   ===================================================== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #224abe 100%);
    color: white;
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar .components {
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar .components li {
    margin: 0.25rem 0.75rem;
}

.sidebar .components li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sidebar .components li a:hover,
.sidebar .components li.active a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar .components li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.sidebar-footer .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar daraltılmış durum */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .components li a {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .components li a i {
    margin-right: 0 !important;
}

/* =====================================================
   ANA İÇERİK ALANI
   ===================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content main {
    flex: 1;
}

/* Navbar */
.navbar {
    padding: 0.75rem 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color) !important;
}

/* =====================================================
   KART STILLERI
   ===================================================== */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.12);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* İstatistik Kartları */
.stat-card {
    border-left: 4px solid;
    border-radius: 0.5rem;
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
}

/* =====================================================
   TABLO STILLERI
   ===================================================== */
.table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.08);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e3e6f0;
}

.table tbody tr:hover {
    background-color: #f8f9fc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   BUTON STILLERI
   ===================================================== */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-action {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

/* =====================================================
   FORM STILLERI
   ===================================================== */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* =====================================================
   SAYFALAMA STILLERI
   ===================================================== */
.pagination {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #e3e6f0;
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
}

.page-link:hover {
    background-color: #eaecf4;
    border-color: #e3e6f0;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--secondary-color);
}

/* =====================================================
   BILDIRIM (ALERT) STILLERI
   ===================================================== */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* =====================================================
   DURUM BADGELERI
   ===================================================== */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

.badge-pasif {
    background-color: #858796;
    color: white;
}

.badge-beklemede {
    background-color: #f6c23e;
    color: #000;
}

.badge-onaylandi {
    background-color: #1cc88a;
    color: white;
}

.badge-reddedildi {
    background-color: #e74a3b;
    color: white;
}

.badge-devam-ediyor {
    background-color: #36b9cc;
    color: white;
}

.badge-tamamlandi {
    background-color: #1cc88a;
    color: white;
}

/* =====================================================
   GIRIS SAYFASI STILLERI
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #224abe 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h3 {
    margin: 0;
    font-weight: 600;
}

.login-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.login-body {
    padding: 2rem;
}

.login-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* =====================================================
   FOOTER STILLERI
   ===================================================== */
.footer {
    margin-top: auto;
}

/* =====================================================
   RESPONSIVE TASARIM
   ===================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .main-content main {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* =====================================================
   YUKLENIYOR ANIMasyonu
   ===================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3e6f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   EK STILLER
   ===================================================== */
.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.search-box input {
    padding-left: 2.5rem;
}
