/**
 * Admin Modern Styles
 * Estilos modernos para el panel de administración
 */

/* ========================================
   VARIABLES Y UTILIDADES
   ======================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #3490dc 0%, #0a1628 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --pink-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    --color-primary: #3490dc;
    --color-secondary: #0a1628;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    --text-dark: #2d3748;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #f1f5f9;
    --border-color: #e2e8f0;

    --shadow-sm: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

/* Dashboard Header */
.dashboard-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* KPI Cards */
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

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

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.kpi-icon.primary { background: var(--primary-gradient); color: white; }
.kpi-icon.success { background: var(--success-gradient); color: white; }
.kpi-icon.warning { background: var(--pink-gradient); color: white; }
.kpi-icon.info { background: var(--info-gradient); color: white; }

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Modern Cards */
.modern-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    height: 100%;
}

.modern-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-card .card-header i {
    color: var(--color-primary);
}

.modern-card .card-body {
    padding: 0;
}

/* Modern Tables */
.modern-table {
    width: 100%;
    margin-bottom: 0;
}

.modern-table thead th {
    background: var(--bg-light);
    padding: 0.875rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border: none;
}

.modern-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.modern-table tbody tr:hover {
    background-color: var(--bg-light);
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border: none;
    color: #475569;
}

.modern-table tbody td a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.modern-table tbody td a:hover {
    color: var(--color-secondary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.published {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.closed {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Productivity Table */
.productivity-row-total {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.productivity-row-total td {
    color: white !important;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: block;
}

/* ========================================
   PROPERTY SHOW STYLES
   ======================================== */

/* Property Header */
.property-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.property-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.property-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.property-header .breadcrumb-item a:hover {
    color: white;
}

.property-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.6);
}

.property-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

.property-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.property-code {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.75rem;
    display: inline-block;
}

.property-category {
    opacity: 0.9;
    font-size: 1rem;
}

/* Status Badges Large */
.status-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge-lg.published {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge-lg.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-lg.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Action Buttons */
.btn-action {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-action:hover {
    transform: translateY(-2px);
}

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

.btn-action.btn-edit:hover {
    background: #f8fafc;
    color: var(--color-primary);
}

.btn-action.btn-publish {
    background: var(--color-success);
    color: white;
}

.btn-action.btn-publish:hover {
    background: #059669;
    color: white;
}

.btn-action.btn-unpublish {
    background: var(--color-warning);
    color: white;
}

.btn-action.btn-unpublish:hover {
    background: #d97706;
    color: white;
}

/* Gallery Section */
.gallery-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.main-gallery {
    position: relative;
    background: #1a1a2e;
}

.main-gallery .carousel-item img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    background: #1a1a2e;
}

.main-gallery .carousel-control-prev,
.main-gallery .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.main-gallery .carousel-control-prev {
    left: 15px;
}

.main-gallery .carousel-control-next {
    right: 15px;
}

.main-gallery .carousel-control-prev-icon,
.main-gallery .carousel-control-next-icon {
    filter: invert(1) grayscale(100);
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    background: var(--bg-light);
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--color-primary);
}

.photo-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

.no-photos {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: var(--bg-light);
    color: var(--text-light);
}

.no-photos i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Info Cards */
.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.info-card-header i {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.info-card-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Price Card */
.price-card {
    background: var(--success-gradient);
    color: white;
}

.price-card .info-card-header {
    border-bottom-color: rgba(255,255,255,0.2);
}

.price-card .info-card-header i {
    background: rgba(255,255,255,0.2);
}

.price-card .info-card-header h5 {
    color: white;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.price-currency {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Detail Items */
.detail-item {
    margin-bottom: 1rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.detail-value.large {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Description Card */
.description-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.description-text {
    color: #475569;
    line-height: 1.7;
    white-space: pre-line;
}

/* Attributes Grid */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.attribute-item {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.attribute-item:hover {
    background: var(--border-light);
    transform: translateY(-2px);
}

.attribute-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: white;
    font-size: 1rem;
}

.attribute-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.attribute-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Agent Card */
.agent-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.agent-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-dark);
}

.agent-info small {
    color: var(--text-muted);
}

/* Closed Alert */
.closed-alert {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.closed-alert i {
    font-size: 1.5rem;
    color: #92400e;
}

.closed-alert-content {
    flex: 1;
    color: #92400e;
}

.closed-alert-content strong {
    color: #92400e;
}

.closed-alert a {
    color: #92400e;
    font-weight: 600;
}

/* ========================================
   SYNC MODAL STYLES
   ======================================== */

.btn-sync {
    background: var(--pink-gradient);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    color: white;
}

.btn-sync:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sync-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.sync-modal .modal-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1.5rem;
}

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

.sync-modal .modal-body {
    padding: 1.5rem;
}

.sync-loading {
    text-align: center;
    padding: 3rem;
}

.sync-loading .spinner-border {
    width: 4rem;
    height: 4rem;
    color: var(--color-primary);
}

.sync-loading p {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.sync-results {
    display: none;
}

.sync-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sync-stat-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.sync-stat-card.new { border-left: 4px solid var(--color-success); }
.sync-stat-card.updated { border-left: 4px solid #3b82f6; }
.sync-stat-card.closed { border-left: 4px solid var(--color-danger); }
.sync-stat-card.reactivated { border-left: 4px solid var(--color-warning); }
.sync-stat-card.scanned { border-left: 4px solid #8b5cf6; }

.sync-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.sync-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.new-properties-section {
    margin-top: 1.5rem;
}

.new-properties-section h6 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-properties-list {
    max-height: 300px;
    overflow-y: auto;
}

.new-property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.new-property-item:hover {
    background: var(--border-light);
}

.new-property-info h6 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.new-property-info small {
    color: var(--text-muted);
}

.new-property-price {
    font-weight: 700;
    color: var(--color-success);
}

.sync-errors {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-danger);
}

.sync-errors h6 {
    color: #991b1b;
    margin-bottom: 0.5rem;
}

.sync-errors ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #991b1b;
}

.sync-success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.sync-success-icon i {
    font-size: 2.5rem;
    color: white;
}

/* ========================================
   UTILITIES
   ======================================== */

.request-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.date-range-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--border-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

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

@media (max-width: 768px) {
    .kpi-card {
        margin-bottom: 1rem;
    }

    .dashboard-header,
    .property-header {
        padding: 1rem;
    }

    .dashboard-header h1,
    .property-title {
        font-size: 1.25rem;
    }

    .main-gallery .carousel-item img {
        height: 250px;
    }

    .price-value {
        font-size: 1.75rem;
    }

    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sync-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PROPERTY LIST STYLES
   ======================================== */

/* List Header */
.list-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.list-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.list-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.list-header .breadcrumb-item a:hover {
    color: white;
}

.list-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.6);
}

.list-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

.list-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.list-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Filter Card */
.filter-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-card .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.filter-card .form-control,
.filter-card .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 144, 220, 0.15);
}

.filter-card .btn-search {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-card .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 144, 220, 0.4);
}

.filter-card .btn-reset {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-card .btn-reset:hover {
    background: var(--border-light);
    color: var(--text-dark);
}

/* Create New Card */
.create-card {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.create-card h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.create-card .form-select {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.create-card .btn-create {
    background: white;
    color: #10b981;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.create-card .btn-create:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

/* Properties Table Card */
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-card-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-card-header h5 i {
    color: var(--color-primary);
}

.results-count {
    background: var(--bg-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Property Row Styles */
.property-row {
    transition: background-color 0.2s ease;
}

.property-row:hover {
    background-color: var(--bg-light);
}

.property-row.closed {
    background-color: #fef2f2;
}

.property-row.closed:hover {
    background-color: #fee2e2;
}

.property-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(52, 144, 220, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.property-title-cell {
    font-weight: 500;
    color: var(--text-dark);
}

.property-title-cell a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-title-cell a:hover {
    color: var(--color-primary);
}

.property-price {
    font-weight: 700;
    color: var(--color-success);
}

.property-location {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.property-visits {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--bg-light);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.property-visits i {
    font-size: 0.625rem;
}

/* Category Badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--text-muted);
}

/* Action Buttons Group */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
}

.btn-action-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-action-sm:hover {
    transform: translateY(-2px);
}

.btn-action-sm.btn-photos {
    background: #6366f1;
    color: white;
}

.btn-action-sm.btn-photos:hover {
    background: #4f46e5;
    color: white;
}

.btn-action-sm.btn-edit {
    background: var(--color-primary);
    color: white;
}

.btn-action-sm.btn-edit:hover {
    background: var(--color-secondary);
    color: white;
}

.btn-action-sm.btn-delete {
    background: var(--color-danger);
    color: white;
}

.btn-action-sm.btn-delete:hover {
    background: #dc2626;
    color: white;
}

.btn-action-sm.btn-publish {
    background: var(--color-success);
    color: white;
}

.btn-action-sm.btn-publish:hover {
    background: #059669;
    color: white;
}

.btn-action-sm.btn-unpublish {
    background: var(--color-warning);
    color: white;
}

.btn-action-sm.btn-unpublish:hover {
    background: #d97706;
    color: white;
}

.btn-action-sm.btn-view {
    background: var(--text-muted);
    color: white;
}

.btn-action-sm.btn-view:hover {
    background: var(--text-dark);
    color: white;
}

/* Closed Info */
.closed-info {
    font-size: 0.75rem;
    color: var(--color-danger);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Modern Pagination */
.modern-pagination {
    padding: 1.25rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-light);
}

.modern-pagination .pagination {
    margin: 0;
    gap: 0.25rem;
}

.modern-pagination .page-link {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-light);
    transition: all 0.2s ease;
}

.modern-pagination .page-link:hover {
    background: var(--border-light);
    color: var(--color-primary);
}

.modern-pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
}

.modern-pagination .page-item.disabled .page-link {
    background: transparent;
    color: var(--text-light);
}

/* Quick Stats for List */
.list-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}

.list-stat-item i {
    opacity: 0.8;
}

.list-stat-item span {
    font-weight: 700;
}

.list-stat-item small {
    opacity: 0.8;
    font-size: 0.75rem;
}

/* ========================================
   ADVANCED SEARCH STYLES
   ======================================== */

.search-filter-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.search-filter-header {
    background: var(--primary-gradient);
    padding: 1rem 1.5rem;
    color: white;
}

.search-filter-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.search-filter-card form {
    padding: 1.5rem;
}

.search-filter-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.search-filter-card .form-control,
.search-filter-card .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.search-filter-card .form-control:focus,
.search-filter-card .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 144, 220, 0.15);
}

.search-filter-card .form-control-sm,
.search-filter-card .form-select-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

/* Sort Link */
.sort-link {
    color: var(--color-primary);
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.sort-link:hover {
    color: var(--color-secondary);
    transform: scale(1.2);
}

/* Client Info */
.client-info {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.client-info i {
    color: var(--color-primary);
}

/* ========================================
   PRODUCTIVITY TABLE STYLES
   ======================================== */

.productivity-totals-header {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.productivity-total-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.productivity-total-item .total-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.productivity-total-item .total-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.productivity-table-wrapper {
    max-height: 350px;
    overflow-y: auto;
}

.productivity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.productivity-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

.productivity-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.productivity-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.productivity-table tbody tr:hover {
    background: var(--bg-light);
}

.realtor-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.realtor-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.productivity-table tbody td {
    font-weight: 500;
}

/* Scrollbar styling */
.productivity-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.productivity-table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
}

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

.productivity-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ========================================
   FORM CARD STYLES
   ======================================== */

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.form-card-header {
    background: var(--primary-gradient);
    padding: 1rem 1.5rem;
    color: white;
}

.form-card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.form-card-body {
    padding: 1.5rem;
}

.form-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-card .form-control,
.form-card .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 144, 220, 0.15);
}

.btn-save {
    background: var(--success-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-cancel-edit {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel-edit:hover {
    background: var(--danger-gradient);
    color: white;
    border-color: transparent;
}

.cancel-edit-row {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
}

/* ========================================
   REQUEST TYPES STYLES
   ======================================== */

.request-type-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.request-type-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.color-preview {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0,0,0,0.1);
}

.days-badge {
    display: inline-block;
    background: var(--info-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================================
   CARD ACTION BUTTON
   ======================================== */

.btn-card-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-card-action:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    transform: scale(1.1);
}

/* ========================================
   REQUESTS INDEX STYLES
   ======================================== */

.btn-create-new {
    background: var(--success-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-create-new:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.request-id {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.request-subject a {
    color: var(--text-dark);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.request-subject a:hover {
    color: var(--color-primary);
}

.request-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.creator-info {
    font-size: 0.9rem;
}

.property-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.property-link:hover {
    color: var(--color-primary);
}

.property-price-small {
    font-size: 0.8rem;
    color: var(--color-success);
    font-weight: 600;
}

.request-closed {
    background: var(--bg-light);
    opacity: 0.8;
}

.request-closed:hover {
    opacity: 1;
}

/* ========================================
   REQUEST WALL / DETAIL STYLES
   ======================================== */

.request-code {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Info Card */
.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

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

.info-item {
    margin-bottom: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-value {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.description-text {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

.property-link-card {
    display: block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.property-link-card:hover {
    color: var(--color-secondary);
}

.property-price-tag {
    display: block;
    color: var(--color-success);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Action Form Card */
.action-form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.action-form-header {
    background: var(--success-gradient);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.action-form-body {
    padding: 1.25rem;
}

.action-type-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-type-btn i {
    font-size: 1.25rem;
}

.action-type-btn span {
    font-size: 0.75rem;
    font-weight: 600;
}

.action-type-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.action-type-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* Timeline Card */
.timeline-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.timeline-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.timeline-body {
    padding: 1.25rem;
    max-height: 600px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-avatar {
    flex-shrink: 0;
}

.timeline-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.timeline-content {
    flex-grow: 1;
    min-width: 0;
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.timeline-user strong {
    color: var(--text-dark);
    display: block;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.timeline-badge.comment {
    background: rgba(52, 144, 220, 0.15);
    color: var(--color-primary);
}

.timeline-badge.visit-done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.timeline-badge.visit-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.timeline-badge.visit-confirm {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

.timeline-badge.call {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.timeline-badge.file {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.timeline-text {
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.timeline-property {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(52, 144, 220, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

.timeline-property a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.timeline-property a:hover {
    text-decoration: underline;
}

.visit-info {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.visit-actions {
    display: flex;
    gap: 0.5rem;
}

.timeline-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-actions {
    opacity: 1;
}

/* Scrollbar for timeline */
.timeline-body::-webkit-scrollbar {
    width: 6px;
}

.timeline-body::-webkit-scrollbar-track {
    background: var(--bg-light);
}

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

.timeline-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
