/* =========================== */
/* MAHALLER SAYFA STİLLERİ - 4 SÜTUNLU CARD YAPISI */
/* =========================== */

.mahal-page-wrapper {
    margin-top: 30px;
}

/* Animasyon için */
.animate-element {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.animate-element:nth-child(1) { animation-delay: 0.1s; }
.animate-element:nth-child(2) { animation-delay: 0.2s; }
.animate-element:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mahal-container {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Header */
.mahal-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

    .mahal-header h2 {
        color: #2d3748;
        font-weight: 700;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .mahal-header h2 i {
            color: #667eea;
            font-size: 2rem;
        }

.mahal-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.mahal-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-size: 0.95rem;
}

    .mahal-stat-item i {
        color: #667eea;
    }

/* Proje Seçim Kartı */
.proje-secim-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

    .proje-secim-card h5 {
        color: #2d3748;
        font-weight: 600;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .proje-secim-card h5 i {
            color: #667eea;
        }

.proje-select-wrapper {
    position: relative;
}

    .proje-select-wrapper select {
        width: 100%;
        padding: 1rem 3rem 1rem 1.5rem;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        font-size: 1rem;
        color: #2d3748;
        background: white;
        cursor: pointer;
        transition: all 0.3s ease;
        appearance: none;
    }

        .proje-select-wrapper select:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            outline: none;
        }

    .proje-select-wrapper::after {
        content: '\F282';
        font-family: 'bootstrap-icons';
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        color: #667eea;
        pointer-events: none;
        font-size: 1.2rem;
    }

/* =========================== */
/* MAHAL CARD YAPISI */
/* =========================== */

.mahal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    height: 600px;
    transition: all 0.3s ease;
}

    .mahal-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

/* Card Header - Farklı Renk Şemaları */
.mahal-card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

    .mahal-card-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        pointer-events: none;
    }

    .mahal-card-header h5 {
        margin: 0;
        font-weight: 600;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        z-index: 1;
    }

        .mahal-card-header h5 i {
            font-size: 1.3rem;
        }

/* Binalar - Mavi Tonları */
.mahal-card-bina .mahal-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Katlar - Yeşil Tonları */
.mahal-card-kat .mahal-card-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Daireler - Turuncu Tonları */
.mahal-card-daire .mahal-card-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Odalar - Pembe/Mor Tonları */
.mahal-card-oda .mahal-card-header {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* Add Button */
.btn-mahal-add {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

    .btn-mahal-add:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
        transform: scale(1.1) rotate(90deg);
    }

    .btn-mahal-add i {
        font-size: 1.2rem;
    }

/* Card Body */
.mahal-card-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

    /* Scrollbar Stilleri */
    .mahal-card-body::-webkit-scrollbar {
        width: 6px;
    }

    .mahal-card-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .mahal-card-body::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 10px;
    }

        .mahal-card-body::-webkit-scrollbar-thumb:hover {
            background: #a0aec0;
        }

/* Mahal Item */
.mahal-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

    .mahal-item:hover {
        border-color: #cbd5e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateX(4px);
    }

.mahal-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.mahal-item-id {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mahal-item-text {
    color: #2d3748;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mahal-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Action Buttons */
.btn-mahal-edit,
.btn-mahal-delete {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-mahal-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

    .btn-mahal-edit:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

.btn-mahal-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

    .btn-mahal-delete:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

/* Card Footer */
.mahal-card-footer {
    padding: 1rem 1.5rem;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
}

    .mahal-card-footer i {
        color: #667eea;
        margin-right: 0.5rem;
    }

/* Empty State */
.mahal-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

    .mahal-empty i {
        font-size: 3rem;
        color: #cbd5e0;
        margin-bottom: 1rem;
    }

    .mahal-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

/* Proje Seç State */
.proje-sec-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

    .proje-sec-state i {
        font-size: 5rem;
        color: #cbd5e0;
        margin-bottom: 1.5rem;
    }

    .proje-sec-state h4 {
        color: #4a5568;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

/* Modal Stilleri */
.mahal-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mahal-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    border: none;
}

    .mahal-modal .modal-header h5 {
        font-weight: 600;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mahal-modal .modal-header .btn-close {
        filter: brightness(0) invert(1);
        opacity: 0.8;
    }

.mahal-modal .modal-body {
    padding: 2rem;
}

.mahal-modal .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mahal-modal .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

    .mahal-modal .form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

/* Primary Button */
.btn-mahal-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

    .btn-mahal-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        color: white;
    }

/* Loading Efekti */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

    .btn-loading::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid #ffffff;
        border-radius: 50%;
        border-top-color: transparent;
        animation: spinner 0.6s linear infinite;
    }

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1199px) {
    .mahal-card {
        height: 500px;
    }
}

@media (max-width: 991px) {
    .mahal-card {
        height: 450px;
    }
}

@media (max-width: 767px) {
    .mahal-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .mahal-card {
        height: 400px;
        margin-bottom: 1rem;
    }

    .mahal-container {
        padding: 0 1rem;
    }
}
