/* Kuyumcu Yönetim Sistemi - Özel CSS */

/* Genel Stiller */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.min-vh-100 {
    min-height: 100vh;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* Kartlar */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* İstatistik Kartları */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info,
.card.bg-danger {
    border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body,
.card.bg-danger .card-body {
    padding: 1.5rem;
}

/* Butonlar */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: none;
}

/* Form Elemanları */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Tablolar */
.table {
    border-radius: 0.375rem;
    overflow: hidden;
}

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

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Alert Mesajları */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

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

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Özel Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Özel Renkler */
.text-gold {
    color: #ffd700 !important;
}

.bg-gold {
    background-color: #ffd700 !important;
}

.border-gold {
    border-color: #ffd700 !important;
}

/* Hesaplama Kutusu */
.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

/* İstatistik Kartları Hover Efekti */
.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-info:hover,
.card.bg-danger:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: #198754;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Dropdown Menüler */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Anlık Satış Sayfası Özel Stilleri */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-stats {
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Ürün Satırı Animasyonları */
.product-row {
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease-out;
}

.product-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stat Kartları */
.stat-card {
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Form Elemanları Geliştirmeleri */
.form-select-lg,
.form-control {
    transition: all 0.3s ease;
}

.form-select-lg:focus,
.form-control:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buton Animasyonları */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Badge Animasyonları */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Alert Animasyonları */
.alert {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hesaplama Kutusu Özel Stilleri */
#hesaplama .stat-card {
    margin-bottom: 1rem;
}

#hesaplama .stat-card i {
    transition: all 0.3s ease;
}

#hesaplama .stat-card:hover i {
    transform: rotate(360deg);
}

/* Ürün Container */
.products-container {
    min-height: 200px;
    transition: all 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard Özel Stilleri */
.bg-gradient-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.stat-icon {
    opacity: 0.3;
    transition: all 0.3s ease;
}

.stat-icon:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.quick-action-btn {
    transition: all 0.3s ease;
    border: none;
    min-height: 120px;
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.quick-action-btn i {
    transition: all 0.3s ease;
}

.quick-action-btn:hover i {
    transform: scale(1.2);
}

/* Dashboard Kartları */
.dashboard-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* İstatistik Kartları Animasyonları */
.card.bg-gradient-primary:hover,
.card.bg-gradient-success:hover,
.card.bg-gradient-warning:hover,
.card.bg-gradient-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* Tablo İyileştirmeleri */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.01);
}

/* List Group İyileştirmeleri */
.list-group-item {
    transition: all 0.3s ease;
    border-radius: 0.5rem !important;
}

.list-group-item:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    transform: translateX(5px);
}

/* Badge Animasyonları */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Canlı Fiyatlar Özel Stilleri */
.live-prices-container {
    max-height: 500px;
    overflow-y: auto;
}

.price-item {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.price-item:hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.1) 100%) !important;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.price-item h6 {
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.price-item:hover h6 {
    color: #007bff !important;
    transform: scale(1.05);
}

.price-item .fw-bold {
    font-size: 1.1rem;
    font-weight: 700 !important;
}

.price-item .text-success {
    color: #28a745 !important;
}

.price-item .text-danger {
    color: #dc3545 !important;
}

/* Fiyat değişim animasyonları */
.text-success {
    animation: pulse-green 2s infinite;
}

.text-danger {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Canlı fiyat kartları */
.live-prices-container::-webkit-scrollbar {
    width: 4px;
}

.live-prices-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.live-prices-container::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 2px;
}

.live-prices-container::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Responsive İyileştirmeler */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .product-row .col-md-2,
    .product-row .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .quick-action-btn {
        min-height: 100px;
    }
    
    .quick-action-btn i {
        font-size: 1.5rem !important;
    }
}

/* Print Stilleri */
@media print {
    .navbar,
    .btn,
    .alert,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        border: 1px solid #000 !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* Canlı Altın Fiyatları Güncelleme Animasyonları (Optimized) */
.price-updated {
    animation: priceUpdate 0.5s ease-in-out;
    background-color: rgba(40, 167, 69, 0.05) !important;
    border: 1px solid rgba(40, 167, 69, 0.2) !important;
}

@keyframes priceUpdate {
    0% {
        background-color: rgba(40, 167, 69, 0.05);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.1);
    }
    100% {
        background-color: rgba(40, 167, 69, 0.05);
    }
}

/* Fiyat güncelleme göstergesi */
.live-prices-container {
    position: relative;
}

.live-prices-container::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse 3s infinite;
    z-index: 10;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    
    50% {
        opacity: 0.5;
    }
    
    100% {
        opacity: 1;
    }
}

/* Fiyat değişim animasyonları */
.price-change-up {
    color: #28a745 !important;
    animation: priceUp 0.5s ease-in-out;
}

.price-change-down {
    color: #dc3545 !important;
    animation: priceDown 0.5s ease-in-out;
}

@keyframes priceUp {
    0% {
        transform: translateY(0);
        color: #28a745;
    }
    50% {
        transform: translateY(-2px);
        color: #20c997;
    }
    100% {
        transform: translateY(0);
        color: #28a745;
    }
}

@keyframes priceDown {
    0% {
        transform: translateY(0);
        color: #dc3545;
    }
    50% {
        transform: translateY(2px);
        color: #fd7e14;
    }
    100% {
        transform: translateY(0);
        color: #dc3545;
    }
}

/* Loading animasyonu */
.price-loading {
    opacity: 0.6;
    position: relative;
}

.price-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
