:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --sidebar-width: 280px;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.header {
    background: white;
    padding: 0 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 40px;
    width: auto;
}

.app-title {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Layout Container */
.admin-layout {
    display: flex;
    margin-top: 70px;
    /* Header Height */
    align-items: flex-start;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;

    /* Sticky sidebar for desktop */
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 40;
}

.menu-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

.menu-label:first-child {
    margin-top: 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f8fafc;
    color: var(--primary);
}

.nav-link.active {
    background: #eef2ff;
    color: var(--primary);
    font-weight: 600;
}

.nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
    /* Fill remaining flex space */
    min-width: 0;
    /* Prevents flex items from overflowing horizontally */
}

/* Common Components */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: none;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* Bootstrap 4 uyumluluk: text-gray-800 */
.text-gray-800 {
    color: #3a3b45 !important;
}

/* Sayfa başlığı h1 (Bildirimler formatı) */
h1.h3.mb-0.text-gray-800,
.h3.mb-0.text-gray-800 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3a3b45;
    line-height: 1.3;
}

/* row mb-4 sadece dashboard istatistik kartları için override — 
   sayfa başlığı row'larını etkilemesin */
.dashboard-stats-row.mb-4 {
    margin-left: -6px !important;
    margin-right: -6px !important;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    color: white;
}

/* Standard Table Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    border-radius: 0.5rem !important;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.btn-action i {
    margin: 0 !important;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
}

/* Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

th:first-child {
    border-top-left-radius: 0.5rem;
}

th:last-child {
    border-top-right-radius: 0.5rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #fcfcfc;
}

/* Action Buttons Spacing */
td .btn {
    margin-right: 0.5rem;
}

td .btn:last-child {
    margin-right: 0;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-stats-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.card-stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 5px;
}

.dashboard-icon {
    font-size: 2.5rem;
    opacity: 0.2;
}

.dashboard-icon.primary-icon {
    color: var(--primary);
}

.dashboard-icon.success-icon {
    color: var(--success);
}

.dashboard-icon.info-icon {
    color: var(--info);
}

.dashboard-icon.warning-icon {
    color: var(--warning);
}

/* Badges */
.status-badge {
    padding: 0.35em 0.8em;
    border-radius: 2rem;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff;
    display: inline-block;
}

.badge-success {
    background-color: var(--success);
}

.badge-warning {
    background-color: var(--warning);
    color: #fff;
}

.badge-danger {
    background-color: var(--danger);
}

.badge-info {
    background-color: var(--info);
}

.badge-secondary {
    background-color: var(--text-muted);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0;
    margin-right: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        transform: translateX(-100%);
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        padding: 1rem;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .header {
        padding: 0 1rem;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.overlay.active {
    display: block;
}