* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: #5568d3;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

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

.sidebar {
    width: 250px;
    background: #2d3748;
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 40px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    color: #cbd5e0;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.sidebar nav a:hover {
    background: #4a5568;
    color: white;
}

.sidebar nav a.active {
    background: #667eea;
    color: white;
}

.sidebar nav a.logout {
    margin-top: auto;
    background: #e53e3e;
    color: white;
}

.sidebar nav a.logout:hover {
    background: #c53030;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

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

.header h1 {
    font-size: 32px;
    color: #2d3748;
}

.header p {
    color: #718096;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

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

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

.leads-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.leads-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.leads-table tr:hover {
    background: #f7fafc;
}

.btn-view, .btn-secondary, .btn-back {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
    display: inline-block;
}

.btn-view:hover, .btn-secondary:hover {
    background: #5568d3;
}

.btn-back {
    background: #718096;
}

.btn-back:hover {
    background: #4a5568;
}

.lead-detail-card {
    background: white;
    padding: 20px;
}

.detail-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row.full-width {
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 150px;
}

.detail-value {
    color: #2d3748;
}

.message-box {
    background: #f7fafc;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.action-buttons .btn-primary {
    width: auto;
    flex: 1;
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
