/* ============================================
   SARA UYLAR - EXTRA COMPONENTS (HAVORANG)
   Profile, Forms, Empty States
   ============================================ */

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #1E88E5;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-card p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1E88E5;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section */
.section {
    margin-bottom: 32px;
}

.section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Property Status Badge */
.property-status {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.property-status.active {
    background: #4CAF50;
    color: white;
}

.property-status.pending {
    background: #FF9800;
    color: white;
}

.property-status.sold {
    background: #9E9E9E;
    color: white;
}

/* Property Meta */
.property-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ============================================
   FORMS - YOUTUBE STYLE
   ============================================ */

.card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.card-content {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: #1E88E5;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606060' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.error {
    display: block;
    color: #E53935;
    font-size: 12px;
    margin-top: 4px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Price Range / Area Range */
.price-range,
.area-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-range input,
.area-range input {
    flex: 1;
}

.price-range span,
.area-range span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   BADGE
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #1E88E5;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   HEADER TITLE
   ============================================ */

.header-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   IMAGE UPLOAD
   ============================================ */

.image-upload-container {
    margin-top: 8px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(229, 57, 53, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.remove-image:hover {
    background: #E53935;
    transform: scale(1.1);
}

.remove-image i {
    font-size: 18px;
}

.form-text {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ============================================
   PROPERTY DETAILS (for cards)
   ============================================ */

.property-details {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}

.property-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.property-detail i {
    font-size: 16px;
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    color: #1E88E5;
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--divider-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-tab.active {
    color: #1E88E5;
    border-bottom-color: #1E88E5;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.toast.success {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.toast.error {
    background: #E53935;
    color: white;
    border-color: #E53935;
}

.toast i {
    font-size: 24px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .profile-card {
        padding: 24px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-card h2 {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-state i {
        font-size: 60px;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
}


/* ============================================
   AVATAR PLACEHOLDER - HAVORANG
   ============================================ */

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1E88E5, #42A5F5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.profile-avatar .avatar-placeholder {
    font-size: 48px;
}


/* Tugmali tanlash interfeysi */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-option {
    flex: 1;
    min-width: calc(50% - 4px);
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-option:hover {
    border-color: #065fd4;
    background: #f0f7ff;
}

.btn-option.active {
    border-color: #065fd4;
    background: #065fd4;
    color: white;
}

.btn-option-small {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 50px;
}

.btn-option-small:hover {
    border-color: #065fd4;
    background: #f0f7ff;
}

.btn-option-small.active {
    border-color: #065fd4;
    background: #065fd4;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-option {
        min-width: 100%;
    }
    
    .button-group {
        gap: 6px;
    }
    
    .btn-option-small {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 45px;
    }
}
