/* ProSupply Procurement System - Styles (HTMLDemo Uyumlu) */

:root {
    --primary: #3a7b91;
    --primary-light: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #64748b;
    --success: #059669;
    --success-light: #10b981;
    --warning: #d97706;
    --warning-light: #f59e0b;
    --danger: #dc2626;
    --danger-light: #ef4444;
    --info: #0891b2;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

/* =====================
   LOGIN PAGE
   ===================== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.login-logo p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 0;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--gray-900);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 5px 0 0 0;
}

.sidebar-menu {
    padding: 15px 0;
    flex: 1;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    gap: 0;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--primary-light);
}

.sidebar-menu .nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-menu .nav-link span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar collapsible sub-menus */
.sidebar-menu .collapse .nav-link {
    padding: 8px 20px 8px 56px;
    font-size: 0.875rem;
    border-left: none;
    border-radius: 0;
}

.sidebar-menu .collapse .nav-link:hover,
.sidebar-menu .collapse .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* =====================
   MAIN CONTENT
   ===================== */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

/* =====================
   TOP NAVBAR (inside main content)
   ===================== */
.top-navbar {
    background: white;
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-navbar h4 {
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    font-size: 1.15rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* =====================
   CARDS
   ===================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h5 {
    font-weight: 600;
    color: var(--gray-800) !important;
    margin: 0;
    font-size: 1rem;
}

.card-body {
    padding: 25px;
}

/* =====================
   STATS CARDS
   ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #dbeafe;
    color: var(--primary);
}

.stat-icon.green {
    background: #d1fae5;
    color: var(--success);
}

.stat-icon.orange {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.red {
    background: #fee2e2;
    color: var(--danger);
}

.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-icon.cyan {
    background: #cffafe;
    color: var(--info);
}

.stat-icon.primary {
    background: #dbeafe;
    color: var(--primary);
}

.stat-icon.success {
    background: #d1fae5;
    color: var(--success);
}

.stat-icon.warning {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.danger {
    background: #fee2e2;
    color: var(--danger);
}

.stat-icon.gold {
    background: #fef3c7;
    color: var(--warning);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin: 0;
}

/* =====================
   TABLES
   ===================== */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    /* background:#3a7b91linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);*/
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 16px;
    border: none;
    white-space: nowrap;
}

.table thead tr:first-child th:first-child {
    border-radius: 8px 0 0 0;
}

.table thead tr:first-child th:last-child {
    border-radius: 0 8px 0 0;
}

/* Table container için overflow — dropdown'ların görünmesi için visible bırakılmalı */
.card .table-responsive {
    border-radius: 8px;
    /* overflow:hidden kaldırıldı - dropdown menüler kesilmesin */
}
.table-container {
    border-radius: 8px;
    overflow: hidden;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* =====================
   STATUS BADGES
   ===================== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-waiting {
    background: #dbeafe;
    color: #1e40af;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-process {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

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

.btn-success:hover {
    background: #047857;
    border-color: #047857;
    color: white;
}

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

.btn-warning:hover {
    background: #b45309;
    border-color: #b45309;
    color: white;
}

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

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

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

.btn-outline-secondary {
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

.btn-outline-success {
    border: 1px solid var(--success);
    color: var(--success);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--success);
    color: white;
}

.btn-outline-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-outline-warning {
    border: 1px solid var(--warning);
    color: var(--warning);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* =====================
   FORMS
   ===================== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.form-control-sm,
.form-select-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* =====================
   APPROVAL FLOW
   ===================== */
.approval-flow {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.approval-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--gray-300);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.approval-card.completed {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.approval-card.pending {
    border-left-color: var(--warning);
    background: #fffbeb;
}

.approval-card.rejected {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.approval-card.waiting {
    border-left-color: var(--gray-300);
    background: var(--gray-50);
    opacity: 0.7;
}

.approval-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.approval-card.completed .approval-icon {
    background: var(--success);
    color: white;
}

.approval-card.pending .approval-icon {
    background: var(--warning);
    color: white;
}

.approval-card.rejected .approval-icon {
    background: var(--danger);
    color: white;
}

.approval-card.waiting .approval-icon {
    background: var(--gray-300);
    color: var(--gray-500);
}

.approval-info {
    flex: 1;
}

.approval-info h6 {
    font-weight: 600;
    margin-bottom: 3px;
}

.approval-info p {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 0;
}

/* =====================
   WIZARD STEPS
   ===================== */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.step-item.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.step-title {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    font-weight: 500;
}

.step-item.active .step-title {
    color: var(--primary);
    font-weight: 600;
}

/* =====================
   TIMELINE
   ===================== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid white;
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item.active::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* =====================
   BUDGET PROGRESS
   ===================== */
.budget-bar {
    height: 30px;
    background: var(--gray-200);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.budget-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--success-light));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 0.5s ease;
}

.budget-fill.warning {
    background: linear-gradient(90deg, var(--warning), var(--warning-light));
}

.budget-fill.danger {
    background: linear-gradient(90deg, var(--danger), var(--danger-light));
}

/* =====================
   DOCUMENT PREVIEW
   ===================== */
.document-preview {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.document-header {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 30px;
}

.document-header h3 {
    font-weight: 700;
    color: var(--gray-800);
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* =====================
   CUSTOM SCROLLBAR
   ===================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 25px;
    }
}

/* =====================
   PRINT
   ===================== */
@media print {

    .sidebar,
    .top-navbar,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}