* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.landing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.landing-content {
    background: white;
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 700px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 4em;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    font-weight: 700;
}

.logo-subtitle {
    color: #6b7280;
    font-size: 1.1em;
    font-weight: 500;
}

.tagline {
    font-size: 1.2em;
    color: #6b7280;
    margin-bottom: 40px;
}

.landing-buttons {
    margin: 40px 0;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
}

.btn-large span {
    margin-right: 8px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 24px;
}

.footer-note {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    color: #9ca3af;
    font-size: 14px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

.login-box h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 35px;
    font-size: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin: 12px 0;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    display: none;
}

.form-message {
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f3f4f6;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(102, 126, 234, 0.15);
    color: white;
    border-left: 4px solid #667eea;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: #f3f4f6;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 24px 30px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.top-bar h1 {
    color: #111827;
    font-size: 28px;
    font-weight: 700;
}

.user-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.admin-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-details h3 {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 13px;
}

.stat-primary { border-left: 4px solid #667eea; }
.stat-success { border-left: 4px solid #10b981; }
.stat-warning { border-left: 4px solid #f59e0b; }
.stat-danger { border-left: 4px solid #ef4444; }
.stat-info { border-left: 4px solid #3b82f6; }

.content-section {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.content-section h2 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.data-table th {
    font-weight: 700;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.new { background: #dbeafe; color: #1e40af; }
.status-badge.under_review { background: #fef3c7; color: #92400e; }
.status-badge.approved { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.status-badge.on_hold { background: #f3f4f6; color: #374151; }
.status-badge.active { background: #d1fae5; color: #065f46; }
.status-badge.inactive { background: #fee2e2; color: #991b1b; }

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: #667eea;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-sm:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.filters-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-input {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #9ca3af;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #111827;
}

.profile-container {
    max-width: 1000px;
}

.profile-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.profile-section h2 {
    margin-bottom: 24px;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

.form-container {
    max-width: 900px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.form-section h3 {
    margin-bottom: 24px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.declaration-section {
    border: 2px solid #fbbf24;
    background: #fffbeb;
}

.declaration-box {
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.declaration-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.activity-timeline {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-icon {
    font-size: 24px;
}

.activity-content {
    flex: 1;
}

.activity-time {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
}

.status-breakdown {
    display: grid;
    gap: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.status-count {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.top-agents-list .agent-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.agent-name {
    font-weight: 600;
}

.agent-stats {
    color: #6b7280;
    font-size: 14px;
}

.status-select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
}

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-content {
        padding: 40px 30px;
    }
    
    .login-box {
        padding: 35px 25px;
    }
}