* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.login-card, .dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: 20px auto;
    max-width: 400px;
}

.dashboard-card {
    max-width: 100%;
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
}

h3 {
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    margin-top: 10px;
}

.btn-danger {
    background: #dc3545;
}

.btn-success {
    background: #28a745;
}

.btn-small {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    margin: 5px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 24px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.search-filter-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-filter-bar input {
    margin-bottom: 0;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.doctor-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.doctor-card.filled {
    border-color: #28a745;
    background: #f0fff4;
}

.doctor-card.pending {
    border-color: #dc3545;
    background: #fff5f5;
}

.doctor-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.doctor-info {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    width: auto;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

.file-upload {
    border: 2px dashed #667eea;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    background: #f8f9fa;
}

.file-upload input {
    display: none;
}

.hidden {
    display: none;
}

.brand-table-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    z-index: 100;
    width: auto;
}

.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.report-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.report-table {
    background: white;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.company-tag-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.company-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    margin: 8px 0;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.company-item:hover {
    border-color: #667eea;
}

.company-item.selected {
    border-color: #28a745;
    background: #f0fff4;
}

.company-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.company-brands {
    margin-left: 35px;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #667eea;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.download-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.download-link {
    padding: 8px 16px;
    background: #17a2b8;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.download-link:hover {
    background: #138496;
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .logout-btn, .export-buttons, .tabs, .search-filter-bar, .report-filters {
        display: none !important;
    }
    
    .dashboard-card {
        box-shadow: none;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .doctor-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
    }

    .modal-content {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    .filter-section {
        grid-template-columns: 1fr;
    }
    
    .logout-btn {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
}