:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --accent: #3182ce;
    --sidebar-bg: #1a202c;
    --sidebar-hover: #2d3748;
    --sidebar-text: #cbd5e0;
    --sidebar-active: #3182ce;
    --body-bg: #f7fafc;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: #2d3748;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand h4 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.sidebar-brand small {
    color: var(--sidebar-text);
    font-size: 0.75rem;
    opacity: 0.7;
}

.sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav li a.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.top-bar h2 {
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.blue { background: #ebf8ff; color: #3182ce; }
.stat-card .stat-icon.green { background: #f0fff4; color: #38a169; }
.stat-card .stat-icon.purple { background: #faf5ff; color: #805ad5; }

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.stat-card p {
    color: #718096;
    margin: 0;
    font-size: 0.85rem;
}

.card-custom {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.table-custom {
    margin: 0;
}

.table-custom thead th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table-custom tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    color: #4a5568;
    border-bottom: 1px solid #edf2f7;
}

.table-custom tbody tr:hover {
    background-color: #f7fafc;
}

.badge-type {
    font-size: 0.75rem;
    padding: 0.35em 0.75em;
    border-radius: 6px;
    font-weight: 500;
}

.badge-hard-money { background: #fed7d7; color: #c53030; }
.badge-dscr { background: #c6f6d5; color: #276749; }
.badge-private-money { background: #fefcbf; color: #975a16; }
.badge-credit-card { background: #bee3f8; color: #2b6cb0; }

.badge-prospect { background: #bee3f8; color: #2b6cb0; }
.badge-active { background: #c6f6d5; color: #276749; }
.badge-closed { background: #e2e8f0; color: #4a5568; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

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

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    padding: 2rem;
}

.detail-card .detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a0aec0;
    margin-bottom: 0.25rem;
}

.detail-card .detail-value {
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.filter-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--sidebar-bg);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
}

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

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .sidebar-toggle {
        display: block;
    }
}
