/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f0f0f1;
}

/* Wrapper Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: #23282d;
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #1d2327;
    border-bottom: 1px solid #32373c;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.user-info {
    font-size: 12px;
    color: #a7aaad;
    line-height: 1.4;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-top: 5px;
}

.role-admin {
    background: #d63638;
    color: #fff;
}

.role-sales {
    background: #2271b1;
    color: #fff;
}

/* Sidebar Navigation */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #32373c;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #a7aaad;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #0073aa;
    color: #fff;
}

.sidebar-nav .icon {
    margin-right: 10px;
    font-size: 16px;
}

.menu-section {
    padding: 10px 20px;
    font-size: 11px;
    color: #72aee6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: #1d2327;
    border-bottom: 1px solid #32373c;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
    background: #f0f0f1;
}

.container {
    max-width: 1200px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 400;
    color: #1d2327;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.btn-success {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

.btn-success:hover {
    background: #008a20;
}

.btn-danger {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.btn-danger:hover {
    background: #b32d2e;
}

.btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
    border-color: #2c3338;
}

.btn-secondary:hover {
    background: #dcdcde;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card.status-new {
    border-left-color: #72aee6;
}

.stat-card.status-dialed {
    border-left-color: #f0b849;
}

.stat-card.status-not-attended {
    border-left-color: #d63638;
}

.stat-card.status-purchased {
    border-left-color: #00a32a;
}

.stat-card h3 {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 300;
    color: #1d2327;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 400;
    color: #1d2327;
}

.card-body {
    padding: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1d2327;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table thead {
    background: #f6f7f7;
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.table tbody tr:hover {
    background: #f6f7f7;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background: #e7f5fe;
    color: #0c5d8f;
}

.status-dialed {
    background: #fef8e7;
    color: #94610a;
}

.status-not-attended {
    background: #fcf0f1;
    color: #9b2c2c;
}

.status-purchased {
    background: #edfaef;
    color: #00661f;
}
/* Status Badges - ADD THESE */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background: #e7f5fe;
    color: #0c5d8f;
}

.status-interested {
    background: #fef8e7;
    color: #94610a;
}

.status-v-interested {
    background: #edfaef;
    color: #00661f;
}

.status-junk {
    background: #fcf0f1;
    color: #9b2c2c;
}

.status-followup {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-payment {
    background: #dcfce7;
    color: #14532d;
}

/* Stat Cards */
.stat-card.status-new {
    border-left-color: #2271b1;
}

.stat-card.status-interested {
    border-left-color: #f0b849;
}

.stat-card.status-v-interested {
    border-left-color: #00a32a;
}

.stat-card.status-junk {
    border-left-color: #d63638;
}

.stat-card.status-followup {
    border-left-color: #9333ea;
}

.stat-card.status-payment {
    border-left-color: #16a34a;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 3px;
    border-left: 4px solid;
}

.alert-success {
    background: #edfaef;
    border-left-color: #00a32a;
    color: #00661f;
}

.alert-error {
    background: #fcf0f1;
    border-left-color: #d63638;
    color: #9b2c2c;
}

.alert-info {
    background: #e7f5fe;
    border-left-color: #2271b1;
    color: #0c5d8f;
}

/* Login Page */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f0f1;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1d2327;
    font-size: 24px;
    font-weight: 400;
}

.login-box .form-group:last-of-type {
    margin-bottom: 25px;
}

.login-box .btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* Action Links */
.action-links {
    display: flex;
    gap: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1d2327;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}