/* Personel Kimlik Sistemi - Modern UX/UI Tasarımı */

/* CSS Değişkenleri (Açık Tema) */
:root {
    --primary-color: #6366f1;
    --primary-color-rgb: 99, 102, 241;
    --secondary-color: #64748b;
    --accent-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --background-color: #f8fafc;
    --background-secondary: #f1f5f9;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    --transition-speed: 0.3s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Tema Değişkenleri */
[data-bs-theme="dark"] {
    --background-color: #0f172a;
    --background-secondary: #1e293b;
    --sidebar-bg: #1e293b;
    --card-bg: #334155;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #475569;
    --border-light: #334155;
    /* ... (diğer dark tema değişkenleri aynı) ... */
}

/* --- YENİ TASARIM BAŞLANGICI --- */

/* Genel Stiller ve Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-card {
    animation: fadeInUp 0.5s var(--transition-curve) forwards;
    opacity: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) var(--transition-curve);
    line-height: 1.6;
    font-size: 16px; /* Yazı boyutunu okunabilirlik için biraz büyüttük */
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Ana Sayfa Hero Bölümü */
.hero-section-new {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 4rem 1rem;
    color: var(--text-color);
    background: linear-gradient(180deg, var(--background-color) 70%, transparent 100%);
    position: relative;
    overflow: hidden;
}

.hero-section-new::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 40%);
    animation: pulse 10s infinite linear;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.hero-content {
    z-index: 1;
    position: relative;
    animation: fadeInUp 0.8s var(--transition-curve) forwards;
}

/* Özellik Kartları (Ana Sayfa) */
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition-speed) var(--transition-curve), box-shadow var(--transition-speed) var(--transition-curve);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.feature-card h5 {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Personel Profil Sayfası Stilleri */
.profile-sidebar {
    background: linear-gradient(160deg, #7173f5 0%, var(--primary-color) 100%);
    color: white;
    padding: 3rem;
}

.profile-main-content {
    background-color: var(--background-secondary);
    padding: 3rem;
}

.profile-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.profile-actions {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.qr-code-container {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.qr-code-container img {
    max-width: 100%;
    display: block;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: 100%;
}

.info-card .card-body {
    padding: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-speed) var(--transition-curve);
}
.info-item:not(:last-child) {
    margin-bottom: 1rem;
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.5rem;
}

.info-content .info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

.info-content .info-value {
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.info-content .info-value a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}
.info-content .info-value a:hover {
    color: var(--primary-color);
}

.map-container {
    height: 400px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
/* --- YENİ: GERÇEK KİMLİK KARTI TASARIMI --- */

@keyframes flipIn {
    from {
        transform: perspective(800px) rotateY(90deg) scale(0.8);
        opacity: 0;
    }
    to {
        transform: perspective(800px) rotateY(0deg) scale(1);
        opacity: 1;
    }
}

.profile-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: var(--background-secondary);
}

.personnel-id-card {
    width: 100%;
    max-width: 400px; /* Kart genişliğini ayarlayabilirsiniz */
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: flipIn 0.8s var(--transition-curve) forwards;
    transform-style: preserve-3d;
}

.id-card-header {
    background: linear-gradient(135deg, var(--primary-color), #8183f7);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.id-card-logo {
    max-width: 150px;
    max-height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Logoyu beyaz yapar */
}

.id-card-body {
    padding: 2rem;
    text-align: center;
    position: relative;
}

.id-card-photo-wrapper {
    margin-top: -75px; /* Fotoğrafı yukarı taşır */
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.id-card-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--card-bg);
    box-shadow: var(--shadow);
}

.id-card-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.id-card-position {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.id-card-details {
    text-align: left;
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
}
.detail-item:not(:last-child) {
    margin-bottom: 1rem;
}
.detail-item i {
    color: var(--text-muted);
    width: 20px;
    margin-right: 1rem;
}
.detail-item span {
    color: var(--text-color);
    font-weight: 500;
}

.id-card-footer {
    padding: 1rem;
    background: var(--background-secondary);
    text-align: center;
}

.id-card-footer img {
    max-width: 100%;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- LOGIN PAGE STYLES --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.login-card .logo-section {
    background: linear-gradient(135deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.8));
    color: white;
}

.login-card .form-control-lg {
    padding: .8rem 1rem;
    font-size: 1rem;
}

.login-card .btn-login {
    padding: .8rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: width var(--transition-speed) var(--transition-curve);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all var(--transition-speed) var(--transition-curve);
}

.sidebar-logo i {
    font-size: 1.75rem;
    transition: transform var(--transition-speed) var(--transition-curve);
}

.sidebar.collapsed .sidebar-logo span {
    display: none;
}

.sidebar.collapsed .sidebar-logo i {
    transform: scale(1.2);
}

.sidebar-nav {
    list-style: none;
    padding: 1.5rem 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav-item {
    margin: 0.25rem 1rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-speed) var(--transition-curve);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width var(--transition-speed) var(--transition-curve);
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.sidebar-nav-link.active::before {
    width: 4px;
}

.sidebar-nav-link i {
    width: 20px;
    margin-right: 1rem;
    font-size: 1.1rem;
    text-align: center;
    z-index: 1;
    position: relative;
}

.sidebar.collapsed .sidebar-nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 1rem;
}

.sidebar.collapsed .sidebar-nav-link i {
    margin-right: 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-footer .dropdown-toggle span,
.sidebar.collapsed .sidebar-footer .dropdown-toggle::after {
    display: none;
}

/* Ana İçerik */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) var(--transition-curve);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background-color);
}

.main-content.expanded {
    margin-left: var(--sidebar-width-collapsed);
}

/* Sayfa Başlığı */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Tema Toggle Butonu */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) var(--transition-curve);
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar Toggle Butonu */
#sidebarToggle {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-muted);
    transition: all var(--transition-speed) var(--transition-curve);
}

#sidebarToggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Kartlar */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: all var(--transition-speed) var(--transition-curve);
    overflow: hidden;
}

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

.stats-card {
    border: none;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stats-card .card-body {
    padding: 2rem;
    position: relative;
}

.stats-icon {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.table-card .card-header,
.form-card .card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 2rem;
}

.table-card .card-body,
.form-card .card-body {
    padding: 2rem;
}

.table-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Tablolar */
.table {
    border-color: var(--border-light);
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid var(--border-light);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

/* Formlar */
.form-control, 
.form-select {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--background-secondary);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all var(--transition-speed) var(--transition-curve);
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    background-color: var(--card-bg);
}

/* Butonlar */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    transition: all var(--transition-speed) var(--transition-curve);
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    background-color: #5254e0;
    border-color: #5254e0;
}

/* Upload Alanı */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-secondary);
    transition: all var(--transition-speed) var(--transition-curve);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    background: rgba(var(--primary-color-rgb), 0.05);
    border-color: var(--primary-color);
}

/* Harita Stili */
#map { 
    height: 350px; 
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    z-index: 1;
}

/* Footer */
.footer {
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--background-color);
    flex-shrink: 0;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }
    .main-content {
        margin-left: var(--sidebar-width-collapsed);
    }
    .sidebar-logo span,
    .sidebar-nav-link span,
    .sidebar-footer .dropdown-toggle span {
        display: none;
    }
}

/* Logo gösterim stilleri */
.sidebar-logo .logo-img {
    width: 10rem;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 4px;
}

@media (max-width: 992px) {
		.sidebar-logo .logo-img {
		width: 4rem;
		object-fit: contain;
		margin-right: 10px;
		border-radius: 4px;
	}
}

.collapsed .sidebar-logo .logo-img {
    width: 4rem;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 4px;
}

/* Upload önizleme stilleri */
.upload-preview {
    position: relative;
    display: inline-block;
}

.upload-preview .delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.logo-preview, .favicon-preview {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
    background: white;
}

.favicon-preview {
    max-height: 32px;
}

/* Responsive düzenlemeler */
@media (max-width: 768px) {
    .sidebar-logo .logo-img {
        width: 24px;
        height: 24px;
    }
    
    .logo-preview, .favicon-preview {
        max-height: 60px;
    }
