:root {
    /* Premium Color Palette */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4895ef;
    --secondary: #3f37c9;

    /* State Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Neutrals */
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Backgrounds */
    --bg-body: #f3f6f9;
    /* Light airy background */
    --bg-card: #ffffff;
    --bg-sidebar: #1e1e2d;
    /* Professional dark sidebar */

    /* Text */
    --text-main: #3F4254;
    --text-muted: #B5B5C3;
    --text-light: #ffffff;

    /* Borders & Radius */
    --border-color: #ebedf3;
    --border-radius: 0.65rem;
    --border-radius-sm: 0.45rem;

    /* Shadows */
    --shadow-sm: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.02);
    --shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: all 0.25s ease;

    /* Spacing - Compact */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    font-size: 14px;
}

/* Slightly smaller base font for compactness */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Layout Structure */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    color: #ffffff;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: 70px;
    /* Biraz yüksekliği artırdık daha ferah olması için */
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* User Navigation Item */
.user-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    user-select: none;
}

.user-nav-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.user-nav-avatar {
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-nav-info {
    text-align: right;
    line-height: 1.2;
}

.user-nav-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

.user-nav-role {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.75rem;
    width: 220px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: #475569 !important;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary) !important;
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
}

.user-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.4rem;
}

.user-dropdown-item.text-danger {
    color: #ef4444 !important;
}

.user-dropdown-item.text-danger:hover {
    background: #fef2f2;
}

/* Content Wrapper */
.content-wrapper {
    padding: 1.5rem 2rem;
    max-width: 1600px;
    overflow-y: auto;
    height: calc(100vh - 60px);
    /* 60px is the header height */
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 0;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-danger {
    background: var(--error);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    color: var(--gray-700);
    background: #fcfcfc;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Grid & Utilities */
.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    letter-spacing: 0.5px;
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table tr:hover td {
    background: var(--gray-50);
}

/* Alerts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #e8fff3;
    color: #10b981;
    border: 1px solid #d1fae5;
}

.alert-error {
    background: #fff5f5;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--border-color);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.kpi-icon.blue {
    background: #e1f0ff;
    color: #3699ff;
}

.kpi-icon.green {
    background: #c9f7f5;
    color: #1bc5bd;
}

.kpi-icon.orange {
    background: #fff4de;
    color: #ffa800;
}

.kpi-icon.red {
    background: #ffe2e5;
    color: #f64e60;
}

.kpi-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.kpi-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-4xl);
}

h2 {
    font-size: var(--font-3xl);
}

h3 {
    font-size: var(--font-2xl);
}

h4 {
    font-size: var(--font-xl);
}

h5 {
    font-size: var(--font-lg);
}

h6 {
    font-size: var(--font-base);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

/* Card */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: var(--font-xl);
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: var(--spacing-md) 0;
}

/* Glassmorphism Card */
.card-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-size: var(--font-base);
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-error {
    background: var(--error);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-lg);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: var(--font-sm);
    margin-top: var(--spacing-xs);
    display: block;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-xs);
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-primary {
    background: var(--primary);
    color: white;
}

.badge.bg-success {
    background: var(--success);
    color: white;
}

.badge.bg-warning {
    background: var(--warning);
    color: white;
}

.badge.bg-danger {
    background: var(--error);
    color: white;
}

.badge.bg-info {
    background: var(--info);
    color: white;
}

.badge.bg-secondary {
    background: var(--gray-400);
    color: white;
}

/* Alert */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead {
    background: var(--gray-50);
}

.table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

.gap-3 {
    gap: var(--spacing-lg);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    min-width: 300px;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modern Modal Styles (Ported from list.php) */
.modern-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modern-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

.modern-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modern-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.dropdown-menu-center {
    transform: translate(0, 0) !important;
}