/* Admin Dashboard Styles */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.dashboard-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Dashboard Navigation */
.dashboard-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: var(--color-primary);
}

.nav-link.active {
    background-color: var(--color-primary);
    color: white;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 12px;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0;
    color: #333;
    font-weight: 700;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Content */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.section-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* Tables */
.users-table-container,
.companies-table-container {
    overflow-x: auto;
}

.users-table,
.companies-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.companies-table th,
.users-table td,
.companies-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.users-table th,
.companies-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.users-table tbody tr:hover,
.companies-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

/* Role Badges */
.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-administrator {
    background: #dc3545;
    color: white;
}

.role-surveyor {
    background: #28a745;
    color: white;
}

.role-customer {
    background: #17a2b8;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-dashboard .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--modal-header-bg-start), var(--modal-header-bg-end));
    color: var(--modal-header-text);
    border-radius: 12px 12px 0 0;
}

.admin-dashboard .modal-header h2,
.admin-dashboard .modal-header * {
    margin: 0;
    color: var(--modal-header-text);
}

.admin-dashboard .modal-header .close-btn {
    color: var(--modal-header-text);
}

.admin-dashboard .modal-header .close-btn:hover {
    background-color: rgba(255,255,255,0.2);
    color: var(--modal-header-text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-rgba-10);
}

.auth-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.auth-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.auth-btn.loading .btn-text {
    display: none;
}

.auth-btn.loading .btn-loading {
    display: inline;
}

.auth-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    margin-top: 10px;
}

.auth-message.show {
    display: block;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dashboard-nav {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}







