/* ============================================
   AGENT LAYOUT & DASHBOARD CSS
   ============================================ */

/* Agent Layout */
.agent-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-light);
}

.agent-sidebar {
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #F3F4F6;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1A1A2E;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo img {
    height: 32px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #6B7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 150ms ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.sidebar-nav .nav-item:hover {
    color: #1A1A2E;
    background: #F8F9FA;
}

.sidebar-nav .nav-item.active {
    color: white;
    background: #D4A03C;
}

.sidebar-nav .nav-item.active svg {
    stroke: white;
}

.sidebar-nav .badge {
    margin-left: auto;
    background: #dc2626;
    color: white;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: #F3F4F6;
    margin: 0.75rem 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid #F3F4F6;
}

/* Main Content Area */
.agent-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.agent-topbar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
}

.topbar-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.topbar-search svg {
    color: var(--text-gray);
}

.topbar-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.9375rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-btn {
    position: relative;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.topbar-btn:hover {
    color: var(--primary-blue);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: #dc2626;
    color: white;
    font-size: 0.625rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
}

.agent-content {
    flex: 1;
    padding: 1.5rem;
}

/* Dashboard Page */
.dashboard-page {
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.welcome-content p {
    color: var(--text-gray);
}

.btn-add-property {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-add-property:hover {
    background: var(--primary-400);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.stat-icon.green {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.stat-icon.yellow {
    background: rgba(212, 168, 83, 0.1);
    color: var(--primary-gold);
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.stat-content {
    flex: 1;
}

.stat-content .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-content .stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.stat-content .stat-change {
    font-size: 0.8125rem;
    font-weight: 500;
}

.stat-content .stat-change.positive {
    color: #059669;
}

.stat-content .stat-change.negative {
    color: #dc2626;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-header .view-all {
    font-size: 0.875rem;
    color: var(--primary-blue);
    text-decoration: none;
}

.card-header .view-all:hover {
    text-decoration: underline;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.inquiry {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.activity-icon.showing {
    background: rgba(212, 168, 83, 0.1);
    color: var(--primary-gold);
}

.activity-icon.view {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.activity-icon.success {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.activity-content .activity-text {
    font-size: 0.9375rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.activity-content .activity-time {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* Showings List */
.showings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.showing-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.showing-date {
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.showing-date .day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.showing-date .month {
    font-size: 0.625rem;
    text-transform: uppercase;
}

.showing-details {
    flex: 1;
}

.showing-details h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.showing-details p {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-icon.danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* Leads List */
.leads-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.lead-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.lead-info {
    flex: 1;
}

.lead-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.lead-info p {
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.lead-info .lead-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.btn-contact-lead {
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

/* Listings Table */
.listings-table {
    overflow-x: auto;
}

.listings-table table {
    width: 100%;
    border-collapse: collapse;
}

.listings-table th,
.listings-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.listings-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
}

.listings-table td {
    font-size: 0.875rem;
}

.listing-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.listing-cell img {
    width: 60px;
    height: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.listing-cell .listing-address {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
}

.listing-cell .listing-price {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.status-badge.pending {
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
}

.status-badge.sold {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Quick Actions */
.quick-actions {
    margin-top: 2rem;
}

.quick-actions h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.action-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.action-card svg {
    color: var(--primary-blue);
}

.action-card span {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .agent-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .agent-sidebar.open {
        transform: translateX(0);
    }

    .agent-main {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .topbar-search {
        display: none;
    }

    .user-name {
        display: none;
    }

    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

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

/* ============================================
   AGENT PROFILE PAGE
   ============================================ */
.agent-profile-page {
    padding-top: 60px;
    min-height: 100vh;
    background: var(--bg-light);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2d4a7c 100%);
    padding: 3rem 2rem;
}

.profile-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-avatar-section {
    display: flex;
    gap: 1.5rem;
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
}

.profile-avatar .verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #059669;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.profile-info {
    color: white;
}

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

.profile-info .agency-name {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.profile-info .specialty {
    font-size: 0.9375rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.profile-rating svg {
    color: var(--primary-gold);
}

.profile-rating span {
    font-weight: 600;
}

.profile-rating .review-count {
    opacity: 0.8;
    font-weight: 400;
}

.profile-languages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-languages span:first-child {
    opacity: 0.8;
}

.profile-languages .language-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-contact-primary {
    padding: 0.875rem 2rem;
    background: var(--primary-gold);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.btn-share {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Stats */
.profile-stats {
    max-width: 1200px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.profile-stats .stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.profile-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.profile-stats .stat-label {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* Profile Content */
.profile-content {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-main .content-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-main .content-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.bio-text {
    color: var(--text-gray);
    line-height: 1.7;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-dark);
}

.tag.area {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.see-all {
    font-size: 0.875rem;
    color: var(--primary-blue);
    text-decoration: none;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.listing-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.listing-card:hover {
    transform: translateY(-2px);
}

.listing-card .listing-image {
    position: relative;
    height: 140px;
}

.listing-card .listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card .listing-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #dc2626;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.listing-card .listing-badge.rent { background: #059669; }
.listing-card .listing-badge.sold { background: #6b7280; }

.listing-card .listing-info {
    padding: 0.75rem;
}

.listing-card .listing-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.listing-card .listing-price {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.listing-card .listing-specs {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* Reviews */
.btn-write-review {
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.reviews-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.rating-overview {
    text-align: center;
}

.big-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin: 0.5rem 0;
    color: var(--primary-gold);
}

.total-reviews {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.rating-bar .bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar .bar-fill {
    height: 100%;
    background: var(--primary-gold);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.reviewer-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.reviewer-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.review-date {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.review-text {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.transaction-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-load-more {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
}

/* Profile Sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-sidebar .contact-card,
.profile-sidebar .agency-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.profile-sidebar .contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-sidebar .contact-form input,
.profile-sidebar .contact-form select,
.profile-sidebar .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.btn-send-message {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.contact-direct {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.contact-direct p {
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9375rem;
}

.agency-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.agency-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
}

.agency-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.agency-details p {
    font-size: 0.8125rem;
    color: var(--primary-blue);
}

/* ============================================
   WATCHLIST PAGE
   ============================================ */
.watchlist-page {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-light);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 4rem;
}

.page-header {
    margin-bottom: 2rem;
}

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

.page-header p {
    color: var(--text-gray);
}

.watchlist-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.watchlist-tabs .tab {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.watchlist-tabs .tab.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.custom-lists {
    margin-bottom: 1.5rem;
}

.custom-lists h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.lists-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-chip {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.2s;
}

.list-chip.selected {
    background: rgba(8, 49, 105, 0.1);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.list-chip.add-new {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    border-style: dashed;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.left-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selected-count {
    font-weight: 500;
    color: var(--text-dark);
}

.left-actions .btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
}

.left-actions .btn-action.danger {
    color: #dc2626;
    border-color: #dc2626;
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.right-actions select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.watchlist-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.watchlist-card.selected {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(8, 49, 105, 0.2);
}

.watchlist-card .select-checkbox {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 5;
}

.watchlist-card .select-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.watchlist-card .property-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.watchlist-card .property-image {
    position: relative;
    height: 180px;
}

.watchlist-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watchlist-card .price-change {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.watchlist-card .price-change.down {
    background: #fee2e2;
    color: #dc2626;
}

.watchlist-card .price-change.up {
    background: #d1fae5;
    color: #059669;
}

.watchlist-card .property-info {
    padding: 1rem;
}

.watchlist-card .saved-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.watchlist-card .card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
}

.empty-state svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.compare-bar {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.btn-compare {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: var(--primary-blue);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

/* ============================================
   MY PROPERTIES PAGE
   ============================================ */
.my-properties-page {
}

.page-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.page-title p {
    color: var(--text-gray);
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

.page-actions .btn-secondary,
.page-actions .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
}

.page-actions .btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.page-actions .btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.page-actions .btn-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
}

.page-actions .btn-primary:hover {
    background: var(--primary-400);
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.stat-box .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-box .stat-text {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Filters Section */
.filters-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    min-width: 280px;
}

.search-box svg {
    color: var(--text-gray);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-group select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.875rem;
    min-width: 140px;
}

/* Properties Table */
.properties-table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.properties-table {
    width: 100%;
    border-collapse: collapse;
}

.properties-table th,
.properties-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.properties-table th {
    background: var(--bg-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
}

.properties-table tbody tr {
    transition: background 0.2s;
}

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

.properties-table tbody tr.selected {
    background: rgba(8, 49, 105, 0.05);
}

.property-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.property-cell img {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.property-details .property-address {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
}

.property-details .property-address:hover {
    color: var(--primary-blue);
}

.property-details .property-type {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.price-cell {
    font-weight: 600;
    color: var(--text-dark);
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-table-action {
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-table-action:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--primary-blue);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 50;
    overflow: hidden;
}

.dropdown-menu button {
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-menu button:hover {
    background: var(--bg-light);
}

.dropdown-menu button.danger {
    color: #dc2626;
}

.dropdown-menu button.danger:hover {
    background: #fef2f2;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.bulk-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-bulk {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-bulk:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-bulk.danger {
    background: #dc2626;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* ============================================
   ADD/EDIT PROPERTY PAGE
   ============================================ */
.add-property-page {
    max-width: 100%;
    width: 100%;
}

.add-property-page .page-header-section {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-weight: 500;
}

.back-link:hover {
    color: white;
    transform: translateX(-4px);
}

.back-link svg {
    transition: transform 0.2s;
}

.back-link:hover svg {
    transform: translateX(-2px);
}

.add-property-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Progress Steps */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.step-number {
    width: 38px;
    height: 38px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-gray);
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.progress-step.active .step-number {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 600;
    text-align: center;
}

.progress-step.active .step-label {
    color: #667eea;
}

.progress-step.completed .step-label {
    color: #10b981;
}

.progress-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-color) 0%, var(--border-color) 100%);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.progress-line.completed {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* Property Form */
.property-form {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.property-form:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.form-section {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.section-description {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group.full {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 1rem;
    color: var(--text-gray);
    font-weight: 500;
}

.input-with-prefix input {
    padding-left: 2rem;
    width: 100%;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.feature-checkbox:hover {
    border-color: var(--primary-blue);
}

.feature-checkbox:has(input:checked) {
    background: rgba(8, 49, 105, 0.05);
    border-color: var(--primary-blue);
}

.feature-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
}

.feature-checkbox span {
    font-size: 0.875rem;
}

.feature-checkbox .feature-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Details Subsections */
.details-subsection {
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.details-subsection:last-child {
    margin-bottom: 0;
}

.subsection-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.subsection-header svg {
    color: #667eea;
    flex-shrink: 0;
}

.subsection-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.details-subsection .form-grid {
    gap: 0.875rem;
}

.details-subsection .form-group label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.details-subsection .form-group label svg {
    color: #667eea;
    flex-shrink: 0;
}

/* Map Picker */
.map-picker {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 1rem;
    background: var(--bg-light);
}

.map-picker-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.map-picker-hint svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

.map-picker-hint .coords-display {
    margin-left: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    background: #ecfdf5;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.map-placeholder {
    height: 200px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-gray);
    cursor: pointer;
}

.map-placeholder:hover {
    background: #e8ecf1;
}

.map-placeholder svg {
    color: var(--text-light);
}

.map-placeholder p {
    font-size: 0.875rem;
}

/* Upload Sections */
.upload-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.upload-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.upload-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.upload-zone {
    border: 3px dashed rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
}

.upload-zone:hover {
    border-color: #667eea;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.upload-zone.small {
    padding: 2rem 1.5rem;
}

.upload-zone svg {
    color: #667eea;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-zone p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.btn-upload {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-upload input {
    display: none;
}

.upload-hint {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Uploaded Photos */
.uploaded-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.photo-thumb {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
}

.photo-thumb.primary {
    border-color: var(--primary-gold);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-thumb:hover .photo-actions {
    opacity: 1;
}

.photo-actions button {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.photo-actions button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.primary-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary-gold);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.5), rgba(241, 245, 249, 0.8));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.form-actions .btn-secondary,
.form-actions .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-actions .btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.form-actions .btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.form-actions .btn-primary:active {
    transform: translateY(0);
}

.form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive for profile and watchlist */
@media (max-width: 1024px) {
    .profile-content {
        grid-template-columns: 1fr;
    }

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

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

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

    .uploaded-photos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar-section {
        flex-direction: column;
        align-items: center;
    }

    .profile-languages {
        justify-content: center;
    }

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

    .profile-sidebar {
        grid-template-columns: 1fr;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .reviews-summary {
        flex-direction: column;
    }

    .page-header-section {
        flex-direction: column;
        gap: 1rem;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn-secondary,
    .page-actions .btn-primary {
        flex: 1;
        justify-content: center;
    }

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

    .filters-section {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: auto;
    }

    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-group select {
        flex: 1;
        min-width: 0;
    }

    .properties-table-container {
        overflow-x: auto;
    }

    .form-progress {
        transform: scale(0.85);
    }

    .progress-line {
        width: 40px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: span 1;
    }

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

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

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .form-actions .btn-secondary,
    .form-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   LEADS PAGE
   ============================================ */
.leads-page {
}

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

.lead-stats .stat-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-info .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info .stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Lead Cards */
.leads-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lead-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.2s;
}

.lead-card.new {
    border-left: 4px solid var(--primary-blue);
    background: rgba(8, 49, 105, 0.02);
}

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

.lead-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 280px;
}

.lead-avatar {
    position: relative;
}

.lead-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.lead-avatar .new-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #dc2626;
    border: 2px solid white;
    border-radius: 50%;
}

.lead-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.lead-contact {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-bottom: 0.125rem;
}

.lead-contact:last-child {
    margin-bottom: 0;
}

.lead-property {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
}

.property-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

.property-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.property-link:hover {
    text-decoration: underline;
}

.lead-message {
    flex: 1;
    max-width: 400px;
}

.lead-message p {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-style: italic;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lead-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
}

.lead-source {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
}

.lead-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.lead-status .status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.lead-status .status-badge.new {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.lead-status .status-badge.contacted {
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
}

.lead-status .status-badge.scheduled {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.lead-status .status-badge.qualified {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.lead-actions {
    display: flex;
    gap: 0.375rem;
}

.btn-action {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.2s;
}

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

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

.btn-action.primary:hover {
    background: var(--primary-400);
}

.btn-action.success:hover {
    border-color: #059669;
    color: #059669;
}

.btn-action.danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ============================================
   SHOWINGS PAGE
   ============================================ */
.showings-page {
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.view-toggle button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.2s;
}

.view-toggle button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.view-toggle button.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Calendar View */
.calendar-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-nav {
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.2s;
}

.btn-nav:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    min-height: 100px;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: var(--bg-light);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.other-month {
    background: var(--bg-light);
    color: var(--text-light);
}

.calendar-day.today {
    background: rgba(8, 49, 105, 0.05);
}

.calendar-day .day-number {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.calendar-day.other-month .day-number {
    color: var(--text-light);
}

.calendar-day.today .day-number {
    color: var(--primary-blue);
}

.day-showings {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.showing-dot {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
}

.showing-dot.scheduled {
    background: rgba(212, 168, 83, 0.15);
    color: #d4a853;
}

.showing-dot.confirmed {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
}

.showing-dot.completed {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.more-count {
    font-size: 0.6875rem;
    color: var(--text-gray);
    text-align: center;
    margin-top: 0.25rem;
}

/* Showings List View */
.showings-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.showing-group {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.group-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.showing-card {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.showing-card:last-child {
    margin-bottom: 0;
}

.showing-card:hover {
    background: var(--bg-light);
}

.showing-card.scheduled {
    border-left: 4px solid #d4a853;
}

.showing-card.confirmed {
    border-left: 4px solid #059669;
}

.showing-card.completed {
    border-left: 4px solid #6b7280;
}

.showing-time {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.showing-time .time {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.showing-time .duration {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.showing-property {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.showing-property img {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.showing-property .property-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.showing-property .property-info a {
    font-weight: 500;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9375rem;
}

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

.showing-property .property-price {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.showing-client {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.showing-client img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.showing-client .client-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.showing-client .client-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.showing-client .client-phone {
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* ============================================
   ANALYTICS PAGE
   ============================================ */
.analytics-page {
}

.period-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.analytics-stats .stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-header .stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.stat-header .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-header .stat-change.positive {
    color: #059669;
}

.stat-header .stat-change.negative {
    color: #dc2626;
}

.analytics-stats .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.stat-chart.mini-chart {
    height: 40px;
}

.stat-chart.mini-chart svg {
    width: 100%;
    height: 100%;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.chart-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-card.large {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item .dot.blue {
    background: #083169;
}

.legend-item .dot.gold {
    background: #d4a853;
}

.chart-legend.vertical {
    flex-direction: column;
    gap: 0.75rem;
}

.chart-body {
    padding: 1.5rem;
}

.chart-placeholder {
    width: 100%;
    min-height: 300px;
}

/* Top Listings */
.top-listings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.listing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.listing-row img {
    width: 60px;
    height: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.listing-row .listing-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.listing-row .listing-address {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.listing-row .listing-views {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.listing-bar {
    flex: 1;
    max-width: 120px;
}

.listing-bar .bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.listing-bar .bar-fill {
    height: 100%;
    background: var(--primary-blue);
}

/* Donut Chart */
.donut-chart {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Response Stats */
.response-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.response-metric {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.response-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-item {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    gap: 0.75rem;
    align-items: center;
}

.breakdown-label {
    font-size: 0.8125rem;
    color: var(--text-dark);
}

.breakdown-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-bar .bar-fill {
    height: 100%;
    background: var(--primary-blue);
}

.breakdown-bar .bar-fill.warning {
    background: #f59e0b;
}

.breakdown-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}

/* Bar Chart Horizontal */
.bar-chart-horizontal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    gap: 0.75rem;
    align-items: center;
}

.bar-label {
    font-size: 0.8125rem;
    color: var(--text-dark);
    font-weight: 500;
}

.bar-container {
    height: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.bar-container .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), #5a8fd4);
}

.bar-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}

/* ============================================
   TRANSACTIONS PAGE
   ============================================ */
.transactions-page {
}

.transaction-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-content .summary-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.summary-content .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.summary-content .summary-change,
.summary-content .summary-sub {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.summary-content .summary-change.positive {
    color: #059669;
}

/* Transactions Table */
.transactions-table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.transactions-table th {
    background: var(--bg-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
}

.transactions-table tbody tr {
    transition: background 0.2s;
}

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

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.type-badge.sale {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.type-badge.rent {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.client-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.client-name {
    font-weight: 500;
    color: var(--text-dark);
}

.client-role {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.commission-cell {
    font-weight: 600;
    color: #059669;
}

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

.status-badge.in-progress {
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
}

.status-badge.closing {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.status-badge.closed {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Responsive for new pages */
@media (max-width: 1024px) {
    .lead-stats,
    .analytics-stats,
    .transaction-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card.large {
        grid-column: span 1;
    }

    .lead-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .showing-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .lead-stats,
    .analytics-stats,
    .transaction-summary {
        grid-template-columns: 1fr;
    }

    .lead-card {
        padding: 1rem;
    }

    .lead-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
    }

    .calendar-day .day-number {
        font-size: 0.75rem;
    }

    .showing-dot {
        font-size: 0.625rem;
    }

    .transactions-table-container,
    .properties-table-container {
        overflow-x: auto;
    }
}

/* ============================================
   BULK UPLOAD PAGE
   ============================================ */
.bulk-upload-page {
    padding: 2rem;
}

.bulk-upload-page .page-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.bulk-upload-page .page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bulk-upload-page .page-title p {
    color: var(--text-gray);
}

/* Upload Steps */
.upload-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.step.active {
    background: var(--primary-blue);
    color: white;
}

.step.completed {
    background: #059669;
    color: white;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.step.active .step-number,
.step.completed .step-number {
    background: rgba(255, 255, 255, 0.2);
}

.step-text {
    font-weight: 500;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-gray);
}

/* Upload Methods */
.upload-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.method-card {
    padding: 2rem;
    background: white;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.method-card.selected {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
}

.method-card svg {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.method-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.method-card p {
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* CSV Upload Area */
.csv-upload-area {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.template-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.template-download p {
    color: var(--text-gray);
}

.drop-zone {
    position: relative;
    border: 2px dashed var(--border-gray);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.02);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-content {
    pointer-events: none;
}

.drop-content.dragging {
    opacity: 0.5;
}

.drop-content svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.drop-content p {
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.file-hint {
    font-size: 0.75rem;
    color: var(--text-light);
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.selected-file svg {
    color: var(--primary-blue);
}

.selected-file span {
    flex: 1;
    font-weight: 500;
}

.btn-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

/* Manual Entry Area */
.manual-entry-area {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.property-entry-form h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.form-grid .form-group.span-2 {
    grid-column: span 2;
}

.form-grid .form-group.span-3 {
    grid-column: span 3;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
}

.added-properties {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gray);
}

.added-properties h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.properties-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.property-item .property-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.property-item .property-info span {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gray);
}

/* Review Section */
.review-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.review-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.summary-item .count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-item .label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.summary-item.valid .count {
    color: #059669;
}

.summary-item.error .count {
    color: #dc2626;
}

.review-table-container {
    overflow-x: auto;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
}

.review-table th,
.review-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.review-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.review-table tr.has-error {
    background: #fef2f2;
}

.review-table .status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.review-table .status-badge.valid {
    background: #d1fae5;
    color: #059669;
}

.review-table .status-badge.error {
    background: #fee2e2;
    color: #dc2626;
}

.btn-table-action.danger {
    color: #dc2626;
}

/* Complete Section */
.complete-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.complete-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.complete-icon.success {
    background: #d1fae5;
    color: #059669;
}

.complete-icon.partial {
    background: #fef3c7;
    color: #d97706;
}

.complete-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.complete-section > p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.error-summary {
    text-align: left;
    padding: 1.5rem;
    background: #fef2f2;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.error-summary h4 {
    color: #dc2626;
    margin-bottom: 0.75rem;
}

.error-summary ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-summary li {
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.complete-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-methods {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid .form-group.span-2,
    .form-grid .form-group.span-3 {
        grid-column: span 2;
    }

    .upload-steps {
        flex-direction: column;
    }

    .step-line {
        width: 2px;
        height: 30px;
    }
}

/* ===== Team Management Page (US-094) ===== */
.team-page {
}

.team-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.team-page .header-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.team-page .page-subtitle {
    color: var(--text-gray);
    font-size: 0.9375rem;
}

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

.team-page .stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.team-page .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-page .stat-icon svg {
    width: 28px;
    height: 28px;
}

.team-page .stat-icon.blue {
    background: #DBEAFE;
    color: #2563EB;
}

.team-page .stat-icon.green {
    background: #DCFCE7;
    color: #16A34A;
}

.team-page .stat-icon.purple {
    background: #EDE9FE;
    color: #7C3AED;
}

.team-page .stat-icon.gold {
    background: #FEF3C7;
    color: #D97706;
}

.team-page .stat-content {
    display: flex;
    flex-direction: column;
}

.team-page .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.team-page .stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.team-page .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.team-page .search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.team-page .search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-gray);
}

.team-page .search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.team-page .filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-page .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    cursor: pointer;
}

.team-page .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.member-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.member-card.inactive {
    opacity: 0.7;
}

.member-header {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
    overflow: hidden;
}

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

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.member-role.agent {
    background: #DBEAFE;
    color: #2563EB;
}

.member-role.broker {
    background: #DCFCE7;
    color: #16A34A;
}

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

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-gray);
}

.icon-btn:hover {
    background: var(--bg-light);
}

.icon-btn.danger:hover {
    background: #FEE2E2;
    border-color: #EF4444;
}

.icon-btn.danger:hover svg {
    color: #EF4444;
}

.member-contact {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.875rem;
    text-decoration: none;
}

.contact-item:hover {
    color: var(--primary-blue);
}

.contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.member-stats {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.member-footer {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.join-date {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.inactive {
    background: #FEE2E2;
    color: #EF4444;
}

/* Access Denied */
.team-page .access-denied {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
}

.team-page .access-denied svg {
    width: 80px;
    height: 80px;
    color: #EF4444;
    margin-bottom: 1.5rem;
}

.team-page .access-denied h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-page .access-denied p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Empty State */
.team-page .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
}

.team-page .empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.team-page .empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.team-page .empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Pagination */
.team-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.team-page .page-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-page .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.team-page .page-btn:not(:disabled):hover {
    background: var(--bg-light);
}

.team-page .page-btn svg {
    width: 18px;
    height: 18px;
}

.team-page .page-info {
    font-size: 0.9375rem;
    color: var(--text-gray);
}

/* Modals */
.team-page .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.team-page .modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

.team-page .modal-small {
    max-width: 400px;
}

.team-page .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.team-page .modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.team-page .close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.team-page .close-btn:hover {
    background: var(--bg-light);
}

.team-page .close-btn svg {
    width: 20px;
    height: 20px;
}

.team-page .modal-body {
    padding: 1.5rem;
}

.team-page .member-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.team-page .member-preview .member-avatar {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.team-page .member-preview h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.team-page .member-preview span {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.team-page .form-group {
    margin-bottom: 1.25rem;
}

.team-page .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-page .form-group input,
.team-page .form-group select,
.team-page .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.team-page .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.team-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.team-page .error-message {
    padding: 0.75rem 1rem;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-top: 1rem;
}

.team-page .confirm-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-page .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.team-page .spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

/* Team Page Responsive */
@media (max-width: 1200px) {
    .team-page .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .team-page .page-header {
        flex-direction: column;
        gap: 1rem;
    }

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

    .team-page .toolbar {
        flex-direction: column;
    }

    .team-page .search-box {
        max-width: none;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-page .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Team Collaboration (US-220) ===== */
.team-tabs {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}
.team-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
}
.team-tab.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.team-tab:hover:not(.active) { color: #334155; }
.team-tab svg { flex-shrink: 0; }

.team-page .filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
}

/* Shared Listings Grid */
.team-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.team-listing-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.team-listing-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.listing-thumb {
    position: relative;
    height: 160px;
    background: #f1f5f9;
    overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.listing-status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #3b82f6;
    color: white;
}
.listing-status.sold { background: #16a34a; }
.listing-status.pending { background: #6b7280; }
.listing-details { padding: 0.85rem; }
.listing-details h4 { margin: 0 0 0.3rem; font-size: 0.9rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-price { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 700; color: #0f172a; }
.listing-location { margin: 0 0 0.5rem; font-size: 0.8rem; color: #64748b; }
.listing-agent-row { display: flex; justify-content: space-between; align-items: center; }
.agent-chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 999px;
    font-weight: 500;
}
.listing-date { font-size: 0.75rem; color: #94a3b8; }

/* Lead Assignment Table */
.leads-table {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.leads-header {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr 0.5fr;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.leads-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr 0.5fr;
    padding: 0.75rem 1rem;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}
.leads-row:last-child { border-bottom: none; }
.col-name strong { display: block; font-size: 0.88rem; color: #1e293b; }
.lead-email { font-size: 0.78rem; color: #64748b; }
.status-chip {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-chip.new { background: #dbeafe; color: #1d4ed8; }
.status-chip.contacted { background: #fef3c7; color: #92400e; }
.status-chip.qualified { background: #d1fae5; color: #065f46; }
.status-chip.proposal { background: #ede9fe; color: #5b21b6; }
.assign-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    background: white;
}
.icon-btn.small {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Team Calendar */
.team-calendar-section { }
.calendar-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.calendar-header-bar h3 { margin: 0; font-size: 1rem; font-weight: 600; color: #1e293b; }
.btn.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.btn.btn-sm:hover { background: #f1f5f9; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.calendar-day {
    background: white;
    min-height: 140px;
    display: flex;
    flex-direction: column;
}
.calendar-day.today { background: #fafbff; }
.day-header {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}
.day-name { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; }
.calendar-day.today .day-num {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
}
.day-num { font-size: 0.85rem; font-weight: 500; color: #334155; }
.day-events { padding: 0.35rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; overflow-y: auto; }
.calendar-event {
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    border-left: 3px solid #3b82f6;
    background: #eff6ff;
}
.calendar-event.showing { border-left-color: #10b981; background: #ecfdf5; }
.calendar-event.openhouse { border-left-color: #f59e0b; background: #fffbeb; }
.event-time { display: block; font-weight: 600; color: #334155; }
.event-title { display: block; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-agent { display: block; color: #94a3b8; font-size: 0.65rem; }

@media (max-width: 768px) {
    .team-tabs { flex-wrap: wrap; }
    .team-tab { flex: 1; min-width: 0; justify-content: center; font-size: 0.78rem; padding: 0.4rem 0.5rem; }
    .leads-header { display: none; }
    .leads-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    .calendar-day { min-height: auto; }
}

/* ===== Subscription Page (US-100) ===== */
.subscription-page {
}

.subscription-page .page-header {
    margin-bottom: 2rem;
}

.subscription-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.subscription-page .page-header p {
    color: var(--text-gray);
    margin: 0;
}

/* Current Plan Section */
.current-plan-section {
    margin-bottom: 3rem;
}

.current-plan-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.current-plan-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 2px solid transparent;
}

.current-plan-card.tier-basic {
    border-color: #64748B;
}

.current-plan-card.tier-professional {
    border-color: var(--primary-blue);
}

.current-plan-card.tier-enterprise {
    border-color: var(--primary-gold);
}

.plan-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gold));
    color: white;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.plan-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.plan-price .period {
    color: var(--text-gray);
}

.plan-price .billing-type {
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-left: 0.5rem;
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.info-row .label {
    color: var(--text-gray);
}

.info-row .value {
    font-weight: 500;
}

.info-row .status-active {
    color: #16A34A;
}

.plan-features h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.plan-features li svg {
    width: 16px;
    height: 16px;
    color: #16A34A;
    flex-shrink: 0;
}

.no-subscription {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.no-subscription svg {
    width: 64px;
    height: 64px;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.no-subscription h3 {
    margin-bottom: 0.5rem;
}

.no-subscription p {
    color: var(--text-gray);
}

/* Plans Section */
.plans-section {
    margin-bottom: 3rem;
}

.plans-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.billing-toggle {
    display: inline-flex;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.billing-toggle button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-toggle button.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.discount-badge {
    background: #DCFCE7;
    color: #16A34A;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.plan-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.plan-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.plan-card.popular {
    border-color: var(--primary-blue);
}

.plan-card.current {
    border-color: var(--primary-gold);
}

.popular-badge,
.current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.popular-badge {
    background: var(--primary-blue);
    color: white;
}

.current-badge {
    background: var(--primary-gold);
    color: white;
}

.plan-header {
    margin-bottom: 1.5rem;
}

.plan-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.plan-description {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 0;
}

.plan-pricing {
    margin-bottom: 1.5rem;
}

.plan-pricing .price {
    font-size: 2.5rem;
    font-weight: 700;
}

.plan-pricing .period {
    color: var(--text-gray);
}

.annual-total {
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.plan-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.plan-features-list li svg {
    width: 18px;
    height: 18px;
    color: #16A34A;
    flex-shrink: 0;
    margin-top: 2px;
}

.plan-action {
    margin-top: auto;
}

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

/* Billing Section */
.billing-section {
    margin-bottom: 3rem;
}

.billing-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.billing-section h2 {
    font-size: 1.25rem;
    margin: 0;
}

.billing-table {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.billing-table table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.billing-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    color: var(--text-gray);
}

.billing-table td {
    font-size: 0.9375rem;
}

.billing-table .empty-row {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.paid {
    background: #DCFCE7;
    color: #16A34A;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.failed {
    background: #FEE2E2;
    color: #DC2626;
}

/* Danger Zone */
.danger-zone {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.danger-zone h3 {
    color: #DC2626;
    margin-bottom: 0.5rem;
}

.danger-zone p {
    color: var(--text-gray);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

/* Modals */
.subscription-page .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.subscription-page .modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

.subscription-page .modal-small {
    max-width: 400px;
}

.subscription-page .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subscription-page .modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.subscription-page .close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.subscription-page .close-btn:hover {
    background: var(--bg-light);
}

.subscription-page .close-btn svg {
    width: 20px;
    height: 20px;
}

.subscription-page .modal-body {
    padding: 1.5rem;
}

.subscription-page .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.change-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.change-from,
.change-to {
    text-align: center;
}

.change-summary .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.change-summary .plan-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.change-summary .arrow {
    width: 24px;
    height: 24px;
    color: var(--text-gray);
}

.pricing-breakdown {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.breakdown-row.credit {
    color: #16A34A;
}

.breakdown-row.total {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 600;
}

.downgrade-info {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #FEF3C7;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.downgrade-info svg {
    width: 24px;
    height: 24px;
    color: #D97706;
    flex-shrink: 0;
}

.downgrade-info p {
    margin: 0;
    font-size: 0.9375rem;
    color: #92400E;
}

.subscribe-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.plan-preview h3 {
    margin: 0 0 0.25rem 0;
}

.plan-preview p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.price-preview .price {
    font-size: 1.5rem;
    font-weight: 700;
}

.price-preview .period {
    color: var(--text-gray);
}

.cancel-warning {
    text-align: center;
    padding: 1.5rem;
    background: #FEF2F2;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.cancel-warning svg {
    width: 48px;
    height: 48px;
    color: #DC2626;
    margin-bottom: 1rem;
}

.cancel-warning h3 {
    color: #DC2626;
    margin-bottom: 0.5rem;
}

.cancel-warning p {
    margin: 0;
    color: var(--text-gray);
}

.subscription-page .form-group {
    margin-bottom: 1.25rem;
}

.subscription-page .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.subscription-page .form-group input,
.subscription-page .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.subscription-page .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.subscription-page .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.subscription-page .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

.subscription-page .error-message {
    padding: 0.75rem 1rem;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-top: 1rem;
}

.subscription-page .spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

/* Subscription Page Responsive */
@media (max-width: 992px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }

    .current-plan-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .billing-table {
        overflow-x: auto;
    }

    .billing-table table {
        min-width: 600px;
    }
}

/* ============================================
   AGENT PROFILE EDIT (US-215)
   ============================================ */

.profile-edit-layout {
    max-width: 800px;
}

.profile-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-bottom: 0;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: none;
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-primary, #111827);
}

.tab-btn.active {
    color: var(--primary, #2563eb);
    border-bottom-color: var(--primary, #2563eb);
}

.form-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.form-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
    margin: 1.5rem 0 0.75rem 0;
}

.form-card h3:first-child {
    margin-top: 0;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary, #f3f4f6);
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    background: var(--primary-light, #dbeafe);
}

.avatar-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #111827);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:disabled {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-tertiary, #9ca3af);
    cursor: not-allowed;
}

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

.char-count {
    font-size: 0.75rem;
    color: var(--text-tertiary, #9ca3af);
    text-align: right;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 1rem 0;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    justify-content: flex-end;
}

.success-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Tags input */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    min-height: 42px;
    align-items: center;
}

.tags-input input {
    border: none;
    outline: none;
    padding: 0.25rem;
    font-size: 0.875rem;
    flex: 1;
    min-width: 120px;
    background: transparent;
    color: var(--text-primary, #111827);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary-light, #dbeafe);
    color: var(--primary, #2563eb);
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.tag button:hover {
    opacity: 1;
}

/* Certification cards */
.cert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cert-info strong {
    font-size: 0.875rem;
    color: var(--text-primary, #111827);
}

.cert-info span {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
}

.cert-expiry {
    font-size: 0.75rem !important;
    color: var(--text-tertiary, #9ca3af) !important;
}

/* Inline form */
.inline-form {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
}

.inline-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Social link rows */
.social-link-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.social-platform {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #111827);
}

.social-link-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.add-social-row {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.add-social-row select,
.add-social-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* Buttons */
.btn-outline {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #fff);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary, #111827);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-secondary, #f3f4f6);
}

.btn-text-danger {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.btn-text-danger:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .avatar-section {
        flex-direction: column;
        text-align: center;
    }

    .social-link-row,
    .add-social-row {
        grid-template-columns: 1fr;
    }

    .profile-tabs {
        overflow-x: auto;
    }
}

/* ============================================
   NOTIFICATIONS PAGE (US-221)
   ============================================ */

.notifications-layout {
    max-width: 800px;
}

.notification-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #fff);
    border-radius: 2rem;
    font-size: 0.8125rem;
    cursor: pointer;
    color: var(--text-secondary, #6b7280);
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--primary, #2563eb);
}

.filter-chip.active {
    background: var(--primary, #2563eb);
    color: #fff;
    border-color: var(--primary, #2563eb);
}

.filter-chip .count {
    font-weight: 600;
    margin-left: 0.25rem;
}

.notification-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.75rem;
    overflow: hidden;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-secondary, #f9fafb);
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e8f2ff;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.875rem;
}

.notification-icon.type-info {
    background: #dbeafe;
    color: #2563eb;
}

.notification-icon.type-price {
    background: #d1fae5;
    color: #059669;
}

.notification-icon.type-status {
    background: #fef3c7;
    color: #d97706;
}

.notification-icon.type-match {
    background: #ede9fe;
    color: #7c3aed;
}

.notification-icon.type-system {
    background: #fee2e2;
    color: #dc2626;
}

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
    margin-bottom: 0.125rem;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-tertiary, #9ca3af);
    margin-top: 0.25rem;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
    flex-shrink: 0;
    margin-top: 0.375rem;
}

.load-more {
    text-align: center;
    margin-top: 1rem;
}

/* Notification Preferences */
.notification-preferences {
    margin-top: 2rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.notification-preferences h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.pref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pref-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary, #111827);
}

.pref-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary, #2563eb);
}

@media (max-width: 640px) {
    .pref-grid {
        grid-template-columns: 1fr;
    }
}
