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

.welcome-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 32px 40px;
    border-radius: 8px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-button:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(-2px);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.welcome-section h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.quick-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
}

/* Admin sections */
.admin-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Roles list */
.roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
}

/* Create role form */
.create-role-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-input {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent-primary);
}

/* Users table */
.table-container {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-secondary);
}

.admin-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.admin-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Role badges in table */
.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge .remove-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease;
}

.role-badge .remove-role:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Add role dropdown */
.add-role-wrapper {
    position: relative;
    display: inline-block;
}

.add-role-btn {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-role-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.add-role-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    min-width: 140px;
    display: none;
}

.add-role-dropdown.open {
    display: block;
}

.add-role-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.add-role-dropdown button:hover {
    background: var(--bg-hover);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
}

.pagination button {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.pagination .page-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        align-items: flex-start;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }

    .create-role-form {
        flex-direction: column;
        align-items: stretch;
    }
}
