:root {
    --primary-color: #0f172a; /* Logo ile uyumlu koyu lacivert */
    --primary-dark: #1e293b;
    --primary-light: #334155;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-top: 70px; /* Navbar yüksekliği için padding */
}

/* Navbar - Profesyonel Tasarım - Fixed */
.navbar-custom {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1.5rem;
    min-height: 70px;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

.navbar-brand-wrapper {
    display: flex;
    align-items: center;
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    transition: opacity 0.3s;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-logo {
    width: 160px;
    height: 62px;
    object-fit: contain;
    filter: brightness(1.05) contrast(1.05);
    transition: transform 0.3s;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.02);
}

/* User Menu - Profesyonel Tasarım */
.user-menu {
    position: relative;
}

.user-dropdown-menu {
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.user-dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.user-dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    width: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.5rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-greeting {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1;
}

.user-name {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.2;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.625rem;
    border-radius: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
    font-size: 1.25rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}


/* Login Button */
.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff !important;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-login i {
    font-size: 1rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

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

.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-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

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

/* Cards */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Dashboard kartları için eşit yükseklik */
.row.mt-4 .col-md-6:first-child .card {
    min-height: 400px;
}

.dashboard-card-equal {
    min-height: 400px;
}

.card-header {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Tables */
.table {
    background-color: #ffffff;
}

.table thead {
    background-color: var(--primary-color);
    color: #ffffff;
}

.table thead th {
    border-bottom: 2px solid var(--primary-dark);
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

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

/* Alerts */
.alert {
    border-radius: 6px;
    border: none;
}

.alert-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}


/* Sidebar - Navbar ile aynı renk (Koyu Lacivert) - Fixed */
.sidebar {
    background-color: var(--primary-color) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: calc(100vh - 70px);
    max-height: calc(100vh - 70px);
    padding: 0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
    position: fixed;
    top: 70px;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
}

/* Sidebar scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar içeriği için padding */
.sidebar .position-sticky {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #ffffff !important;
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: #ffffff;
    color: #ffffff !important;
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    color: #ffffff;
}

.sidebar .nav-link[data-bs-toggle="collapse"] {
    cursor: pointer;
}

.sidebar .nav-link[data-bs-toggle="collapse"]:after {
    content: '\25BC';
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s;
    color: #ffffff;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]:after {
    transform: rotate(180deg);
}

.sidebar .collapse .nav-link {
    padding-left: 2.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar .collapse .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.sidebar hr.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 0.5rem 1.5rem;
}

@media (max-width: 767.98px) {
    .navbar-custom {
        padding: 0.5rem 1rem;
        min-height: 60px;
    }

    .user-info {
        padding: 0.375rem 0.75rem;
        gap: 0.5rem;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }

    .user-details {
        display: none;
    }

    .navbar-logo {
        width: 120px;
        height: auto;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
        z-index: 1000;
        transition: left 0.3s;
        overflow-y: auto;
        overflow-x: hidden;
        background-color: var(--primary-color) !important;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar .nav-link {
        padding: 1rem 1.5rem;
        color: #ffffff !important;
    }
}

/* Page Header */
.page-header {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

/* Search and Filter Box */
.search-box {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Status Badges */
.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

/* Loading Spinner */
.spinner-border-primary {
    color: var(--primary-color);
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(59, 130, 246, 0.5);
}

/* Main content area */
main[role="main"] {
    padding-top: 1rem;
    min-height: calc(100vh - 70px);
    margin-left: 0;
}

/* Container fluid düzeltmesi - fixed navbar ve sidebar için */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
}

.container-fluid > .row {
    margin-left: 0;
    margin-right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    main[role="main"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-left: 0 !important;
    }
    
    body {
        padding-top: 60px;
    }
    
    .navbar-custom {
        height: 60px;
        min-height: 60px;
    }
    
    .sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
    }
}

/* Tooltip for required fields */
.form-label .required-info {
    color: var(--primary-color);
    cursor: help;
    margin-left: 3px;
    font-size: 0.9em;
}

.form-label .required-info:hover {
    color: var(--primary-dark);
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Print styles */
@media print {
    .navbar, .footer, .action-buttons, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
