/* ===========================================
   ORTAK CSS - Minimal Modern Design System
   =========================================== */

/* CSS Variables - Modern Color Palette */
:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --primary-blue-light: #60a5fa;
    --primary-rgb: 59, 130, 246;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-color-light: #f3f4f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --header-height: 70px;
    --sidebar-width: 250px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--text-primary);
}

/* Top Header Stilleri */
.top-header {
    background: var(--surface);
    color: var(--text-primary);
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    gap: 12px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--primary-blue);
}

.logo i {
    color: var(--primary-blue);
    font-size: 28px;
}

.user-section {
    position: relative;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
    border: 1px solid var(--border-color-light);
    background: var(--background);
}

.user-info:hover {
    background-color: var(--border-color-light);
}

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

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    background: var(--background);
}

/* Content Area */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    background-color: var(--background);
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease, padding 0.2s ease;
}

.content-area.expanded {
    margin-left: 0;
}

/* Content Wrapper - Modern Container */
.content-area > * {
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar Stilleri */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    box-shadow: var(--shadow);
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: left 0.3s ease;
    border-right: 1px solid var(--border-color-light);
}

.sidebar.collapsed {
    left: calc(-1 * var(--sidebar-width));
}

.menu-section {
    padding: 20px 0;
}

.menu-title {
    padding: 0 20px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: var(--background);
    border-left-color: var(--primary-blue);
    color: var(--primary-blue);
}

.menu-item.active {
    background-color: #eff6ff;
    border-left-color: var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 600;
}

.menu-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
    font-size: 16px;
}

.menu-item span {
    display: inline-block;
}

.menu-item:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: -2px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0;
    height: 44px;
    width: 44px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--background);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.sidebar-open {
    overflow: hidden;
}

/* Card Stilleri */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color-light);
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--surface);
    color: var(--text-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 18px;
}

.card-body {
    padding: 24px;
}

/* Button Stilleri */
.btn {
    border-radius: var(--radius);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-info:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

/* Form Stilleri */
.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

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

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Table Stilleri */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 12px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* Badge Stilleri */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Pagination Stilleri */
.pagination {
    margin: 0;
}

.pagination .page-link {
    border-radius: var(--radius-sm);
    margin: 0 4px;
    border: 1px solid var(--border-color);
    color: var(--primary-blue);
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--background);
    color: var(--primary-blue-dark);
    border-color: var(--primary-blue);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-tertiary);
    background: var(--surface);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Stilleri */
.alert {
    border-radius: 8px;
    border: none;
}

/* Responsive tasarım */
@media (max-width: 1080px) {
    .content-area {
        padding: 26px;
    }

    .header-content {
        padding: 0 8px;
    }
}

@media (max-width: 900px) {
    .content-area {
        padding: 20px;
    }

    .user-info {
        padding: 8px 10px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 62px;
        --sidebar-width: min(86vw, 320px);
    }

    .main-container {
        margin-top: var(--header-height);
        flex-direction: column;
    }

    .top-header {
        padding: 0 14px;
        box-shadow: var(--shadow-md);
    }

    .header-content {
        padding: 0;
        gap: 10px;
    }

    .logo {
        font-size: 18px;
    }

    .logo i {
        font-size: 22px;
    }

    .user-name {
        display: none;
    }

    .user-info {
        padding: 8px 10px;
        gap: 8px;
    }

    .content-area {
        margin-left: 0;
        padding: 18px 16px 24px;
        min-height: calc(100vh - var(--header-height));
    }

    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: calc(-1 * var(--sidebar-width));
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        border-radius: 0 16px 16px 0;
        border-right: none;
        padding-bottom: 24px;
    }

    .sidebar:not(.collapsed) {
        left: 0 !important;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 42px;
        width: 42px;
        padding: 0;
        margin-right: 10px;
        border-radius: 12px;
    }

    .menu-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .card-header {
        padding: 15px;
    }

    .card-body {
        padding: 15px;
    }

    .card-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0 12px;
    }

    .content-area {
        padding: 14px 12px 20px;
    }

    .sidebar-toggle {
        height: 38px;
        width: 38px;
    }
}

/* Scrollbar Stilleri */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Modern Utility Classes */
.bg-surface {
    background-color: var(--surface) !important;
}

.bg-background {
    background-color: var(--background) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-blue {
    color: var(--primary-blue) !important;
}

.border-light {
    border-color: var(--border-color-light) !important;
}

.rounded {
    border-radius: var(--radius) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}
