:root {
    --primary: #047857;
    --primary-dark: #065f46;
    --primary-light: #d1fae5;
    --accent: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-body: #f3f4f6;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #10b981;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Vazirmatn', 'Segoe UI', sans-serif; background: var(--bg-body); color: var(--text-dark); }

/* Layout */
.cms-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--white); border-right: 1px solid #e5e7eb;
    position: fixed; height: 100vh; overflow-y: auto; z-index: 100;
    display: flex; flex-direction: column;
}
.sidebar-logo { padding: 25px 20px; border-bottom: 1px solid #e5e7eb; text-align: center; }
.sidebar-logo img { height: 45px; margin-bottom: 10px; }
.sidebar-logo h3 { font-size: 1.1rem; color: var(--primary); font-weight: 800; }
.sidebar-menu { list-style: none; padding: 20px 15px; flex: 1; }
.sidebar-menu li { margin-bottom: 5px; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 8px;
    text-decoration: none; color: var(--text-dark); font-weight: 500; transition: all 0.2s;
}
.sidebar-menu a:hover { background: var(--primary-light); color: var(--primary-dark); }
.sidebar-menu a.active { background: var(--primary); color: var(--white); font-weight: 700; }
.sidebar-menu a .icon { font-size: 1.2rem; width: 24px; text-align: center; }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 30px; }
.topbar {
    background: var(--white); padding: 15px 30px; border-radius: 12px; margin-bottom: 30px;
    display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.topbar h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); }
.topbar-actions { display: flex; gap: 15px; align-items: center; }

/* Cards & Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: var(--white); padding: 25px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 20px; transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-icon {
    width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--white);
}
.stat-icon.green { background: var(--primary); }
.stat-icon.gold { background: var(--accent); }
.stat-icon.red { background: var(--danger); }
.stat-icon.blue { background: #3b82f6; }
.stat-info h3 { font-size: 2rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.stat-info p { color: var(--text-light); font-size: 0.95rem; margin-top: 5px; }

.content-card {
    background: var(--white); border-radius: 12px; padding: 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 30px;
}
.content-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; color: var(--text-dark); border-bottom: 2px solid var(--bg-body); padding-bottom: 15px;}

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem;
    transition: all 0.2s; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group.full { grid-column: 1 / -1; }

/* Buttons */
.btn {
    padding: 12px 24px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; font-size: 0.95rem;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; border: 2px solid #d1d5db; color: var(--text-dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Property Grid in CMS */
.property-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.prop-card { background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; transition: all 0.2s; }
.prop-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); transform: translateY(-3px); }
.prop-card img { width: 100%; height: 200px; object-fit: cover; }
.prop-card-body { padding: 20px; }
.prop-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.prop-card-body .price { color: var(--primary); font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
.prop-status { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.status-active { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-sold { background: #fee2e2; color: #991b1b; }
.prop-actions { display: flex; gap: 10px; margin-top: 15px; }
.prop-actions .btn { flex: 1; justify-content: center; padding: 8px; font-size: 0.85rem; }

/* Tables (for Inquiries) */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.data-table th { background: #f9fafb; font-weight: 700; color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; }
.data-table tr:hover { background: #f9fafb; }

/* Alerts */
.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }

/* Responsive */
@media (max-width: 992px) {
    .sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid #e5e7eb; }
    .sidebar-menu { display: flex; flex-wrap: wrap; gap: 10px; padding: 15px; }
    .sidebar-menu li { margin: 0; }
    .main-content { margin-left: 0; padding: 15px; }
    .form-grid { grid-template-columns: 1fr; }
}