/* HuisAlert Makelaar Dashboard */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1a365d;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 24px;
}

.sidebar-logo svg {
    width: 40px;
    height: 40px;
}

.sidebar-logo h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ed8936;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
}

.agent-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a365d;
}

.page-subtitle {
    color: #64748b;
    margin-top: 4px;
}

/* Buttons */
.btn-primary {
    background: #ed8936;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #dd6b20;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.btn-secondary {
    background: white;
    color: #1a365d;
    border: 2px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #ed8936;
    color: #ed8936;
}

.btn-full {
    width: 100%;
    margin-top: 16px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #64748b;
}

.btn-icon:hover {
    background: #f1f5f9;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.kpi-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    color: #1a365d;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.kpi-change {
    font-size: 13px;
    font-weight: 600;
}

.kpi-change.positive {
    color: #38a169;
}

.kpi-change.neutral {
    color: #ed8936;
}

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

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-card h3 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 20px;
}

.chart-placeholder svg {
    width: 100%;
    max-height: 200px;
}

/* Activity Feed */
.activity-section h3 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 16px;
}

.activity-feed {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f8fafc;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-icon.new { background: #ebf8ff; }
.activity-icon.match { background: #fef3cd; }
.activity-icon.booking { background: #e8f5e9; }
.activity-icon.alert { background: #fff3e0; }
.activity-icon.client { background: #f3e8ff; }

.activity-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.activity-desc {
    color: #64748b;
    font-size: 13px;
}

.activity-time {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

/* Table */
.table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

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

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8fafc;
}

.table-property {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-property-image {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
}

.table-property-address {
    font-weight: 600;
    color: #1a365d;
}

.table-property-city {
    color: #94a3b8;
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.sold {
    background: #f3e8ff;
    color: #7b1fa2;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.client-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a365d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.client-header h4 {
    font-size: 16px;
    color: #1a365d;
}

.client-header p {
    font-size: 13px;
    color: #94a3b8;
}

.client-score {
    margin-left: auto;
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.client-profile {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

.profile-label {
    color: #64748b;
    font-weight: 500;
}

.client-matches {
    margin-bottom: 4px;
}

.client-matches strong {
    font-size: 14px;
    color: #1a365d;
    display: block;
    margin-bottom: 8px;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-item {
    font-size: 13px;
    color: #64748b;
    padding: 4px 0;
}

/* Notification Builder */
.notification-builder {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.builder-card, .history-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.builder-card h3, .history-card h3 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1e293b;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #ed8936;
}

.match-preview {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.match-preview h4 {
    font-size: 14px;
    color: #92400e;
    margin-bottom: 4px;
}

.match-count {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 8px;
}

.match-details span {
    display: block;
    font-size: 13px;
    color: #64748b;
    padding: 2px 0;
}

.template-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-option:hover {
    border-color: #cbd5e0;
}

.template-option.selected {
    border-color: #ed8936;
    background: #fffbeb;
}

.template-option input[type="radio"] {
    accent-color: #ed8936;
}

.template-title {
    font-weight: 600;
    font-size: 14px;
}

.template-text {
    font-size: 13px;
    color: #64748b;
}

.notification-preview-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.preview-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.preview-notification {
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-icon {
    font-size: 24px;
}

.preview-title {
    font-weight: 700;
    font-size: 14px;
}

.preview-text {
    font-size: 13px;
    color: #64748b;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* History */
.history-item {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.history-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a365d;
    margin-bottom: 4px;
}

.history-stats {
    font-size: 13px;
    color: #64748b;
}

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

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 16px 8px;
    }
    .sidebar-logo h1,
    .nav-item span:not(.nav-icon),
    .agent-name, .agent-role {
        display: none;
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .clients-grid {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
